# Path: qiniu/config.py
# RS_HOST = 'http://rs.qiniu.com'  # 管理操作Host
# RSF_HOST = 'http://rsf.qbox.me'  # 列举操作Host
# API_HOST = 'http://api.qiniu.com'  # 数据处理操作Host
# UC_HOST = 'https://uc.qbox.me'  # 获取空间信息Host
# _BLOCK_SIZE = 1024 * 1024 * 4  # 断点续传分块大小，该参数为接口规格，暂不支持修改
# def get_default(key):
# def set_default(
#         default_zone=None, connection_retries=None, connection_pool=None,
#         connection_timeout=None, default_rs_host=None, default_uc_host=None,
#         default_rsf_host=None, default_api_host=None, default_upload_threshold=None):
# 
# Path: qiniu/http.py
# USER_AGENT = 'QiniuPython/{0} ({1}; ) Python/{2}'.format(
#     __version__, _sys_info, _python_ver)
# def __return_wrapper(resp):
# def _init():
# def _post(url, data, files, auth, headers=None):
# def _put(url, data, files, auth, headers=None):
# def _get(url, params, auth, headers=None):
#     def __init__(self, token):
#     def __call__(self, r):
# def _post_with_token(url, data, token):
# def _post_with_token_and_headers(url, data, token, headers):
# def _post_file(url, data, files):
# def _post_with_auth(url, data, auth):
# def _get_with_auth(url, data, auth):
# def _post_with_auth_and_headers(url, data, auth, headers):
# def _get_with_auth_and_headers(url, data, auth, headers):
# def _post_with_qiniu_mac_and_headers(url, data, auth, headers):
# def _put_with_auth(url, data, auth):
# def _put_with_token_and_headers(url, data, auth, headers):
# def _put_with_auth_and_headers(url, data, auth, headers):
# def _put_with_qiniu_mac_and_headers(url, data, auth, headers):
# def _post_with_qiniu_mac(url, data, auth):
# def _get_with_qiniu_mac(url, params, auth):
# def _get_with_qiniu_mac_and_headers(url, params, auth, headers):
# def _delete_with_qiniu_mac(url, params, auth):
# def _delete_with_qiniu_mac_and_headers(url, params, auth, headers):
#     def __init__(self, response, exception=None):
#     def ok(self):
#     def need_retry(self):
#     def connect_failed(self):
#     def __str__(self):
#     def __repr__(self):
#     def __check_json(self, reponse):
# class _TokenAuth(AuthBase):
# class ResponseInfo(object):
# 
# Path: qiniu/utils.py
# def urlsafe_base64_encode(data):
#     """urlsafe的base64编码:
# 
#     对提供的数据进行urlsafe的base64编码。规格参考：
#     https://developer.qiniu.com/kodo/manual/1231/appendix#1
# 
#     Args:
#         data: 待编码的数据，一般为字符串
# 
#     Returns:
#         编码后的字符串
#     """
#     ret = urlsafe_b64encode(b(data))
#     return s(ret)
# 
# def entry(bucket, key):
#     """计算七牛API中的数据格式:
# 
#     entry规格参考 https://developer.qiniu.com/kodo/api/1276/data-format
# 
#     Args:
#         bucket: 待操作的空间名
#         key:    待操作的文件名
# 
#     Returns:
#         符合七牛API规格的数据格式
#     """
#     if key is None:
#         return urlsafe_base64_encode('{0}'.format(bucket))
#     else:
#         return urlsafe_base64_encode('{0}:{1}'.format(bucket, key))


from qiniu import config
from qiniu import http
from qiniu.utils import urlsafe_base64_encode, entry
        url = '{0}/list'.format(config.get_default('default_rsf_host'))
        ret, info = self.__get(url, options)

        eof = False
        if ret and not ret.get('marker'):
            eof = True

        return ret, eof, info

    def stat(self, bucket, key):
        """获取文件信息:

        获取资源的元信息，但不返回文件内容，具体规格参考：
        https://developer.qiniu.com/kodo/api/1308/stat

        Args:
            bucket: 待获取信息资源所在的空间
            key:    待获取资源的文件名

        Returns:
            一个dict变量，类似：
                {
                    "fsize":        5122935,
                    "hash":         "ljfockr0lOil_bZfyaI2ZY78HWoH",
                    "mimeType":     "application/octet-stream",
                    "putTime":      13603956734587420
                    "type":         0
                }
            一个ResponseInfo对象
        """

# Path: qiniu/config.py
# RS_HOST = 'http://rs.qiniu.com'  # 管理操作Host
# RSF_HOST = 'http://rsf.qbox.me'  # 列举操作Host
# API_HOST = 'http://api.qiniu.com'  # 数据处理操作Host
# UC_HOST = 'https://uc.qbox.me'  # 获取空间信息Host
# _BLOCK_SIZE = 1024 * 1024 * 4  # 断点续传分块大小，该参数为接口规格，暂不支持修改
# def get_default(key):
# def set_default(
#         default_zone=None, connection_retries=None, connection_pool=None,
#         connection_timeout=None, default_rs_host=None, default_uc_host=None,
#         default_rsf_host=None, default_api_host=None, default_upload_threshold=None):
# 
# Path: qiniu/http.py
# USER_AGENT = 'QiniuPython/{0} ({1}; ) Python/{2}'.format(
#     __version__, _sys_info, _python_ver)
# def __return_wrapper(resp):
# def _init():
# def _post(url, data, files, auth, headers=None):
# def _put(url, data, files, auth, headers=None):
# def _get(url, params, auth, headers=None):
#     def __init__(self, token):
#     def __call__(self, r):
# def _post_with_token(url, data, token):
# def _post_with_token_and_headers(url, data, token, headers):
# def _post_file(url, data, files):
# def _post_with_auth(url, data, auth):
# def _get_with_auth(url, data, auth):
# def _post_with_auth_and_headers(url, data, auth, headers):
# def _get_with_auth_and_headers(url, data, auth, headers):
# def _post_with_qiniu_mac_and_headers(url, data, auth, headers):
# def _put_with_auth(url, data, auth):
# def _put_with_token_and_headers(url, data, auth, headers):
# def _put_with_auth_and_headers(url, data, auth, headers):
# def _put_with_qiniu_mac_and_headers(url, data, auth, headers):
# def _post_with_qiniu_mac(url, data, auth):
# def _get_with_qiniu_mac(url, params, auth):
# def _get_with_qiniu_mac_and_headers(url, params, auth, headers):
# def _delete_with_qiniu_mac(url, params, auth):
# def _delete_with_qiniu_mac_and_headers(url, params, auth, headers):
#     def __init__(self, response, exception=None):
#     def ok(self):
#     def need_retry(self):
#     def connect_failed(self):
#     def __str__(self):
#     def __repr__(self):
#     def __check_json(self, reponse):
# class _TokenAuth(AuthBase):
# class ResponseInfo(object):
# 
# Path: qiniu/utils.py
# def urlsafe_base64_encode(data):
#     """urlsafe的base64编码:
# 
#     对提供的数据进行urlsafe的base64编码。规格参考：
#     https://developer.qiniu.com/kodo/manual/1231/appendix#1
# 
#     Args:
#         data: 待编码的数据，一般为字符串
# 
#     Returns:
#         编码后的字符串
#     """
#     ret = urlsafe_b64encode(b(data))
#     return s(ret)
# 
# def entry(bucket, key):
#     """计算七牛API中的数据格式:
# 
#     entry规格参考 https://developer.qiniu.com/kodo/api/1276/data-format
# 
#     Args:
#         bucket: 待操作的空间名
#         key:    待操作的文件名
# 
#     Returns:
#         符合七牛API规格的数据格式
#     """
#     if key is None:
#         return urlsafe_base64_encode('{0}'.format(bucket))
#     else:
#         return urlsafe_base64_encode('{0}:{1}'.format(bucket, key))


# Path: qiniu/services/storage/bucket.py
from qiniu import config
from qiniu import http
from qiniu.utils import urlsafe_base64_encode, entry

        url = '{0}/list'.format(config.get_default('default_rsf_host'))
        ret, info = self.__get(url, options)

        eof = False
        if ret and not ret.get('marker'):
            eof = True

        return ret, eof, info

    def stat(self, bucket, key):
        """获取文件信息:

        获取资源的元信息，但不返回文件内容，具体规格参考：
        https://developer.qiniu.com/kodo/api/1308/stat

        Args:
            bucket: 待获取信息资源所在的空间
            key:    待获取资源的文件名

        Returns:
            一个dict变量，类似：
                {
                    "fsize":        5122935,
                    "hash":         "ljfockr0lOil_bZfyaI2ZY78HWoH",
                    "mimeType":     "application/octet-stream",
                    "putTime":      13603956734587420
                    "type":         0
                }
            一个ResponseInfo对象
        """

        resource = entry(bucket, key)