A high-performance lookup library for Transmission System Operators (TSOs)
Project description
PowerGrid - TSO Finder
PowerGrid is a high-performance Python library for looking up Transmission System Operators (TSOs) based on ISO country-region codes.
📝 Note: This version currently supports French region codes only.
🎯 Contributors are welcome to extend it to other countries!
📝 Version 0.2.1:
- ✅ **Now handle TSO for Germany and Corsica.
📝 Version 0.2.0:
- ✅ Now returns full
Tsoobjects instead of just IDs.- ✅ Uses a shared
constants.pyfile for managing data source paths.- ✅ Case-insensitive searches for region codes & ENTSO-E codes.
🚀 Features
✅ Blazing-fast in-memory lookup
✅ Search by:
- Region code (ISO 3166-2)
- TSO ID
- ENTSO-E Code
✅ Case-insensitive searches
✅ Optimized for REST APIs and large-scale queries
📦 Installation
Using PyPI
PowerGrid is available on PyPI at https://pypi.org/project/powergrid/
Install it with:
uv pip install powergrid
🛠 API Reference
TsoFinder
Initialize the Finder
from tso_finder import TsoFinder
finder = TsoFinder()
Lookup by Region Code
print(finder.by_region("FR-IDF")) # Output: "TSO_FR_001"
Lookup by TSO ID
print(finder.by_tsoid("TSO_FR_001")) # Output: ["FR-IDF", "FR-ARA", ...]
Lookup by ENTSO-E Code
print(finder.by_entsoe("10YFR-RTE------C")) # Output: <Tso object for RTE>
🏗 Contributing
We welcome contributions!
To contribute:
- Fork the repo and create a branch.
- Add your feature or fix a bug.
- Submit a pull request.
📜 License
PowerGrid is MIT Licensed.
See the LICENSE file for details.
💡 Why Use PowerGrid?
- Fast: Precomputes mappings for instant lookups.
- Scalable: Can handle large-scale queries efficiently.
- Reliable: Designed for TSO data accuracy.
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 powergrid-0.2.1.tar.gz.
File metadata
- Download URL: powergrid-0.2.1.tar.gz
- Upload date:
- Size: 21.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.29
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8f609ec83a776244b7a398d190d8a57ea25c2bb22fee46c548adf27a1c6ed28
|
|
| MD5 |
526e7762192d50cfee1018546a8ec63f
|
|
| BLAKE2b-256 |
2288f9df7e2e5bb42ef43b27172addee16cd2154ee29c3d9d3afbffb9ec7f743
|
File details
Details for the file powergrid-0.2.1-py3-none-any.whl.
File metadata
- Download URL: powergrid-0.2.1-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.29
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
469f505e4851f5af4f5f8f1e3c078710432e32c6897fe9c4c4b33829a81b4c25
|
|
| MD5 |
e7f9ce73608a69327b103208822ead85
|
|
| BLAKE2b-256 |
c3dd17b9f9df070ce6a1323c737fda184000a7710be7902faa3ba286de9a0076
|