Skip to content

goettl79/parides

🦋 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. Python Library

Perfect for Jupyter Notebooks or custom scripts. Fetch 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='node_cpu_seconds_total{mode="idle"}'
)

df.plot()

2. Native CLI

High-performance extraction to Parquet or CSV. Use --chunk-size to bypass Prometheus API limits for large exports.

pip install parides

# Export 3 months of data in 1-day chunks to avoid timeouts
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. Environment Agnostic (Docker)

Run Parides as a standalone tool anywhere 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.

About

Prometheus metrics to Panda Dataframe / CSV exporter. Mainly useful to analyze your metrics with datascience tools.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors