万网AI云平台SDK
Project description
WWAI云平台SDK
参数注入方式
| 参数名称 | 描述 |
|---|---|
| server | WWAI云平台地址,默认为 http://ai.api.wwai.wwxckj.com |
| grant_type | 授权类型,支持password、client_credential,默认为 client_credential |
| authorization | 客户端模式时的授权信息,路径:系统管理 > 终端管理 > 新建终端 |
| username | 密码模式时的用户名 |
| password | 密码模式时的密码 |
| tenant_code | 密码模式时的租户号 |
| cache_type | 缓存类型,支持 redis、local,默认为 local |
| redis_host | redis地址,默认为 localhost |
| redis_port | redis端口,默认为 6379 |
| redis_password | redis密码,默认为 None |
| redis_db | redis数据库,默认为 0 |
环境变量方式
| 环境变量名称 | 描述 |
|---|---|
| WWAI_SERVER | WWAI云平台地址,默认为 http://ai.api.wwai.wwxckj.com |
| WWAI_GRANT_TYPE | 授权类型,默认为 client_credential |
| WWAI_AUTHORIZATION | 客户端模式时的授权信息,路径:系统管理 > 终端管理 > 新建终端 |
| WWAI_USERNAME | 密码模式的用户名 |
| WWAI_PASSWORD | 密码模式的密码 |
| WWAI_TENANT_CODE | 密码模式时的租户号 |
| WWAI_CACHE_TYPE | 缓存类型,默认为 local,支持 redis、local |
| REDIS_HOST | redis地址,默认为 localhost |
| REDIS_PORT | redis端口,默认为 6379 |
| REDIS_PASSWORD | redis密码,默认为 None |
| REDIS_DB | redis数据库,默认为 0 |
接口说明
| 接口名称 | 描述 |
|---|---|
| ocr_idcard | 身份证识别 |
| ocr_vehicle | 行驶证识别 |
| ocr_vehicle_certificate | 机动车登记证书识别 |
| ocr_invoice | 发票识别 |
| ocr_bank_card | 银行卡识别 |
| other_classify | 通用图片分类 |
| asr_iat | 讯飞短语音识别 |
| aigc_models | AIGC模型列表 |
| huaweicloud_obs_get_ak_sk | 获取临时OBS的 AK/SK |
demo 说明
pip install wwai-sdk
import wwai_sdk
import asyncio
# grant_type="client_credential" 为客户端模式
# authorization 从WWAI云平台获取,路径:系统管理 > 终端管理 > 新建终端
client = wwai_sdk.create_client(
grant_type="client_credential",
authorization="Basic xxxxxxx"
)
# 身份证识别
res = asyncio.run(client.ocr_idcard("https://ai.bdstatic.com/file/96D2F45674F54D4287EB9FBF9E6AB19A", "front"))
print(res)
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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 wwai_sdk-0.0.6-py3-none-any.whl.
File metadata
- Download URL: wwai_sdk-0.0.6-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9bda724e2efc45674161a171128a3d45c6973fd374564fc85b1a945a7874fafd
|
|
| MD5 |
f86a32523b740540d569f3bfa7215446
|
|
| BLAKE2b-256 |
2f7af5f7401f0748282e599fe808d57e1a7c77fdb9430b6b54e81c31df74553c
|