starlette-prometheus-0.9.0
توضیحات
Prometheus integration for Starlette
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | starlette-prometheus-0.9.0 |
| نام | starlette-prometheus |
| نسخه کتابخانه | 0.9.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | José Antonio Perdiguero López |
| ایمیل نویسنده | perdy@perdy.io |
| آدرس صفحه اصلی | https://github.com/PeRDy/starlette-prometheus |
| آدرس اینترنتی | https://pypi.org/project/starlette-prometheus/ |
| مجوز | GPL-3.0+ |
# Starlette Prometheus
[](https://github.com/perdy/starlette-prometheus/actions)
[](https://pypi.org/project/starlette-prometheus/)
[](https://pypi.org/project/starlette-prometheus/)
## Introduction
Prometheus integration for Starlette.
## Requirements
* Python 3.8+
* Starlette 0.12+
## Installation
```console
$ pip install starlette-prometheus
```
## Usage
A complete example that exposes prometheus metrics endpoint under `/metrics/` path.
```python
from starlette.applications import Starlette
from starlette_prometheus import metrics, PrometheusMiddleware
app = Starlette()
app.add_middleware(PrometheusMiddleware)
app.add_route("/metrics/", metrics)
```
Metrics for paths that do not match any Starlette route can be filtered by passing
`filter_unhandled_paths=True` argument to `add_middleware` method. Note that not
turning on this filtering can lead to unbounded memory use when lots of different
routes are called.
## Contributing
This project is absolutely open to contributions so if you have a nice idea, create an issue to let the community
discuss it.
نیازمندی
| مقدار | نام |
|---|---|
| - | starlette>=0.12.2 |
| - | prometheus_client>=0.12 |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| <4.0,>=3.8 | Python |
نحوه نصب
نصب پکیج whl starlette-prometheus-0.9.0:
pip install starlette-prometheus-0.9.0.whl
نصب پکیج tar.gz starlette-prometheus-0.9.0:
pip install starlette-prometheus-0.9.0.tar.gz