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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59d95146173e9c9f400e95e8366980a483a287a188ab83405f46d5cdf08f6b43 |
|
MD5 | 70333450f8f61c7eec2c35001d9d5b02 |
|
BLAKE2b-256 | 3f66ad54e4bc89c76ec02cf149b5603930738ccf6551dce8e537445234f1de8b |
Close
Hashes for starlette_x_bugsnag-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 502d3cd513de980e4b2937126c25c1e5e7c1728a90c41a97e12a56e32e87666d |
|
MD5 | b9ab33025e1b3f79589e5becacca1e49 |
|
BLAKE2b-256 | 13dd525664a7542e4c9081cc6914ce410478449924375a7839a1abb355e28a44 |