python中开放配对微服务的sdk
sage-utils的Python项目详细描述
python中用于开放配对微服务的sdk
功能
- 与框架无关的解决方案
- 编写新扩展并在以后与代码一起使用很容易
- 实现amqp工作者的基类
- 在开放式配对平台中注册新的微服务
安装
此软件包应使用pip:
pip install sage-utils
示例
fromsanicimportSanicfromsage_utils.extensionimportBaseExtensionclassCustomExtension(BaseExtension):extension_name=app_attribute='custom'defhello(self,user):print("Hello, {}!".format(user))app=Sanic(__name__)CustomExtension()# available via `app.custom` or `app.extensions['custom']`app.custom.hello('world')# Hello, world!
许可证
sage utils python是在bsd许可下发布的。有关详细信息,请阅读LICENSE文件。