kumori - 更自由地调用腾讯云API
腾讯云的python sdk很冗长,而且更新不及时,甚至有些API不会出现在sdk里,用着不是很巴适。因此包装了一下腾讯云的API的调用方式,以实现调用更多API的目的。
Installation
pip install kumori
Usage
import os
from kumori.qcloud import User
# 创建一个用户
user = User(os.getenv('QCLOUD_SID'), os.getenv('QCLOUD_SKEY'), 'ap-guangzhou')
# 调用 API
resp = user.cvm.DescribeInstances(Limit=20, Offset=0)
print(resp)
默认情况下,如果API返回Error、代码将会抛出Exception。可以通过 console.suppress_errors() 屏蔽掉
from kumori.qcloud import console
with console.suppress_errors():
# 不会抛出异常
resp = user.cvm.DescribeInstances(Unknown="Key")
# 这里会抛出异常
user.cvm.DescribeInstances(Unknown="Key")
Advanced
kumori 内置了 cvm 在内的若干个产品的调用。如果你想要调用的产品在这里没出现,可以手动添加:
from kumori.qcloud import console, User
console.add_service('abc', '2025-04-29')
user = User(
# sid=...
# skey=...
)
user.abc.DescribeYourPPT(Limit=10, Offset=2)
TODO
- v3 signature
- cos
Metadata
Release files for kumori 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kumori-0.0.4.tar.gz | 17.1 kB | Without provenance | Details for kumori-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kumori-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for kumori-0.0.4-py3-none-any.whl |
Total release size: 34.5 kB
Release files / kumori-0.0.4.tar.gz
| Download URL | kumori-0.0.4.tar.gz |
|---|---|
| Size | 17.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b5bde444810a04c94eb12c8d99b6c5608df1aefb31346d894910f100fa76a3bb
|
|
BLAKE2b-256 checksum How to use checksums |
09045d74f780d127efb6fbe92d681210fdf3eaf2e2aab423eb7cc1cec00913d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / kumori-0.0.4-py3-none-any.whl
| Download URL | kumori-0.0.4-py3-none-any.whl |
|---|---|
| Size | 17.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d0437bb8ed0c0e0fbd94a3b9696f3091262cce425e78da7db408dc3c765a7e2
|
|
BLAKE2b-256 checksum How to use checksums |
81e7e8bc64f328b421cfea0cc4293fd4bf987e6adcc63b645fdad8f73aba3cf7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for kumori 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.