Skip to main content

A high-performance lookup library for Transmission System Operators (TSOs)

Project description

PowerGrid - TSO Finder

PyPI Version License: MIT Python Versions Tests

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!

🚀 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. 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:

  1. Fork the repo and create a branch.
  2. Add your feature or fix a bug.
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

powergrid-0.1.0.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

powergrid-0.1.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file powergrid-0.1.0.tar.gz.

File metadata

  • Download URL: powergrid-0.1.0.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.29

File hashes

Hashes for powergrid-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e95ca7b6d05a257de09927af1d19231cd1ec8f7cd43d31952bbe9b3cf2ddf2d1
MD5 aab1a9de992c4bc8bac134a2bbdedd39
BLAKE2b-256 4cbabea3771e05851d3fe54f203a82061a226cb1a69b2db61084256666d5a20c

See more details on using hashes here.

File details

Details for the file powergrid-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: powergrid-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.29

File hashes

Hashes for powergrid-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4066fe2209c111b212c53f4880bf660978fbe1f6d9a0c518635209798576c56f
MD5 d41b370d805c5796328d0f36ab2bedcf
BLAKE2b-256 49bf9e6290af06dfbc0c4f9bde65fdaabbae65cfe526b1a8059bf4f765ad9b3a

See more details on using hashes here.

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