ittybitty Python web框架。。。**现在为Python3重写!**
itty3的Python项目详细描述
itty3型
Python框架。。。现在为python3重写!
如果你在Python2上,你在寻找 itty for Python 2而不是。。。在
快速入门
importitty3# Make an app (mostly just for routing & niceties).app=itty3.App()# Register your views with the app.@app.get("/")defindex(request):returnapp.render(request,"Hello, world!")if__name__=="__main__":# Run a simple WSGI server!app.run()
为什么?在
itty3
是一个服务于web流量的微框架。在它的1.0.0
释放,itty3
在不到1k行代码的情况下进行了加权。在
当然,它建立在巨人的肩膀上,使用Python的大块 标准库。但它有no其他外部依赖项!在
{cd1}原因:
- 非常轻
- 快速开始工作
- 易于制作初始/玩具服务
- 最小样板
- 对于不能/没有完整的Python设置的地方非常有用
- 对于直接包含非常有用,例如当您缺少权限时
- 与各种WSGI服务器一起工作,包括Gunicorn
如果您需要生成一个大型应用程序,那么最好使用 Django, Flask,或者其他任何一个 更大/更成熟的web框架。没有压力!在
设置
pip install itty3
是大多数人想要的。在
也就是说,itty3
对于单个文件是完全自包含的
只在Python标准库上。您可以直接将itty3.py
复制到
您的项目并直接导入它!在
依赖关系
- Python 3.7+
许可证
新BSD
运行测试
^{pr2}$正在生成文档
$ pip install -r docs/requirements.txt
$ cd docs
$ make html
- 项目
标签: