Metadata-Version: 2.1
Name: bareasgi-prometheus
Version: 3.6.0
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
Requires-Dist: bareASGI (>=3.0,<4.0)
Requires-Dist: baretypes (>=3.0.5,<4.0.0)
Requires-Dist: bareutils (>=3.1,<4.0)
Requires-Dist: jetblack-metrics (>=1.0,<2.0)
Requires-Dist: prometheus_client (>=0.7.1,<0.8.0)
Project-URL: Repository, https://github.com/rob-blackbourn/bareASGI-prometheus
Description-Content-Type: text/markdown

# bareASGI-prometheus

Prometheus metrics for bareASGI

## 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)
```

