A short description of your package
Project description
# 项目介绍
本项目是python版本对接api平台的sdk。
sdk包括两个功能
1. 对于接口进行鉴权,对于不属于平台的api不进行服务
2. 限流,对于三方接口有qpm的限制,api平台会帮你做个限流。在请求鉴权接口会限流。
3. 记录api log以及费用记录。
#### 实现参考
[对于讯飞自己封装sdk参考](https://github.com/HuiDBK/SparkAISDK)
[阿里巴巴acm参考](https://github.com/alibaba/acm-sdk-python)
#### 调用实例
```python
if __name__ == "__main__":
from api.common.code import error_code_range
sdk = AuthSDK.init(appid=os.getenv("APPID"), apikey=os.getenv("APIKEY"), apisecret=os.getenv("APISECRET"))
result = sdk.auth.check_quota(interface_id="9", thrid_app_key="app_key_123")
print("Quota Check Result:", result)
if(result.code != 0):
if(result.code in error_code_range):
print(result.code)
print(result.msg)
log_data = mock_log_dto()
asyncio.run(sdk.log.save_log(log_data))
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pgverseapiauth-0.1.0.tar.gz
(5.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pgverseapiauth-0.1.0.tar.gz.
File metadata
- Download URL: pgverseapiauth-0.1.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ede82a6bc684348a61296b452189be8f9194320d9db0717754f98821ce50934
|
|
| MD5 |
3550dab5aecf2efd727a9f9bd50bb05f
|
|
| BLAKE2b-256 |
c090aa05f7514ddd67feda088ef64fc62d27f4b100d95df0126d0eb24a8a8c0a
|
File details
Details for the file pgverseapiauth-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pgverseapiauth-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
190dae445426b91c5b8b586296ac4b37f4eb9716d32037c30e2245ec4088eee3
|
|
| MD5 |
ff5017f521b9b234e806ee6ef401de7a
|
|
| BLAKE2b-256 |
dd1c06c734a5a2f3769e65edfbf4a2a77a43c65caa3503d10c9e3324345e4779
|