| Build | |
|---|---|
| Package |
PyPI version
Supported implementations
Forums
Source code on GitHub | Installation
Hello World Example
from sanic import Sanic
from sanic.response import json
app = Sanic()
@app.route('/')
async def test(request):
return json({'hello': 'world'})
if __name__ == '__main__':
app.run(host='0.0.0.0', port=8000)
Sanic can now be easily run using [2018年12月30日 11:37:41 +0200] [13564] [INFO] Goin' Fast @ http://0.0.0.0:8000 [2018年12月30日 11:37:41 +0200] [13564] [INFO] Starting worker [13564] And, we can verify it is working:
HTTP/1.1 200 OK
Connection: keep-alive
Keep-Alive: 5
Content-Length: 17
Content-Type: application/json
{"hello":"world"}
Now, let's go build something fast! DocumentationWe are always happy to have new contributions. We have questions on the forums. Please take a look at our /pythonista/sanic
README
MIT
使用 MIT 开源许可协议
取消
发行版
暂无发行版
贡献者全部近期动态不能加载更多了
编辑仓库简介
简介内容
主页
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/pythonista/sanic.git
git@gitee.com:pythonista/sanic.git
pythonista
sanic
sanic
master
点此查找更多帮助
搜索帮助评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册
|