🌐
PyPI
pypi.org › project › prometheus-api-client
prometheus-api-client · PyPI
The prometheus-api-client library consists of multiple modules which assist in connecting to a Prometheus host, fetching the required metrics and performing various aggregation operations on the time series data.
      » 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
This method takes as input a string which will be sent as a query to the specified Prometheus Host. This query is a PromQL query. ... params – (dict) Optional dictionary containing GET parameters to be sent along with the API request, such as “timeout”
🌐
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
For example, setting it to timedelta(hours=3) will download 3 hours worth of data in each request made to the prometheus host :param store_locally: (bool) If set to True, will store data locally at, `"./metrics/hostname/metric_date/name_time.json.bz2"` :param params: (dict) Optional dictionary containing GET parameters to be sent along with the API request, such as "time" :return: (list) A list of metric data for the specified metric in the given time range :raises: (RequestException) Raises an exception in case of a connection error (PrometheusApiClientException) Raises in case of non 200 res
🌐
Medium
ledinhcuong99.medium.com › prometheus-api-client-in-python-ec54291aa1a
Prometheus API Client in Python - Donald Le - Medium
January 19, 2021 - def print_metrics(): from prometheus_api_client import PrometheusConnect prom = PrometheusConnect(url="http://3.19.55.237:9090", disable_ssl=True) # Get the list of all the metrics that the Prometheus host scrapes print(prom.all_metrics()) # Press the green button in the gutter to run the script.
🌐
GitHub
github.com › 4n4nd › prometheus-api-client-python
GitHub - 4n4nd/prometheus-api-client-python: A python wrapper for the prometheus http api · GitHub
The prometheus-api-client library consists of multiple modules which assist in connecting to a Prometheus host, fetching the required metrics and performing various aggregation operations on the time series data.
Starred by 274 users
Forked by 90 users
Languages: Python
🌐
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 ·
Find elsewhere
🌐
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 ·
🌐
GitHub
github.com › AICoE › prometheus-api-client-python
AICoE/prometheus-api-client-python · GitHub
August 24, 2020 - A python wrapper for the prometheus http api. Contribute to AICoE/prometheus-api-client-python development by creating an account on GitHub.
Author: AICoE
🌐
client_python
prometheus.github.io › client_python
client_python
This tutorial shows the quickest way to get started with the Prometheus Python library. ... 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.
🌐
GitHub
github.com › 4n4nd › prometheus-api-client-python › tree › master › prometheus_api_client
prometheus-api-client-python/prometheus_api_client at master · 4n4nd/prometheus-api-client-python
A python wrapper for the prometheus http api. Contribute to 4n4nd/prometheus-api-client-python development by creating an account on GitHub.
Author: 4n4nd
🌐
PyPI
pypi.org › project › prometheus-client
prometheus-client · PyPI
Python client for the Prometheus monitoring system.
      » pip install prometheus-client
    
Published: Apr 09, 2026
Version: 0.25.0
🌐
DBI Services
dbi-services.com › accueil › instrument your python application with prometheus (part1)
Instrument your python application with Prometheus (Part1)
July 10, 2023 - Prometheus has several official client libraries written in Go, Java, Python, Ruby, and Rust. Additionally, there are unofficial third-party client libraries available for other languages. Moreover, if desired, you can even write your own client library for any unsupported language. Throughout this blog, I will explain how to instrument a Python application and collect metrics from an API...
🌐
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
🌐
Medium
medium.com › @simrankumari1344 › setting-up-prometheus-server-with-a-python-app-a-step-by-step-guide-fadba7d35dbe
Setting Up Prometheus Server with a Python App: A Step-by-Step Guide | by Simran Kumari | Medium
January 13, 2025 - The first step is to create a dummy Python app that Prometheus will scrape for metrics. Here’s how to get started: Install Prometheus Client Library Use the prometheus_client library in Python to expose metrics.