# Starlette Prometheus
[![Build Status](https://github.com/perdy/starlette-prometheus/workflows/Continuous%20Integration/badge.svg)](https://github.com/perdy/starlette-prometheus/actions)
[![Package Version](https://img.shields.io/pypi/v/starlette-prometheus?logo=PyPI&logoColor=white)](https://pypi.org/project/starlette-prometheus/)
[![PyPI Version](https://img.shields.io/pypi/pyversions/starlette-prometheus?logo=Python&logoColor=white)](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.
Raw data
{
"_id": null,
"home_page": "https://github.com/PeRDy/starlette-prometheus",
"name": "starlette-prometheus",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": "starlette, prometheus, metrics",
"author": "Jos\u00e9 Antonio Perdiguero L\u00f3pez",
"author_email": "perdy@perdy.io",
"download_url": "https://files.pythonhosted.org/packages/89/f2/03fc6b3c10fb436c81ee567ac46c49418819d6901101ece7bd45be465162/starlette_prometheus-0.10.0.tar.gz",
"platform": null,
"description": "# Starlette Prometheus\n[![Build Status](https://github.com/perdy/starlette-prometheus/workflows/Continuous%20Integration/badge.svg)](https://github.com/perdy/starlette-prometheus/actions)\n[![Package Version](https://img.shields.io/pypi/v/starlette-prometheus?logo=PyPI&logoColor=white)](https://pypi.org/project/starlette-prometheus/)\n[![PyPI Version](https://img.shields.io/pypi/pyversions/starlette-prometheus?logo=Python&logoColor=white)](https://pypi.org/project/starlette-prometheus/)\n\n## Introduction\n\nPrometheus integration for Starlette.\n\n## Requirements\n\n* Python 3.8+\n* Starlette 0.12+\n\n## Installation\n\n```console\n$ pip install starlette-prometheus\n```\n\n## Usage\n\nA complete example that exposes prometheus metrics endpoint under `/metrics/` path.\n\n```python\nfrom starlette.applications import Starlette\nfrom starlette_prometheus import metrics, PrometheusMiddleware\n\napp = Starlette()\n\napp.add_middleware(PrometheusMiddleware)\napp.add_route(\"/metrics/\", metrics)\n```\n\nMetrics for paths that do not match any Starlette route can be filtered by passing\n`filter_unhandled_paths=True` argument to `add_middleware` method. Note that not\nturning on this filtering can lead to unbounded memory use when lots of different\nroutes are called.\n\n## Contributing\n\nThis project is absolutely open to contributions so if you have a nice idea, create an issue to let the community \ndiscuss it.\n",
"bugtrack_url": null,
"license": "GPL-3.0+",
"summary": "Prometheus integration for Starlette",
"version": "0.10.0",
"project_urls": {
"Homepage": "https://github.com/PeRDy/starlette-prometheus",
"Repository": "https://github.com/PeRDy/starlette-prometheus"
},
"split_keywords": [
"starlette",
" prometheus",
" metrics"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1040244a5eba1a1d0393b9eea768afee74ab8e0d7d0e99299edbcafe22ef65f7",
"md5": "fde9c2d9de4f169bb692befc450f38ad",
"sha256": "8b2f997495f809f01387378dad5476b2a1cf2fb2d9b96164394effdecb2d8380"
},
"downloads": -1,
"filename": "starlette_prometheus-0.10.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fde9c2d9de4f169bb692befc450f38ad",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 16333,
"upload_time": "2024-09-03T09:48:15",
"upload_time_iso_8601": "2024-09-03T09:48:15.876127Z",
"url": "https://files.pythonhosted.org/packages/10/40/244a5eba1a1d0393b9eea768afee74ab8e0d7d0e99299edbcafe22ef65f7/starlette_prometheus-0.10.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "89f203fc6b3c10fb436c81ee567ac46c49418819d6901101ece7bd45be465162",
"md5": "497a9a3fdc1f1abcc3065e98ad592d6a",
"sha256": "77d1e9cfad572206e8de242975bd00a62e33685eb330389f2add04e4d719d47d"
},
"downloads": -1,
"filename": "starlette_prometheus-0.10.0.tar.gz",
"has_sig": false,
"md5_digest": "497a9a3fdc1f1abcc3065e98ad592d6a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 15712,
"upload_time": "2024-09-03T09:48:17",
"upload_time_iso_8601": "2024-09-03T09:48:17.425860Z",
"url": "https://files.pythonhosted.org/packages/89/f2/03fc6b3c10fb436c81ee567ac46c49418819d6901101ece7bd45be465162/starlette_prometheus-0.10.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-03 09:48:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "PeRDy",
"github_project": "starlette-prometheus",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "starlette-prometheus"
}