Skip to main content

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 departments
departments = client.get_available_departments()
print(f"Available departments: {departments}")

# Get the available areas (rejony/sub-districts) for a given department
areas = client.get_available_areas("Poznań")
print(f"Available areas for Poznań: {areas}")  # e.g. {"12": "Opalenica", ...}

# Get all planned outages for the "Poznań" department
planned_outages = client.get_outages_for_department("Poznań", outage_type=OutageType.PLANNED)
print(f"Found {len(planned_outages)} planned outages in Poznań.")

# Narrow the search down to an area (sub-district id), city and/or street
narrowed_outages = client.get_outages_for_department(
    "Poznań",
    outage_type=OutageType.PLANNED,
    area="12",  # Opalenica
    city="Poznań",
    street="Kwiatowa",
)
print(f"Found {len(narrowed_outages)} planned outages for the given location.")

# Get all unplanned outages for a specific address in "Szczecin"
unplanned_outages = client.get_outages_for_address(
    address="Wojska Polskiego",
    department="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 departments
enea-outages --list-departments

# List available areas (sub-districts) for a department
enea-outages --department "Poznań" --list-areas

# Get unplanned outages for a specific department
enea-outages --department "Poznań" --type unplanned

# Narrow the search down to an area (by name or numeric id), city and/or street
enea-outages --department "Poznań" --area "Opalenica" --city "Poznań" --street "Kwiatowa"

# Get planned outages for a specific address in a department
enea-outages --department "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.

Metadata

Release files for enea-outages 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for enea-outages 0.6.1
File Size Uploaded Provenance Actions
enea_outages-0.6.1.tar.gz 14.8 kB With provenance Details for enea_outages-0.6.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for enea-outages 0.6.1
File Interpreter ABI Platform Actions
enea_outages-0.6.1-py3-none-any.whl Python 3 none any Details for enea_outages-0.6.1-py3-none-any.whl

Total release size: 23.8 kB

Release files / enea_outages-0.6.1.tar.gz

Download URL enea_outages-0.6.1.tar.gz
Size 14.8 kB
Tags Source
SHA-256 checksum
How to use checksums
950131600a99a42aabe761e439e992e4c38e3aa5685ca34e1237eaf5a08b49ae
BLAKE2b-256 checksum
How to use checksums
b9a5c18c73438fd0303e9a48399d50b130d97e935f37864810f7f7f0ba7b3c6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

Release files / enea_outages-0.6.1-py3-none-any.whl

Download URL enea_outages-0.6.1-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
49802560968466e573971a31c7c72562ae396e754f3f5281731b97479bc09c1f
BLAKE2b-256 checksum
How to use checksums
c18f6196f1cb55aad704f3b280718417aedc0613678200f6e17854e3cb37f682
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

Security for enea-outages 0.6.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for enea_outages-0.6.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page