使用twisted的web应用后端通用基本框架
txwebbackendbase的Python项目详细描述
使用twisted的web应用后端通用基本框架
- 自由软件:麻省理工学院
- 来源:https://github.com/Stibbons/txwebbackendbase
功能
不是twisted官方库的一部分的实用功能集,例如:
- txwebbackendbase.logging.setupLogger:设置彩色记录器(如果colorlog已安装)
- txwebbackendbase.request.[jsonify|dejsonify]:使用request/treq 发送或接收json
- txwebbackendbase.singleton.singleton:将类声明为singleton,以便在整个应用程序中对其进行一次实例化
- txwebbackendbase.threading.deferredAsThread:函数decorator,用于在线程中运行阻塞函数
注:pipfile见pipenv documentation 规范。
贡献
使用
$ make dev
激活环境:
$ make shell
直接在环境中执行命令:
$ make run
执行单元测试:
$ make test-unit
生成源包:
Use it for most package without low level system dependencies.
make pypi
生成二进制包:
Needed for package with a C or other low level source code.
make bdist
制造车轮组件:
Always provide a wheel package.
make wheel
(仅限套餐拥有者)
创建发行版:
Go on GitHub and create a tag with a semver syntax. Optionally you can tag code locally and push to GitHub.
git tag 1.2.3 make push
On successful travis build on the Tag branch, your Pypi package will be updated automatically.