Welcome to aiopromql’s documentation! — aiopromql 0.1.1 documentation

# Welcome to aiopromql’s documentation!

Contents:

- Installation
  - Requirements
  - Basic Installation
  - Development Installation
- Usage Guide
  - Synchronous Usage
  - Asynchronous Usage
- API Reference
  - Clients
  - Models
  - Package
- Contributing
  - Development Process
  - Development Setup
  - Any contributions you make will be under the MIT Software License
  - Report bugs using GitHub’s issue tracker
  - Write bug reports with detail, background, and sample code
  - License

## Introduction

aiopromql is a minimalist Prometheus HTTP client for Python that supports both synchronous and asynchronous querying. It provides a clean, Pythonic model layer for Prometheus query responses and convenient helpers for mapping metrics into structured time series.

## Features

- Sync and async Prometheus client interfaces via `httpx`

- Pydantic models for Prometheus vector and matrix responses

- Time series utilities and hashable metric keys

- Zero dependencies outside of `httpx` and `pydantic`

## Quick Start

    from aiopromql import PrometheusSync

    client = PrometheusSync("http://localhost:9090")
    resp = client.query('up')
    metric_map = resp.to_metric_map()

    for labels, series in metric_map.items():
        print(f"Labels: {labels.dict}")
        for point in series:
            print(f"  {point}")

# Indices and tables

- Index

- Module Index

- Search Page