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.4.0.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.4.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file enea_outages-0.4.0.tar.gz.

File metadata

  • Download URL: enea_outages-0.4.0.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for enea_outages-0.4.0.tar.gz
Algorithm Hash digest
SHA256 0f0eb064f0a3da077bee74a8885d04e083e0d014fa5cd326369076995452ee56
MD5 709dcca06f4aea2c0a4d41b524af5909
BLAKE2b-256 520e161614134ad7f0436b366b4670a2d42fc4b553d7f93281a558051c89c9f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for enea_outages-0.4.0.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.4.0-py3-none-any.whl.

File metadata

  • Download URL: enea_outages-0.4.0-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.12

File hashes

Hashes for enea_outages-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 19cfc3bd3e58899cc403f062a86acae85de87b35195ca58031f8212c2b99a7ce
MD5 88f20bf2210423fcaece2f828d09b52a
BLAKE2b-256 020e401787bfb71692bb7666df8a59d2bda418d69de68963d3bad1b2ed1a00f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for enea_outages-0.4.0-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