Skip to main content

asgi-debug

PyPI CircleCI License

ASGI middleware for debugging ASGI applications

Installation

pip install asgi-debug

Usage

Wrap your application in the middleware like this:

from asgi_debug import asgi_debug_decorator


@asgi_debug_decorator()
async def hello_world_app(scope, receive, send):
    assert scope["type"] == "http"
    await send(
        {
            "type": "http.response.start",
            "status": 200,
            "headers": [[b"content-type", b"application/json"]],
        }
    )
    await send({"type": "http.response.body", "body": b'{"hello": "world"}'})

When you run the app, debugging information will print to your terminal.

If you save the above in demo.py you can pip install uvicorn and run it like this:

uvicorn demo:hello_world_app

Metadata

Release files for asgi-debug 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for asgi-debug 0.1
File Interpreter ABI Platform Actions
asgi_debug-0.1-py3-none-any.whl Python 3 none any Details for asgi_debug-0.1-py3-none-any.whl

Release files / asgi_debug-0.1-py3-none-any.whl

Download URL asgi_debug-0.1-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c59d50ec333c54f986ce436a19b93029355c692d17683d5b5a46ab27dcd87d5d
BLAKE2b-256 checksum
How to use checksums
234aab2fbfb9e718adf4488433f4f722d77fb8949d7fdfaab93f0d298981fd6d
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.32.2 CPython/3.6.8

Security for asgi-debug 0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page