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.1.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.1-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: parides-0.7.1.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.1.tar.gz
Algorithm Hash digest
SHA256 f3115259860eb5e7e020a591eb52614d6a07957dcd51e1dc9d7d30c9d564ac7f
MD5 57204536ffaa6b92485d64b92051184f
BLAKE2b-256 99f9c402be57f29284c42b941fdbb989ec7824c1c5560b56f73a55fe0ff5468a

See more details on using hashes here.

Provenance

The following attestation bundles were made for parides-0.7.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: parides-0.7.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 defb0e540ac0e22bcccc3d7694f1edfe42d4ed906e62bc22646e23b081e2ce76
MD5 39baa8d063538f19fadfdc64a18c1600
BLAKE2b-256 8b4212e8c46357853e468d09746e462b8f75f0a2abf756d3c7bfae4de9f1ff2b

See more details on using hashes here.

Provenance

The following attestation bundles were made for parides-0.7.1-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