燃料库OpenAPI规范
bunker的Python项目详细描述
OpenAPI客户端
存储库服务的openapi规范
这个python包由OpenAPI Generator项目自动生成:
- API版本:0.1.1
- 软件包版本:1.0.0
- 构建包:org.openapitols.codegen.languages.pythonclientcodegen
要求。
python 2.7和3.4+
安装和使用
pip安装
如果python包托管在github上,则可以直接从github安装
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(您可能需要使用根权限运行pip
:sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
)
然后导入包:
importopenapi_client
设置工具
通过Setuptools安装。
python setup.py install --user
(或sudo python setup.py install
为所有用户安装软件包)
然后导入包:
importopenapi_client
开始
请按照installation procedure操作,然后运行以下命令:
from__future__importprint_functionimporttimeimportopenapi_clientfromopenapi_client.restimportApiExceptionfrompprintimportpprint# create an instance of the API classapi_instance=openapi_client.BunkerApi(openapi_client.ApiClient(configuration))person=openapi_client.Person()# Person | The user to create (optional)try:api_response=api_instance.create_person(person=person)pprint(api_response)exceptApiExceptionase:print("Exception when calling BunkerApi->create_person: %s\n"%e)
API端点文档
所有uri都与http://localhost:8080/v1
Class | Method | HTTP request | Description |
---|---|---|---|
BunkerApi | create_person | POST /persons | |
BunkerApi | delete_document | DELETE /persons/{person_id}/documents/{document_id} | |
BunkerApi | delete_face | DELETE /persons/{person_id}/faces/{face_id} | |
BunkerApi | delete_person | DELETE /persons/{person_id} | |
BunkerApi | delete_scan | DELETE /persons/{person_id}/scans/{scan_id} | |
BunkerApi | get_document | GET /persons/{person_id}/documents/{document_id} | |
BunkerApi | get_face | GET /persons/{person_id}/faces/{face_id} | |
BunkerApi | get_person | GET /persons/{person_id} | |
BunkerApi | get_scan | GET /persons/{person_id}/scans/{scan_id} | |
BunkerApi | request_scan | POST /persons/{person_id}/scans/ | |
BunkerApi | upload_document | POST /persons/{person_id}/documents/ | |
BunkerApi | upload_face | POST /persons/{person_id}/faces/ |
型号文档
授权文件
apikeyauth
- 类型:api键
- API密钥参数名:API key
- 位置:http头