基于 python3.5+ 的 web 服务器 Sanic

码农软件 · 软件分类 · Web框架 · 2019-03-25 16:58:31

软件介绍

Sanic 是一个基于 Python 3.5+ 的 Web 服务器,与 Flask 有点类似,特点是速度非常快。

速度对比

所有测试都在运行 ubuntu 的 AWS 介质实例上运行,使用1个进程。 每个脚本都传递了一个小的 JSON 响应,并使用100个连接使用 wrk 进行测试。 

Hello World 示例

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)

本文地址:https://codercto.com/soft/d/2135.html

DOM Scripting

DOM Scripting

Jeremy Keith / friendsofED / 2010-12 / GBP 27.50

There are three main technologies married together to create usable, standards-compliant web designs: XHTML for data structure, Cascading Style Sheets for styling your data, and JavaScript for adding ......一起来看看 《DOM Scripting》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

URL 编码/解码
URL 编码/解码

URL 编码/解码