A Prometheus Python client library for asyncio-based applications
aioprometheus
aioprometheus is a Prometheus Python client library for asyncio-based applications. It provides metrics collection and serving capabilities, supports multiple data formats and pushing metrics to a gateway.
The project documentation can be found on ReadTheDocs.
Install
$ pip install aioprometheus
A Prometheus Push Gateway client and ASGI service are also included, but their dependencies are not installed by default. You can install them alongside aioprometheus by running:
$ pip install aioprometheus[aiohttp]
Prometheus 2.0 removed support for the binary protocol, so in version 20.0.0 the dependency on prometheus-metrics-proto, which provides binary support, is now optional. If you want binary response support, for use with an older Prometheus, you will need to specify the ‘binary’ optional extra:
$ pip install aioprometheus[binary]
Multiple optional dependencies can