{"id":13424765,"url":"https://github.com/perdy/starlette-prometheus","last_synced_at":"2025-05-16T03:06:09.854Z","repository":{"id":41904698,"uuid":"165087274","full_name":"perdy/starlette-prometheus","owner":"perdy","description":"Prometheus integration for Starlette.","archived":false,"fork":false,"pushed_at":"2024-05-20T15:57:03.000Z","size":206,"stargazers_count":289,"open_issues_count":14,"forks_count":32,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-10T15:02:39.888Z","etag":null,"topics":["asgi","metrics","middleware","prometheus","starlette"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/perdy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-10T15:49:38.000Z","updated_at":"2025-02-22T16:34:37.000Z","dependencies_parsed_at":"2024-06-18T15:16:07.411Z","dependency_job_id":"56fe6261-f5c8-4785-8233-63e8b98c6835","html_url":"https://github.com/perdy/starlette-prometheus","commit_stats":{"total_commits":54,"total_committers":18,"mean_commits":3.0,"dds":0.4444444444444444,"last_synced_commit":"3d2f82e136116c78c66db653b6f6a0b262ad6d89"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perdy%2Fstarlette-prometheus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perdy%2Fstarlette-prometheus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perdy%2Fstarlette-prometheus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perdy%2Fstarlette-prometheus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perdy","download_url":"https://codeload.github.com/perdy/starlette-prometheus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254459088,"owners_count":22074605,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asgi","metrics","middleware","prometheus","starlette"],"created_at":"2024-07-31T00:00:58.982Z","updated_at":"2025-05-16T03:06:04.834Z","avatar_url":"https://github.com/perdy.png","language":"Python","funding_links":[],"categories":["Third-Party Extensions","Extensions","Monitoring"],"sub_categories":["Utils","Other","APM \u0026 Monitoring"],"readme":"# 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\u0026logoColor=white)](https://pypi.org/project/starlette-prometheus/)\n[![PyPI Version](https://img.shields.io/pypi/pyversions/starlette-prometheus?logo=Python\u0026logoColor=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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperdy%2Fstarlette-prometheus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperdy%2Fstarlette-prometheus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperdy%2Fstarlette-prometheus/lists"}