Shiny Bugsnag integration for Starlette framework
Project description
starlette-x-bugsnag
Shiny Bugsnag integration for Starlette framework ✨
Scope details, local variables and installed packages will be attached to each event for ease of debugging.
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")
BugsnagMiddleware
accepts same arguments as bugsnag.configure
function, so you can pass additional information
about your app, such as app_version
.
application = Starlette(
routes=routes,
middleware=[
Middleware(
BugsnagMiddleware,
api_key="secret",
app_version="1.2.3",
release_stage="production",
),
],
)
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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9a5a949c898b9a392d6d187caa7bf7c2afe9f4667be8718b06781080132d145 |
|
MD5 | ef3531ae943b3589c755aa2950f45270 |
|
BLAKE2b-256 | 1d36e966c26084adb890b062a4fcdf46a86546d0d87a240d6608dcb68513a3dc |
Close
Hashes for starlette_x_bugsnag-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22e324c2aba660312925e145e7f7ea380356eddb1149596096e41ae7f94216ed |
|
MD5 | e5205b75366fde298bd8eb6afb15dff7 |
|
BLAKE2b-256 | 2e6e13bca80dab48315e514aa4bfc58ecb54b6b080323c5287d8f173ad4d9eb5 |