prometheus-async
prometheus-async adds support for asynchronous frameworks to the official Python client for the Prometheus metrics and monitoring system.
Currently asyncio and Twisted are supported.
It works by wrapping the metrics from the official client:
import asyncio
from aiohttp import web
from prometheus_client import Histogram
from prometheus_async.aio import time
REQ_TIME = Histogram("req_time_seconds", "time spent in requests")
@time(REQ_TIME)
async def req(request):
await asyncio.sleep(1)
return web.Response(body=b"hello")
Even for synchronous applications, the metrics exposure methods can be useful since they are more powerful than the one shipped with the official client. For that, helper functions have been added that run them in separate threads (asyncio-only).
The source code is hosted on GitHub and the documentation on Read the Docs.
Credits
prometheus-async is written and maintained by Hynek Schlawack.
The development is kindly supported by my employer Variomedia AG, prometheus-async’s Tidelift subscribers, and all my amazing GitHub Sponsors.
prometheus-async for Enterprise
Available as part of the Tidelift Subscription.
The maintainers of prometheus-async and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use.
Metadata
Release files for prometheus-async 26.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| prometheus_async-26.1.0.tar.gz | 38.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| prometheus_async-26.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 56.9 kB
Release files / prometheus_async-26.1.0.tar.gz
| Download URL | prometheus_async-26.1.0.tar.gz |
|---|---|
| Size | 38.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
71b0868ed95ddb3bf8275b19e681f8730ac2a9a0e2df06923ebc4943dcc1b83b
|
|
BLAKE2b-256 checksum How to use checksums |
3a36b28785a5639095d889f04bf06bf0e89cb700a2766604f03f6445d0bac4ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.
Transparency logRelease files / prometheus_async-26.1.0-py3-none-any.whl
| Download URL | prometheus_async-26.1.0-py3-none-any.whl |
|---|---|
| Size | 18.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fde2ab74a5a7df2b9a93666d68bae4c760950e71f50786645d3b26e2cd749a36
|
|
BLAKE2b-256 checksum How to use checksums |
27032b2a24228a5fef41fa727c83880efc097be318ba7e247d2243c222bba235
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.
Transparency log