$npx skillfedfor your agent

prometheus-api-client

A small python api to collect data from prometheus

Worth itPyPI MonitoringReleased Apr 20262.7M downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — prometheus_api_client-0.7.2-py3-none-any.whl
v0.7.2 · released 2026-04-13 · 2 runtime deps: requests, dateparser

Yes. Active maintenance, permissive license, low install friction, no known vulnerabilities, and a straightforward API make this a solid choice for any Python application that needs to query Prometheus. Install the minimal version if you only need API access; add optional extras only if you need DataFrame or plotting support.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low friction: pure Python wheel with only 2 runtime dependencies (requests and dateparser).
  • Active maintenance with a recent release and ongoing repository activity.
  • Optional dependencies for DataFrame and plotting support can be installed separately to minimize footprint.

License · maintenance · safety

permissive license (permissive) — MIT license (permissive). No restrictions on use, modification, or distribution in proprietary or open-source projects.

last release 2026-04-13 (123 days) · last repo commit 2026-07-23 · 277 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,725,574 downloads/mo, #2,919 on PyPI

Verify before relying

pip install prometheus-api-client

from prometheus_api_client import PrometheusConnect
prom = PrometheusConnect(url="<prometheus-host>")
metrics = prom.all_metrics()
data = prom.custom_query(query="up")
  • Whether the package supports authentication methods beyond bearer tokens and basic HTTP headers.
  • Performance characteristics when querying large time ranges or high-cardinality metrics.
  • Compatibility with Prometheus remote storage or federation setups.
Same gist for agents: .md · .json

What it is and what it does

prometheus-api-client is a Python wrapper around Prometheus's HTTP API designed to simplify metrics collection and analysis. It provides the PrometheusConnect class for establishing connections to Prometheus servers, fetching metric lists, and executing instant and range queries. The library handles common tasks like label filtering, time-range chunking, and datetime parsing through its utils module.

Beyond basic API wrapping, the package includes higher-level abstractions: MetricsList and Metric classes for working with result sets as objects, optional DataFrame conversion for data analysis workflows, and plotting support via matplotlib. Core dependencies are minimal (requests and dateparser), with pandas, numpy, and matplotlib available as optional extras. This modular design lets you use just the query layer without pulling in data-science dependencies if your use case doesn't need them.

Use it for

  • Fetch current or historical metrics from a Prometheus server for custom dashboards or alerting logic.
  • Aggregate and combine multiple time-series queries programmatically for analysis or reporting.
  • Export Prometheus metrics to pandas DataFrames for statistical analysis or machine-learning pipelines.
  • Build monitoring automation that queries Prometheus and triggers actions based on metric values.
  • Plot time-series data directly from Prometheus for ad-hoc visualization or debugging.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

Active maintenance, permissive license, low install friction, no known vulnerabilities, and a straightforward API make this a solid choice for any Python application that needs to query Prometheus. Install the minimal version if you only need API access; add optional extras only if you need DataFrame or plotting support.

Install

prometheus-api-client on PyPI

Before you install

Low friction: pure Python wheel with only 2 runtime dependencies (requests and dateparser). Active maintenance with a recent release and ongoing repository activity. Optional dependencies for DataFrame and plotting support can be installed separately to minimize footprint.

License in practice

MIT license (permissive). No restrictions on use, modification, or distribution in proprietary or open-source projects.

Quickstart

pip install prometheus-api-client

from prometheus_api_client import PrometheusConnect
prom = PrometheusConnect(url="<prometheus-host>")
metrics = prom.all_metrics()
data = prom.custom_query(query="up")

Verify before relying

  • Whether the package supports authentication methods beyond bearer tokens and basic HTTP headers.
  • Performance characteristics when querying large time ranges or high-cardinality metrics.
  • Compatibility with Prometheus remote storage or federation setups.

Package facts

Licensepermissive license permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
requestsdateparser
MaintenanceActively maintained 123 days since the last release
Last repo commit
First released
Downloads2,725,574 / month, #2,919 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.13

Evidence: prometheus_api_client-0.7.2-py3-none-any.whl

Tags

Capabilities
prometheus metrics clientprometheus http api wrapperfetch prometheus time series dataprometheus query libraryprometheus monitoring integrationprometheus metrics processingprometheus data aggregation
Topics
prometheusmetrics-collectiontime-series

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “prometheus http api wrapper”

Give your agent the search over MCP, or paste the wish link into any chat.

More Monitoring packages

tqdm Worth it
PyPI · Libraries · released Jul 2026

Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.

copyleftpure Python · 3.8+
648.6Mdownloads / mo
opentelemetry-semantic-conventions Worth it
PyPI · Monitoring · released Jul 2026

Provides generated Python code for OpenTelemetry semantic conventions, enabling standardized attribute naming and constant definitions for instrumentation and telemetry collection.

Install it if you are using OpenTelemetry and want to follow semantic conventions correctly.

Apache-2.0pure Python · 3.10+
542.9Mdownloads / mo
opentelemetry-sdk Worth it
PyPI · Monitoring · released Jul 2026

Provides the reference implementation of the OpenTelemetry API for collecting and exporting traces, metrics, and logs from Python applications.

Apache-2.0pure Python · 3.10+
521.8Mdownloads / mo
opentelemetry-api With conditions
PyPI · Monitoring · released Jul 2026

Provides the abstract API and interfaces for OpenTelemetry instrumentation in Python, defining how to emit traces, metrics, and logs without tying code to a specific SDK implementation.

Apache-2.0pure Python · 3.10+
463.8Mdownloads / mo
opentelemetry-exporter-otlp-proto-http Worth it
PyPI · Monitoring · released Jul 2026

Exports OpenTelemetry observability data to an OpenTelemetry Collector using Protobuf-encoded messages over HTTP.

Install it if you are using OpenTelemetry in Python and need to send data to a Collector over HTTP.

Apache-2.0pure Python · 3.10+
409.9Mdownloads / mo
opentelemetry-instrumentation Worth it
PyPI · Monitoring · released Jul 2026

Provides automatic instrumentation commands and programmatic APIs to inject distributed tracing into Python applications without code changes, detecting and instrumenting packages used by your program.

Install it if you need distributed tracing without code changes and have compatible instrumented packages in your environment.

Apache-2.0pure Python · 3.10+
393.5Mdownloads / mo

See also aioprometheus · prometheus-remote-writer · prometheus-fastapi-instrumentator · opentelemetry-exporter-prometheus · prometheus-flask-exporter · py-grpc-prometheus · prometheus-client · prometheus-client-python-speedups · signalfx · dt