Skip to main content

Azure Functions ASGI adapter

Project description

Bonnette

ASGI adapter for Azure Functions.

Package version Build Status

This adapter was originally part of Mangum, an adapter for ASGI support on AWS Lambda & API Gateway.

Requirements: Python 3.6

Installation

pip3 install bonnette

Example

Bonnette consists of a single adapter class for using ASGI applications on Azure Functions.

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>",
        }
    )

handler = Bonnette(app)

Dependencies

azure-functions - required for Azure Function support.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bonnette-0.0.2.tar.gz (3.4 kB view details)

Uploaded Source

File details

Details for the file bonnette-0.0.2.tar.gz.

File metadata

  • Download URL: bonnette-0.0.2.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.6.8rc1

File hashes

Hashes for bonnette-0.0.2.tar.gz
Algorithm Hash digest
SHA256 179e84517d924a7030428ca0cfafb2f9a012a6caad09007f550d6319a2e9e217
MD5 c6c2211bb79ba951454ef9b46b192e79
BLAKE2b-256 6cb15f0ed42a982cc455affab8a4062124400128ca0c46c6e5793e5076787bae

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page