Skip to main content

No project description provided

Project description


Bugsnag integration for Starlette ASGI framework.


pip install starlette-bugsnag


from starlette_bugsnag import BugsnagMiddleware
import bugsnag


app = ...
app = BugsnagMiddleware(app)

Here's a more complete example using Starlette and uvicorn:

import bugsnag
import os
import uvicorn

from starlette_bugsnag import BugsnagMiddleware
from starlette.applications import Starlette
from starlette.responses import PlainTextResponse

bugsnag.configure(api_key=os.getenv('BUGSNAG_API_KEY'), project_root=os.getcwd())

app = Starlette()
app.add_middleware(BugsnagMiddleware, debug=False)

def index(request):
    return PlainTextResponse("Hello World")

def raiser(request):
    raise ValueError("This Is an Error")

if __name__ == "__main__":, host="", port=8000)

See examples for more.

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

starlette-bugsnag-0.2.1.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

starlette_bugsnag-0.2.1-py3-none-any.whl (5.7 kB view hashes)

Uploaded Python 3

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