Metadata-Version: 2.1
Name: starlette-x-bugsnag
Version: 0.1.2
Summary: Shiny Bugsnag integration for Starlette framework
Home-page: https://github.com/2tunnels/starlette-x-bugsnag
License: MIT
Keywords: starlette,bugsnag,asgi
Author: Vlad Dmitrievich
Author-email: me@2tunnels.com
Requires-Python: >=3.6,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: System :: Logging
Classifier: Topic :: System :: Networking
Classifier: Typing :: Typed
Requires-Dist: bugsnag (>=3.6.1,<4.0.0)
Requires-Dist: importlib-metadata (>=1.6.1,<2.0.0)
Requires-Dist: starlette (>=0.13.4,<0.14.0)
Project-URL: Repository, https://github.com/2tunnels/starlette-x-bugsnag
Description-Content-Type: text/markdown

# starlette-x-bugsnag

Shiny Bugsnag integration for Starlette framework ✨

![test](https://github.com/2tunnels/starlette-x-bugsnag/workflows/test/badge.svg?branch=master)
![version](https://img.shields.io/pypi/v/starlette-x-bugsnag.svg)
![pyversions](https://img.shields.io/pypi/pyversions/starlette-x-bugsnag.svg)
![black](https://img.shields.io/badge/code%20style-black-000000.svg)
![license](https://img.shields.io/pypi/l/starlette-x-bugsnag)

Installation:

```sh
pip install starlette-x-bugsnag
```

Usage:

```python
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")
```

