$npx skillfedfor your agent

starlette-prometheus

Prometheus integration for Starlette

With conditionsPyPI Software DevelopmentReleased Sep 2024432.5K downloads / moGPL-3.0+Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — starlette_prometheus-0.10.0-py3-none-any.whl
v0.10.0 · released 2024-09-03 · Python <4.0,>=3.8 · 2 runtime deps: starlette, prometheus_client

Yes, if you need Prometheus metrics for a Starlette application and accept the GPL-3.0+ copyleft license. Install friction is low and the package is stable. However, dormant maintenance means you should verify compatibility with your Starlette version and be prepared to fork or patch if issues arise. Not suitable if your project cannot comply with GPL-3.0+ licensing.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.8+ and Starlette 0.12+.
  • Unfiltered unhandled paths can lead to unbounded memory use; use filter_unhandled_paths=True if needed.
  • Low install friction with only two runtime dependencies (starlette and prometheus_client).

License · maintenance · safety

GPL-3.0+ (copyleft) — Licensed under GPL-3.0+, a copyleft license. Any application using this package must comply with GPLv3+ terms, including potential source code disclosure obligations if you distribute the application.

last release 2024-09-03 (710 days) · last repo commit 2024-05-20 · 378 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 432,478 downloads/mo, #6,708 on PyPI

Verify before relying

pip install starlette-prometheus

from starlette.applications import Starlette
from starlette_prometheus import metrics, PrometheusMiddleware

app = Starlette()
app.add_middleware(PrometheusMiddleware)
app.add_route("/metrics/", metrics)
  • Whether the package is actively maintained or seeking new maintainers despite dormant status.
  • Performance impact of metrics collection on high-throughput applications.
  • Compatibility with recent Starlette versions beyond what the classifiers declare.
Same gist for agents: .md · .json

What it is and what it does

Starlette Prometheus is a middleware package that integrates Prometheus metrics collection into Starlette web applications. It automatically instruments HTTP requests and responses, collecting metrics like request counts, latencies, and response codes, then exposes them via a `/metrics/` endpoint that Prometheus can scrape. The package wraps Starlette's middleware system to intercept requests transparently.

The package depends on starlette and prometheus_client to function. It's straightforward to set up—add the middleware and route the metrics endpoint—but requires careful configuration when handling dynamic or unmatched routes, as unfiltered path tracking can consume unbounded memory. The package supports Python 3.8 through 3.12 and is marked Production/Stable, though development has been dormant since its last release.

Use it for

  • Expose HTTP request metrics to Prometheus for monitoring Starlette application performance and availability.
  • Track request latency, error rates, and throughput to feed into alerting and dashboarding systems.
  • Debug and profile application behavior by analyzing request patterns and response times over time.
  • Integrate observability into microservices built with Starlette without writing custom instrumentation code.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need Prometheus metrics for a Starlette application and accept the GPL-3.0+ copyleft license.

Install friction is low and the package is stable. However, dormant maintenance means you should verify compatibility with your Starlette version and be prepared to fork or patch if issues arise. Not suitable if your project cannot comply with GPL-3.0+ licensing.

Install

starlette-prometheus on PyPI

Before you install

Low install friction with only two runtime dependencies (starlette and prometheus_client). Maintenance is dormant—last release was over 710 days ago, though the repository remains active and the package is marked Production/Stable.

Requires Python 3.8+ and Starlette 0.12+. Unfiltered unhandled paths can lead to unbounded memory use; use filter_unhandled_paths=True if needed.

License in practice

Licensed under GPL-3.0+, a copyleft license. Any application using this package must comply with GPLv3+ terms, including potential source code disclosure obligations if you distribute the application.

Quickstart

pip install starlette-prometheus

from starlette.applications import Starlette
from starlette_prometheus import metrics, PrometheusMiddleware

app = Starlette()
app.add_middleware(PrometheusMiddleware)
app.add_route("/metrics/", metrics)

Verify before relying

  • Whether the package is actively maintained or seeking new maintainers despite dormant status.
  • Performance impact of metrics collection on high-throughput applications.
  • Compatibility with recent Starlette versions beyond what the classifiers declare.

Package facts

LicenseGPL-3.0+ copyleft
Python supportSupports the current Python release <4.0,>=3.8
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
starletteprometheus_client
MaintenanceDormant 710 days since the last release
Last repo commit
First released
Downloads432,478 / month, #6,708 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTP :: HTTP ServersTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Application Frameworks

Evidence: starlette_prometheus-0.10.0-py3-none-any.whl

Tags

Capabilities
prometheus metrics starlettestarlette monitoring instrumentationhttp metrics collectionprometheus middlewarestarlette observabilityrequest metrics exposureprometheus http integration
Topics
observabilityprometheusmiddleware
PyPI keywords
starletteprometheusmetrics

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “prometheus metrics starlette”

  • starlette-prometheusAdds Prometheus metrics collection and exposure to Starlette web…
  • aioprometheusA Prometheus client library for asyncio applications that collects…
  • starlette-exporterCollects and exports Prometheus metrics for Starlette and FastAPI…

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also starlette-exporter · aioprometheus · prometheus-fastapi-instrumentator · prometheus-client · oslo.metrics · airflow-exporter · django-prometheus · prometheus-async · starlette-context · starlette-testclient