Skip to main content

Efficiently convert Prometheus metrics to Pandas DataFrames and Parquet/CSV files for Data Science.

Project description

🦋 Parides

Prometheus metrics directly into Pandas and Parquet.

Python CI/CD Docker CI/CD PyPI version License


Parides is a high-performance bridge between Prometheus and the Data Science stack. It automatically handles pagination, pivoting, and tabular alignment, delivering perfectly formatted data for machine learning and statistical analysis.

🚀 Quick Start

pip install parides

📊 Three Ways to Use Parides

1. Interactive Data Science (Python API)

Perfect for Jupyter Notebooks. Fetch aligned metrics directly into a Pandas DataFrame.

from parides.prom_conv import from_prom_to_df

# Automatically handles pagination and alignment
df = from_prom_to_df(
    url="http://localhost:9090",
    metrics_query='irate(node_cpu_seconds_total{mode="idle"}[5m])'
)

# Ready for Scikit-Learn or Matplotlib
df.plot()

2. ML Training Data (High-Performance CLI)

Extract months of historical data directly to Parquet or CSV. Parides streams data to disk to keep memory usage low even for multi-gigabyte exports.

# Export 3 months of data using 1-day chunks to bypass API limits
parides http://localhost:9090 'node_cpu_seconds_total' \
    --start-date "2024-01-01T00:00:00Z" \
    --end-date "2024-04-01T00:00:00Z" \
    --chunk-size "1d" \
    --format parquet

3. DevOps & ETL Pipelines (Docker)

Run Parides as a standalone tool in CI/CD or automated pipelines without local Python dependencies.

docker run -v $(pwd)/data:/app/timeseries \
    ghcr.io/goettl79/parides http://prometheus:9090 "up" --format parquet

💡 Why Parides?

  • Bypass API Limits: Automatically chunks large time-range queries (--chunk-size) so you never hit "too many samples" errors.
  • Zero-Config Alignment: Pivots long-format JSON into wide-format tables (features as columns, time as rows) — exactly what scikit-learn or PyTorch expect.
  • Timezone Safe: All timestamps are strictly converted to UTC to prevent catastrophic time-shifting bugs in your models.
  • Big Data Ready: CLI uses streaming writes (CSV/Parquet) to handle datasets larger than your system RAM.

🤝 Contributing

We welcome contributions! Please see our Contributing Guidelines to get started.

To set up for local development:

git clone https://github.com/goettl79/parides.git
cd parides
poetry install

📄 License

This project is licensed under the Apache License 2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parides-0.7.3.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parides-0.7.3-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file parides-0.7.3.tar.gz.

File metadata

  • Download URL: parides-0.7.3.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for parides-0.7.3.tar.gz
Algorithm Hash digest
SHA256 f197be52b60b841f50fe92de8f0fc5617a74ba090f1ca52d58ad72b9ffe14210
MD5 78bc35db52189b1a656e9dac802d8626
BLAKE2b-256 395eafcd71114b359b5524781411a47485c87fbd69179f765da03df3ab272790

See more details on using hashes here.

Provenance

The following attestation bundles were made for parides-0.7.3.tar.gz:

Publisher: python-ci.yml on goettl79/parides

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file parides-0.7.3-py3-none-any.whl.

File metadata

  • Download URL: parides-0.7.3-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for parides-0.7.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a29517a4f61e740d75c1b617e9035e3b44965c583b939409587d8960356d9b5e
MD5 da92be608bd224439e7cd314a9a0fe0b
BLAKE2b-256 6b00c88988a3f9cf1d7c02c7579e58399facfa16447385616c192de5def9b745

See more details on using hashes here.

Provenance

The following attestation bundles were made for parides-0.7.3-py3-none-any.whl:

Publisher: python-ci.yml on goettl79/parides

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page