Below you will find pages that utilize the taxonomy term “Sanic”
Posts
Create web app with Python sanic
sanic 是一个轻量、快速的python web框架,提供与Flask 类似的API, 创建restful API接口超轻松。
简单示例
from sanic import Sanic
from sanic.response import text
app = Sanic("MyHelloWorldApp")
@app.get("/")
async def hello_world(request):
return text("Hello, world.")
if __name__ == '__main__':
app.run(debug=True, access_log=True)