python库帮助构建restfulapi
restible的Python项目详细描述
restable是一个python库,用于为restapi创建一致的代码 跨越不同的框架。主要动机是 通常是由需求决定的,我想有一种简洁的写作方式 无论底层框架如何,api都是端点。
安装
$ pip install restible
贡献
注意
这个库的测试覆盖率相当高,但还没有达到100%。大的 部分代码是通过docstring记录的,但是 还没有编写文档,也没有任何教程。
克隆和建立开发回购协议
$ git clone git@github.com:novopl/restible.git $ cd restible $ virtualenv env $ source ./env/bin/activate $ pip install -r requirements.txt -r ops/devrequirements.txt $ peltak git add-hooks
运行测试
config:测试类型在pelconf.py和 pytest配置在ops/tools/pytest.ini中定义。
$ peltak test
起毛
config:要lint的位置列表在pelconf.py中定义,并且 linters配置在ops/tools/{pylint,pep8}.ini中定义。
$ peltak lint
生成文档
config:文档文件和常规配置的列表位于 pelconf.py,sphinx配置在docs/conf.py中定义。
$ peltak docs