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_root=None, # Save traceback not only from the current directory
),
],
)
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file starlette-x-bugsnag-0.1.6.tar.gz.
File metadata
- Download URL: starlette-x-bugsnag-0.1.6.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.10 CPython/3.8.5 Linux/5.4.0-42-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9003055f9279069323db9427a499eee9059f9ecf5c153dd7749e605b26e3e783
|
|
| MD5 |
ac9351e116b62ec76e0e338776a1d712
|
|
| BLAKE2b-256 |
4749a0345a73862b05d7cafa9fb9dc29a21e2ccd72d679fe4b919b929960f485
|
File details
Details for the file starlette_x_bugsnag-0.1.6-py3-none-any.whl.
File metadata
- Download URL: starlette_x_bugsnag-0.1.6-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.10 CPython/3.8.5 Linux/5.4.0-42-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cceb96a8117f93f6a6b63c7a5bc08d7724a63d960c266010b54a1265524595d
|
|
| MD5 |
edbe05b18739d53d52305767cd878449
|
|
| BLAKE2b-256 |
9b4b46acc6beaa031fbfd992170e552d17de48a8514a0e436875bba3c7b1cf46
|