允许使用公共代码库创建restapi和CLI
apicli的Python项目详细描述
阿皮克利
ApiCli is a python library that allow using a common code-base to create a REST API and a CLI that can interact with your API.
待办事项
- 从使用装饰器定义的路由创建端点
- 从API端提出至少承载认证
- 启用时公开API终结点以管理身份验证
- 定义从CLI进行身份验证的命令
贡献
使用pipenv安装项目依赖项。这将从本地文件夹以可编辑模式安装apicli。在
pipenv install
如果您想测试生成的openapi文档,可以使用swaggerui。在
- 如果
swagger-ui/
子模块为空,则使用以下命令初始化子模块
- 然后在
swagger-ui/
文件夹中,安装依赖项并使用命令运行web界面
npm run dev
默认情况下,swagger ui将在http://localhost:3200
- 如果希望UI自动从本地apicli服务器打开规范,请编辑
swagger-ui/dev-helpers/index.html
- 项目
标签: