Azure Functions的ASGI适配器
项目描述
Bonnette
Azure Functions的ASGI适配器。
需求:Python 3.6
安装
pip3 install bonnette
示例
import logging
import azure.functions as func
from bonnette import Bonnette
async def app(scope, receive, send):
assert scope["type"] == "http"
await send(
{
"type": "http.response.start",
"status": 200,
"headers": [[b"content-type", b"text/html; charset=utf-8"]],
}
)
await send(
{"type": "http.response.body", "body": b"<html><h1>Hello, world!</h1></html>"}
)
def main(req: func.HttpRequest) -> func.HttpResponse:
logging.info("Python HTTP trigger function processed a request.")
handler = Bonnette(app)
return handler(req)
项目详情
关闭
bonnette-0.1.1.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 70ef837c523bce1785bfd43400311c73bed4971884b30d21583e067e0b28e2cf |
|
MD5 | ce0409182d487341b50e9026dc66efdf |
|
BLAKE2b-256 | e258440a1dadad51d86a69592eca4822840b6f7f4659c695637dc5fcc43e01b1 |