Python library to get information about power outages from Enea Operator.
Project description
Enea Outages Python Library
A simple Python library to get information about power outages from the Enea Operator website.
Installation
pip install enea-outages
Usage (Python)
from enea_outages.client import EneaOutagesClient
from enea_outages.models import OutageType
# Initialize the synchronous client
client = EneaOutagesClient()
# Get a list of available regions
regions = client.get_available_regions()
print(f"Available regions: {regions}")
# Get all planned outages for the "Poznań" region
planned_outages = client.get_outages_for_region("Poznań", outage_type=OutageType.PLANNED)
print(f"Found {len(planned_outages)} planned outages in Poznań.")
# Get all unplanned outages for a specific address in "Szczecin"
unplanned_outages = client.get_outages_for_address(
address="Wojska Polskiego",
region="Szczecin",
outage_type=OutageType.UNPLANNED
)
print(f"Found {len(unplanned_outages)} unplanned outages for the address.")
if unplanned_outages:
outage = unplanned_outages[0]
print(
f"Example -> Area: {outage.region}, "
f"Description: {outage.description}, "
f"End Time: {outage.end_time}"
)
Usage (CLI)
The library also provides a command-line interface (CLI) for quick checks.
# List all available regions
enea-outages --list-regions
# Get unplanned outages for a specific region
enea-outages --region "Poznań" --type unplanned
# Get planned outages for a specific address in a region
enea-outages --region "Szczecin" --address "Wojska Polskiego" --type planned
This project was developed with the assistance of AI tools (Google Gemini). While the code has been reviewed, please use it with standard caution.
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 enea_outages-0.3.1.tar.gz.
File metadata
- Download URL: enea_outages-0.3.1.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d1d2240128a4ef9703f27bfdda462e4bf3a2f2f31b4e7999fa3d66975933092
|
|
| MD5 |
537e440abfe75b4349574beb3b8f58c2
|
|
| BLAKE2b-256 |
f7fbc7be2e5341cc61c26265b4f3a918ea0195d4bca1e08de4a54aa7453b8ec5
|
Provenance
The following attestation bundles were made for enea_outages-0.3.1.tar.gz:
Publisher:
ci.yml on theundefined/enea-outages
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
enea_outages-0.3.1.tar.gz -
Subject digest:
5d1d2240128a4ef9703f27bfdda462e4bf3a2f2f31b4e7999fa3d66975933092 - Sigstore transparency entry: 734956217
- Sigstore integration time:
-
Permalink:
theundefined/enea-outages@0489557d205f8b5343d5867bb27004842d4cd70b -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/theundefined
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@0489557d205f8b5343d5867bb27004842d4cd70b -
Trigger Event:
push
-
Statement type:
File details
Details for the file enea_outages-0.3.1-py3-none-any.whl.
File metadata
- Download URL: enea_outages-0.3.1-py3-none-any.whl
- Upload date:
- Size: 6.9 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 |
fd9e53cf6d3fbc7c68749634668821332a3781831684426edfd7428c9b206a4d
|
|
| MD5 |
2c0e5084b95f9e0a06f80956509b849a
|
|
| BLAKE2b-256 |
c86e8025f54c1bde18df031ea86aabff94f446d1635926c6081a9872988f3f1e
|
Provenance
The following attestation bundles were made for enea_outages-0.3.1-py3-none-any.whl:
Publisher:
ci.yml on theundefined/enea-outages
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
enea_outages-0.3.1-py3-none-any.whl -
Subject digest:
fd9e53cf6d3fbc7c68749634668821332a3781831684426edfd7428c9b206a4d - Sigstore transparency entry: 734956241
- Sigstore integration time:
-
Permalink:
theundefined/enea-outages@0489557d205f8b5343d5867bb27004842d4cd70b -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/theundefined
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@0489557d205f8b5343d5867bb27004842d4cd70b -
Trigger Event:
push
-
Statement type: