关于
运行环境
Python >= 3.6
安装方法
通过pip安装官方发布的版本(以Linux系统为例):
pip install lanxinplus_openapi
- 也可下载源码包,执行安装命令:
sudo python setup.py install
快速使用
获取 APP_TOKEN
# -*- coding: utf-8 -*-
import lanxinplus_openapi
from lanxinplus_openapi.api import auth_api
config = lanxinplus_openapi.Configuration(
host = "https://example.com/open/apigw", app_id="", app_secret=""
)
with lanxinplus_openapi.ApiClient(config) as api_client:
lanxinplus_openapi.Configuration.set_default(config)
try:
authApi = auth_api.AuthApi(api_client)
resp = authApi.v1_app_token_create("client_credential", config.app_id, config.app_secret)
print(resp)
except lanxinplus_openapi.ApiException as e:
print("Exception when calling AuthApi->v1_apptoken_create_get: %s\n" % e)
测试用例使用说明
运行test
nosetests -s test/test_auth_api.py:TestAuthApi.test_v1_app_token_create
联系我们
License
MIT License, see license file
Release files for lanxinplus-openapi 1.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 | |
|---|---|---|---|
| lanxinplus-openapi-1.0.0.4.tar.gz | 91.9 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lanxinplus_openapi-1.0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
| lanxinplus_openapi-1.0.0.4-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 821.1 kB
Release files / lanxinplus-openapi-1.0.0.4.tar.gz
| Download URL | lanxinplus-openapi-1.0.0.4.tar.gz |
|---|---|
| Size | 91.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
327ddbc5f999ac08993c7df68c85681de286935b33d453fc494cb0fe03a883d3
|
|
BLAKE2b-256 checksum How to use checksums |
af1cbf147dfbd01b0ca33b88980e0fff0807b0fa8d79229d88fa72fe32a40417
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.2
|
Release files / lanxinplus_openapi-1.0.0.4-py3-none-any.whl
| Download URL | lanxinplus_openapi-1.0.0.4-py3-none-any.whl |
|---|---|
| Size | 364.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
70bcbac78dbeee192c3865d22cb060a0402244ad0a4bece8faac1fba69bb3329
|
|
BLAKE2b-256 checksum How to use checksums |
ec4a48617f3cdbf8b013fa76c28cf22eb951f78cc2dec586febe605a2dac5db4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.2
|
Release files / lanxinplus_openapi-1.0.0.4-py2.py3-none-any.whl
| Download URL | lanxinplus_openapi-1.0.0.4-py2.py3-none-any.whl |
|---|---|
| Size | 364.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
30745b83f327ec92833ae898773c3604dc2a3ea12e0360d2f4001a0beb7de486
|
|
BLAKE2b-256 checksum How to use checksums |
afc5933f2bab3044b96da88531c277d22edf0a06edaa453f419e1cec29fe12cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.2
|