用于开发wsgi应用程序的命令行接口。
wsgicli的Python项目详细描述
用于开发wsgi应用程序的命令行接口。 此库具有以下功能。
在wsgiref中运行wsgi应用程序
- 使用指定的主机和端口运行wsgi应用程序。
- 提供静态文件。
- 实时重新加载。
- 逐行分析。
- 验证您的wsgi应用程序是否符合pep3333规范。
运行python解释器
- 支持的解释器有python(普通)、ipython、bpython、ptpython和ptpython。
- 运行解释器时自动导入sqlalchemy和peewee模型。
命令
运行命令
概要
$ wsgicli run [FILEPATH][WSGIAPP][Options]
No | Arguments | Environment Variable | Description |
---|---|---|---|
1 | FILEPATH | ^{tt1}$ | The file path for your WSGI application. |
2 | WSGIAPP | ^{tt2}$ | The variable name of your wsgi application object. |
Options | Environment Variable | Default | Description |
---|---|---|---|
^{tt3}$ ^{tt4}$ | ^{tt5}$ | ^{tt6}$ | The hostname to bind to. |
^{tt7}$ ^{tt8}$ | ^{tt9}$ | 8000 | The port to bind to. |
^{tt10}$ / ^{tt11}$ | ^{tt12}$ | False | Enable live reloading. |
^{tt13}$ | ^{tt14}$ | 1 | Interval time to check file changed for reloading (sec). |
^{tt15}$ / ^{tt16}$ | ^{tt17}$ | False | Enable static file serving. |
^{tt18}$ | ^{tt19}$ | ^{tt20}$ | URL path to static files. |
^{tt21}$ | ^{tt22}$ | ^{tt23}$ | Directories to static files (multiple). |
^{tt24}$ / ^{tt25}$ | ^{tt26}$ | False | Enable line profiler. |
^{tt27}$ | ^{tt28}$ | WSGIAPP(2nd arg) | The filename profiled by line-profiler. |
^{tt29}$ / ^{tt30}$ | ^{tt31}$ | False | Validating your WSGI application complying with PEP3333. |
^{tt32}$ | Show help text. |
示例
$ wsgicli run main.py app -p 8080 --reload
shell命令
概要
$ wsgicli shell [FILEPATH][WSGIAPP][Options]
No | Arguments | Environment Variable | Description |
---|---|---|---|
1 | FILEPATH | ^{tt33}$ | The file path for your WSGI application. |
2 | WSGIAPP | ^{tt2}$ | The variable name of your wsgi application object. |
Options | Environment Variable | Default | Description |
---|---|---|---|
^{tt35}$ ^{tt36}$ | ^{tt37}$ | ^{tt38}$ | Supported interpreters are ipython, bpython, ptpython and ptipython. |
^{tt39}$ / ^{tt40}$ | ^{tt41}$ | True | Automatically import ORM table definition from your app. |
^{tt32}$ | Show help text. |
示例
$ wsgicli shell main.py app --interpreter ipython
要求
- python 3.3或更高版本
- 单击
- wsgi静态中间件
- wsgi lineprof
许可证
这个软件是根据麻省理工学院的许可证授权的。