bareasgi-prometheus-4.2.0
توضیحات
Prometheus metrics for bareASGI
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | bareasgi-prometheus-4.2.0 |
| نام | bareasgi-prometheus |
| نسخه کتابخانه | 4.2.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Rob Blackbourn |
| ایمیل نویسنده | rob.blackbourn@gmail.com |
| آدرس صفحه اصلی | https://github.com/rob-blackbourn/bareASGI-prometheus |
| آدرس اینترنتی | https://pypi.org/project/bareasgi-prometheus/ |
| مجوز | Apache-2.0 |
# 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)
```
نیازمندی
| مقدار | نام |
|---|---|
| >=4.0.0,<5.0.0 | bareASGI |
| >=0.13,<0.14 | prometheus_client |
| >=1,<2 | jetblack-metrics |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8,<4.0 | Python |
نحوه نصب
نصب پکیج whl bareasgi-prometheus-4.2.0:
pip install bareasgi-prometheus-4.2.0.whl
نصب پکیج tar.gz bareasgi-prometheus-4.2.0:
pip install bareasgi-prometheus-4.2.0.tar.gz