Files
ai_wht_B/venv/Lib/site-packages/oss2/defaults.py
“shengyudong” 5a384b694e 2026-1-6
2026-01-06 14:18:39 +08:00

52 lines
985 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# -*- coding: utf-8 -*-
"""
oss2.defaults
~~~~~~~~~~~~~
全局缺省变量。
"""
def get(value, default_value):
if value is None:
return default_value
else:
return value
#: 连接超时时间
connect_timeout = 60
#: 缺省重试次数
request_retries = 3
#: 对于某些接口,上传数据长度大于或等于该值时,就采用分片上传。
multipart_threshold = 10 * 1024 * 1024
#: 分片上传缺省线程数
multipart_num_threads = 1
#: 缺省分片大小
part_size = 10 * 1024 * 1024
#: 最大分片的个数
max_part_count = 10000
#: 最小分片大小
min_part_size = 100 * 1024
#: 每个Session连接池大小
connection_pool_size = 10
#: 对于断点下载如果OSS文件大小大于该值就进行并行下载multiget
multiget_threshold = 100 * 1024 * 1024
#: 并行下载multiget缺省线程数
multiget_num_threads = 4
#: 并行下载multiget的缺省分片大小
multiget_part_size = 10 * 1024 * 1024