PyPI
pypi.org › project › prometheus-api-client
prometheus-api-client · PyPI
To help better understand these metrics we have created a Python wrapper for the Prometheus http api for easier metrics processing and analysis. The prometheus-api-client library consists of multiple modules which assist in connecting to a Prometheus host, fetching the required metrics and ...
» pip install prometheus-api-client
Published: Apr 13, 2026
Version: 0.7.2
Readthedocs
prometheus-api-client-python.readthedocs.io › en › latest › source › prometheus_api_client.html
prometheus_api_client package — Prometheus Client API Python 0.0.1 documentation
For example, setting it to timedelta(hours=3) will download 3 hours worth of data in each request made to the prometheus host · store_locally – (bool) If set to True, will store data locally at, “./metrics/hostname/metric_date/name_time.json.bz2” · params – (dict) Optional dictionary ...
05:42
PROMETHEUS Metrics for your Python FastAPI App - YouTube
Observing Python Applications Using Prometheus - Jessica ...
11:47
Introduction to Python monitoring with Prometheus - YouTube
31:57
Monitor Your Python Applications with Prometheus & Grafana - YouTube
GitHub
github.com › 4n4nd › prometheus-api-client-python
GitHub - 4n4nd/prometheus-api-client-python: A python wrapper for the prometheus http api · GitHub
Example: {“Authorization”: “bearer my_oauth_token_to_the_host”} disable_ssl – (bool) If set to True, will disable ssl certificate verification for the http requests made to the prometheus host · from prometheus_api_client import PrometheusConnect prom = PrometheusConnect(url ="<prometheus-host>", disable_ssl=True) # Get the list of all the metrics that the Prometheus host scrapes prom.all_metrics()
Starred by 274 users
Forked by 90 users
Languages: Python
client_python
prometheus.github.io › client_python
client_python
... from prometheus_client import start_http_server, Summary import random import time # Create a metric to track time spent and requests made. REQUEST_TIME = Summary('request_processing_seconds', 'Time spent processing request') # Decorate function with metric.
Readthedocs
prometheus-api-client-python.readthedocs.io › en › latest › _modules › prometheus_api_client › prometheus_connect.html
prometheus_api_client.prometheus_connect — Prometheus Client API Python 0.0.1 documentation
:param metric_name: (str) The name of the metric :param label_config: (dict) A dictionary that specifies metric labels and their values :param params: (dict) Optional dictionary containing GET parameters to be sent along with the API request, such as "time" :returns: (list) A list of current metric values for the specified metric :raises: (RequestException) Raises an exception in case of a connection error (PrometheusApiClientException) Raises in case of non 200 response status code Example Usage: ``prom = PrometheusConnect()`` ``my_label_config = {'cluster': 'my_cluster_id', 'label_2': 'label
Readthedocs
prometheus-api-client-python.readthedocs.io › en › latest
Welcome to Prometheus Client API Python’s documentation! — Prometheus Client API Python 0.0.1 documentation
Welcome to Prometheus Client API Python’s documentation!
Read the Docs
app.readthedocs.org › projects › prometheus-api-client-python
Prometheus API client python - Read the Docs Community
Prometheus API client python · EN · artificial-intelligence prometheus prometheus-api prometheus-metrics · Maintainers · Repository 4n4nd/prometheus-api-client-python · Versions 3 Builds 46 ·
Embrace
embrace.io › code samples
Metrics API Code Samples - Embrace.io
from datetime import datetime from prometheus_api_client import PrometheusConnect, MetricsList, Metric, MetricSnapshotDataFrame, MetricRangeDataFrame from prometheus_api_client.utils import parse_datetime # Constants # Embrace prometheus public URL metrics_api_endpoint = 'https://api.embrace.io/metrics' # API-Token token = '<your token>' # Embrace AppId app_id = '<your app id>' # Connect library to Embrace prometheus host prom = PrometheusConnect(url=metrics_api_endpoint, headers={'Authorization': 'Bearer ' + token}) # Get the list of all available metrics metrics = prom.all_metrics() print(me
Prometheus
prometheus.io › docs › instrumenting › clientlibs
Client libraries | Prometheus
Choose a Prometheus client library that matches the language in which your application is written. This lets you define and expose internal metrics via an HTTP endpoint on your application’s instance: Go · Java or Scala · Python · Ruby · Rust · Unofficial third-party client libraries: Bash ·
PyPI
pypi.org › project › promql-http-api
promql-http-api · PyPI
On the first line we create a PromqlHttpApi object named api. This example assumes that a Prometheus server is running on the local host, and it is listening to port 9090.
» pip install promql-http-api
PyPI
pypi.org › project › prometheus-client
prometheus-client · PyPI
Documentation is available on https://prometheus.github.io/client_python
» pip install prometheus-client