Efficiently convert Prometheus metrics to Pandas DataFrames and Parquet/CSV files for Data Science.
Project description
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-learnorPyTorchexpect. - 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3115259860eb5e7e020a591eb52614d6a07957dcd51e1dc9d7d30c9d564ac7f
|
|
| MD5 |
57204536ffaa6b92485d64b92051184f
|
|
| BLAKE2b-256 |
99f9c402be57f29284c42b941fdbb989ec7824c1c5560b56f73a55fe0ff5468a
|
Provenance
The following attestation bundles were made for parides-0.7.1.tar.gz:
Publisher:
python-ci.yml on goettl79/parides
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
parides-0.7.1.tar.gz -
Subject digest:
f3115259860eb5e7e020a591eb52614d6a07957dcd51e1dc9d7d30c9d564ac7f - Sigstore transparency entry: 1126161786
- Sigstore integration time:
-
Permalink:
goettl79/parides@519372bdc30559208d87492086d1ba31652232a6 -
Branch / Tag:
refs/tags/v0.7.1 - Owner: https://github.com/goettl79
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-ci.yml@519372bdc30559208d87492086d1ba31652232a6 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
defb0e540ac0e22bcccc3d7694f1edfe42d4ed906e62bc22646e23b081e2ce76
|
|
| MD5 |
39baa8d063538f19fadfdc64a18c1600
|
|
| BLAKE2b-256 |
8b4212e8c46357853e468d09746e462b8f75f0a2abf756d3c7bfae4de9f1ff2b
|
Provenance
The following attestation bundles were made for parides-0.7.1-py3-none-any.whl:
Publisher:
python-ci.yml on goettl79/parides
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
parides-0.7.1-py3-none-any.whl -
Subject digest:
defb0e540ac0e22bcccc3d7694f1edfe42d4ed906e62bc22646e23b081e2ce76 - Sigstore transparency entry: 1126161844
- Sigstore integration time:
-
Permalink:
goettl79/parides@519372bdc30559208d87492086d1ba31652232a6 -
Branch / Tag:
refs/tags/v0.7.1 - Owner: https://github.com/goettl79
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-ci.yml@519372bdc30559208d87492086d1ba31652232a6 -
Trigger Event:
push
-
Statement type: