def obj2str(obj, pk_protocol=pk_protocol):
    """Convert arbitrary object to utf-8 string, using
    base64encode algorithm.

    Usage::

        >>> from weatherlab.lib.dataIO.pk import obj2str
        >>> data = {"a": 1, "b": 2}
        >>> obj2str(data, pk_protocol=2)
        'gAJ9cQAoWAEAAABhcQFLAVgBAAAAYnECSwJ1Lg=='

    **中文文档**

    将可Pickle化的Python对象转化为utf-8编码的"字符串"
    """
    return base64.b64encode(pickle.dumps(
        obj, protocol=pk_protocol)).decode("utf-8")