Skip to content
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Changelog
## 7.16.0
* 对象存储,优化并发场景的区域查询
* CDN,查询域名带宽,支持 `data_type` 参数

## 7.15.0
* 对象存储,持久化处理支持工作流模版
* 对象存储,修复 Windows 平台兼容性问题
Expand Down
8 changes: 7 additions & 1 deletion examples/cdn_bandwidth.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
查询指定域名指定时间段内的带宽
"""
import qiniu
from qiniu import CdnManager
from qiniu import CdnManager, DataType


# 账户ak,sk
Expand All @@ -31,3 +31,9 @@

print(ret)
print(info)

ret, info = cdn_manager.get_bandwidth_data(
urls, startDate, endDate, granularity, data_type=DataType.BANDWIDTH)

print(ret)
print(info)
4 changes: 2 additions & 2 deletions qiniu/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

# flake8: noqa

__version__ = '7.15.0'
__version__ = '7.16.0'

from .auth import Auth, QiniuMacAuth

Expand All @@ -21,7 +21,7 @@
build_batch_stat, build_batch_delete, build_batch_restoreAr, build_batch_restore_ar
from .services.storage.uploader import put_data, put_file, put_stream
from .services.storage.upload_progress_recorder import UploadProgressRecorder
from .services.cdn.manager import CdnManager, create_timestamp_anti_leech_url, DomainManager
from .services.cdn.manager import CdnManager, DataType, create_timestamp_anti_leech_url, DomainManager
from .services.processing.pfop import PersistentFop
from .services.processing.cmd import build_op, pipe_cmd, op_save
from .services.compute.app import AccountClient
Expand Down
7 changes: 7 additions & 0 deletions qiniu/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
# because of u'...' Unicode literals.
import json # noqa

# -------
# Platform
# -------

is_windows = sys.platform == 'win32'
is_linux = sys.platform == 'linux'
is_macos = sys.platform == 'darwin'

# -------
# Pythons
Expand Down
Loading
Loading