Shiny Bugsnag integration for Starlette framework
Project description
starlette-x-bugsnag
Shiny Bugsnag integration for Starlette framework ✨
Installation:
pip install starlette-x-bugsnag
Usage:
from starlette.applications import Starlette
from starlette.middleware import Middleware
from starlette.requests import Request
from starlette.responses import JSONResponse
from starlette.routing import Route
from starlette_x_bugsnag.middleware import BugsnagMiddleware
async def home(request: Request) -> JSONResponse:
return JSONResponse({"message": "Hello world!"})
routes = [Route("/", home)]
# Using application constructor
application = Starlette(
routes=routes, middleware=[Middleware(BugsnagMiddleware, api_key="secret")],
)
# Or using add_middleware method
application.add_middleware(BugsnagMiddleware, api_key="secret")
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
Built Distribution
Close
Hashes for starlette-x-bugsnag-0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8273f55ef1d9f744d56834ca2ee598138168185c40196d9e9701565a5e5c3135 |
|
MD5 | 428832d42d93800b443dffa055f9626d |
|
BLAKE2b-256 | f7b1db226d8ce9a74701e0ccf2989e31bce8c81578c89f10a249b00c3b487aa1 |
Close
Hashes for starlette_x_bugsnag-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 877161b2c7667e40434b9a9c29d80ebfd8f4f314a08048c88fb6b403cc019c5e |
|
MD5 | e446bdb23bf263d354b7b4ad1e68c0ac |
|
BLAKE2b-256 | 7e48728185780db9429c79ca6982a7367365de7001c21452195a368baed7a8a6 |