Bonnette
ASGI adapter for Azure Functions.
Requirements: Python 3.6
Installation
pip3 install bonnette
Example
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)
Release files for bonnette 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bonnette-0.1.1.tar.gz | 3.8 kB | Details |
Release files / bonnette-0.1.1.tar.gz
| Download URL | bonnette-0.1.1.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
70ef837c523bce1785bfd43400311c73bed4971884b30d21583e067e0b28e2cf
|
|
BLAKE2b-256 checksum How to use checksums |
e258440a1dadad51d86a69592eca4822840b6f7f4659c695637dc5fcc43e01b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.34.0 CPython/3.6.8rc1
|