Metadata-Version: 2.1
Name: bareasgi-prometheus
Version: 3.6.1
Summary: Prometheus metrics for bareASGI
Home-page: https://github.com/rob-blackbourn/bareASGI-prometheus
License: Apache-2.0
Author: Rob Blackbourn
Author-email: rob.blackbourn@gmail.com
Requires-Python: >=3.7,<4.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Requires-Dist: bareASGI (>=3,<4)
Requires-Dist: jetblack-metrics (>=1,<2)
Requires-Dist: prometheus_client (>=0.7,<0.8)
Project-URL: Repository, https://github.com/rob-blackbourn/bareASGI-prometheus
Description-Content-Type: text/markdown

# bareASGI-prometheus

[Prometheus](https://prometheus.io/) metrics for bareASGI (read the [docs](https://rob-blackbourn.github.io/bareASGI-prometheus/)).

## Installation

Install from the pie store

```bash
$ pip install bareASGI-prometheus
```

## Usage

The middleware can either be configured manually or with a helper.

### Manual Configuration

```python
from bareasgi import Application
from bareasgi_prometheus import PrometheusMiddleware, prometheus_view

...

prometheus_middleware = PrometheusMiddleware()
app = Application(middlewares=[prometheus_middleware])
app.http_router.add({'GET'}, '/metrics', prometheus_view)
```


### Helper Configuration

```python
from bareasgi import Application
from bareasgi_prometheus import add_prometheus_middleware

...

app = Application()
add_prometheus_middleware(app)
```

