FastAPI middleware for collecting and exposing Prometheus metrics.
Project description
fw-http-metrics
FastAPI middleware for collecting and exposing Prometheus metrics.
Installation
Add as a poetry
dependency to your project:
poetry add fw-http-metrics
Usage
from fastapi import FastAPI
from fw_http_metrics import MetricsMiddleware, get_metrics
app = FastAPI()
app.add_middleware(MetricsMiddleware)
app.add_route("/metrics", get_metrics)
Development
Install the project using poetry
and enable pre-commit
:
poetry install
pre-commit install
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for fw_http_metrics-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a37db4dfe182afa1c4547fb9558c07298836ca0fba61c031872d778cec681c29 |
|
MD5 | 8ed41928178d7cce95061523c75916d9 |
|
BLAKE2b-256 | 063dd595486c800a4aa02dc4311acced88866571261b9c8943be8334c16b3d3d |