Skip to main content

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

enea_outages-0.3.1.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

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

enea_outages-0.3.1-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

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

Hashes for enea_outages-0.3.1.tar.gz
Algorithm Hash digest
SHA256 5d1d2240128a4ef9703f27bfdda462e4bf3a2f2f31b4e7999fa3d66975933092
MD5 537e440abfe75b4349574beb3b8f58c2
BLAKE2b-256 f7fbc7be2e5341cc61c26265b4f3a918ea0195d4bca1e08de4a54aa7453b8ec5

See more details on using hashes here.

Provenance

The following attestation bundles were made for enea_outages-0.3.1.tar.gz:

Publisher: ci.yml on theundefined/enea-outages

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for enea_outages-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fd9e53cf6d3fbc7c68749634668821332a3781831684426edfd7428c9b206a4d
MD5 2c0e5084b95f9e0a06f80956509b849a
BLAKE2b-256 c86e8025f54c1bde18df031ea86aabff94f446d1635926c6081a9872988f3f1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for enea_outages-0.3.1-py3-none-any.whl:

Publisher: ci.yml on theundefined/enea-outages

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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