基本API客户端库
base-api-client的Python项目详细描述
___ _ ___ ___ ___ _ _ _
| _ ) __ _ ___ ___ /_\ | _ \_ _| / __| (_)___ _ _| |_
| _ \/ _` (_-</ -_) / _ \| _/| | | (__| | / -_) ' \ _|
|___/\__,_/__/\___| /_/ \_\_| |___| \___|_|_\___|_||_\__|
rest api客户端的基本模块。
安装
pip install base-api-client
基本用法
此模块的主要用例是从其他rest api客户端继承。
frombase_api_clientimportBaseApiClientfromtypingimportOptional,UnionclassSomeApiClient(BaseApiClient):def__init__(self,cfg:Union[str,dict],sem:Optional[int]=None):BaseApiClient.__init__(self,cfg=cfg,sem=semorself.SEM)def__aenter__(self):returnselfdef__aexit__(self,exc_type,exc_val,exc_tb):awaitBaseApiClient.__aexit__(self,exc_type,exc_val,exc_tb)
文档
- 在制品
许可证
版权所有©2019 Jerod Gawne https://github.com/jerodg/
此程序是免费软件:您可以重新分发和/或修改 根据服务器端公共许可(SSPL)的条款 由MongoDB,Inc.发布,版本1 许可证,或(由您选择)任何更高版本。
这个程序的发布是希望它能有用, 但没有任何保证;甚至没有 适销性或适合某一特定目的的适销性。见 SSPL了解更多详细信息。
您应该已经收到了sspl的副本和这个程序。 如果没有,请参阅https://www.mongodb.com/licensing/server-side-public-license。