Repolode
prometheus

prometheus/client_python

The official Python client library for exposing application metrics in the Prometheus monitoring format.

Stars
4,384
Forks
904
Open issues
172
Last commit
7 days ago

What is it?

prometheus_client is the official Python instrumentation library for Prometheus. It lets Python applications define metrics such as counters, gauges and histograms, and expose them over HTTP so that a Prometheus server can scrape them.

The package is installed from PyPI with pip. Full documentation is hosted on the project's GitHub Pages site, and release notes are kept on the GitHub releases page, which serves as the changelog.

It targets developers who already run Prometheus and need to instrument Python services, scripts or exporters with monitoring data.

Key features

  • 01Provides counter, gauge, histogram and summary metric types.
  • 02Exposes metrics over HTTP for Prometheus to scrape.
  • 03Installable from PyPI with pip.
  • 04Maintained as the official Python client for Prometheus.

Use cases

  • Adding request count and latency metrics to a Python web service.
  • Instrumenting background jobs or scripts for monitoring.
  • Writing a custom Prometheus exporter in Python.

Quick start

  1. 1

    Install the package from PyPI

    pip install prometheus-client

In collections

Topics

FAQ

What is client_python?
The official Python client library for exposing application metrics in the Prometheus monitoring format. prometheus_client is the official Python instrumentation library for Prometheus. It lets Python applications define metrics such as counters, gauges and histograms, and expose them over HTTP so that a Prometheus server can scrape them.
Is client_python free to use? What license does it have?
client_python is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is client_python still maintained?
Actively maintained. The last commit to client_python was on Oct 30, 2026.
What can I use client_python for?
Adding request count and latency metrics to a Python web service. Instrumenting background jobs or scripts for monitoring. Writing a custom Prometheus exporter in Python.
How do I install client_python?
Install the package from PyPI: pip install prometheus-client
Where can I get client_python?
The source code and installation instructions are on GitHub: https://github.com/prometheus/client_python

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects