Extract and process the currently available colombian grid public data
Project description
Digitizing the Colombian Grid
Carry all the information of the Colombian grid with you
The digitization of the Colombian grid in one line
✨⚡ Query, extract, and process available information from the Colombian energy market with Python.
About The Project
colombian-grid is a Python library designed to provide a simple and efficient interface to access and process public data from the Colombian electricity market through the Paratec and XM APIs.
Key Features
- 🔌 Multiple Data Sources: Access data from both Paratec (infrastructure) and XM (market data) APIs
- ⚡ Async & Sync Clients: Choose between asynchronous clients for high performance or synchronous for simplicity
- 🤖 Automatic Chunking: Handles large date ranges automatically, respecting API restrictions
- � Built-in Retry Logic: Exponential backoff with jitter for handling transient errors
- 📊 Pandas Integration: Returns data as pandas DataFrames for easy analysis
- ✅ Type Safety: Optional Pydantic schema validation for API responses
Installation
PyPI
pip install colombian-grid
Quick Start
XM API - Market Data
import asyncio
from datetime import date
from colombian_grid.core.xm import AsyncXMClient
async def main():
async with AsyncXMClient() as client:
# Get system generation data
data = await client.get_data(
metric="Gene",
entity="Sistema",
start_date=date(2024, 1, 1),
end_date=date(2024, 1, 31)
)
print(data.head())
asyncio.run(main())
Paratec API - Infrastructure Data
import asyncio
from colombian_grid.core.paratec import AsyncParatecClient
async def main():
client = AsyncParatecClient()
# Get generator data
generators = await client.get_generation_data()
print(f"Found {len(generators)} generators")
await client._http_client.close()
asyncio.run(main())
Documentation
For comprehensive guides, API reference, and examples, visit our documentation site.
Building Documentation Locally
# Install documentation dependencies
uv pip install mkdocs mkdocs-material "mkdocstrings[python]"
# Build and serve documentation
uv run mkdocs serve
The documentation will be available at http://127.0.0.1:8000.
Development
This project uses uv for dependency management. To set up a development environment:
# Clone the repository
git clone https://github.com/jccamargo94/colombian-grid.git
cd colombian-grid
# Install dependencies
uv sync
# Run tests
uv run pytest
# Run pre-commit hooks
uv run pre-commit run --all-files
Have questions or suggestions?
Check out our documentation or open an issue in our repository. We are here to help you. 😊
Project details
Release history Release notifications | RSS feed
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 colombian_grid-0.1.0.tar.gz.
File metadata
- Download URL: colombian_grid-0.1.0.tar.gz
- Upload date:
- Size: 23.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d0d79253c0e62b1308228035b2ffadb8d3cbc55de430a1f1da8b35bb1e3f11b
|
|
| MD5 |
50c42b97a9194fd7bc2ed95c14ea40de
|
|
| BLAKE2b-256 |
3975e75484f04288c6a69a99d5a1f54c25187bed6cbf8fbc0b97ff8d89139d76
|
File details
Details for the file colombian_grid-0.1.0-py3-none-any.whl.
File metadata
- Download URL: colombian_grid-0.1.0-py3-none-any.whl
- Upload date:
- Size: 26.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3717c03f263a72b4e53a4273e6e63f7ea6b20826fa1b754542540ec8fa99f8b9
|
|
| MD5 |
1a5bebc4f2eeed17b1ad4379e96e06bb
|
|
| BLAKE2b-256 |
3fd05e477c69dadaac7904d01d3b9e0fa44262f90de07d93f4dae8d249e89635
|