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.0

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.0
File Size Uploaded Provenance Actions
enea_outages-0.6.0.tar.gz 14.6 kB With provenance Details for enea_outages-0.6.0.tar.gz

Built distribution (wheel)

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

Total release size: 23.5 kB

Release files / enea_outages-0.6.0.tar.gz

Download URL enea_outages-0.6.0.tar.gz
Size 14.6 kB
Tags Source
SHA-256 checksum
How to use checksums
01426bb2cb968e1bcd868ead864e565525974a3cc2d00dc7922bf46188948334
BLAKE2b-256 checksum
How to use checksums
56f6162f8d1761d246111c0974eb44d679b5666ba01d8179aa85cd15740222cc
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.0-py3-none-any.whl

Download URL enea_outages-0.6.0-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab96a862b2107e0cc9f529873247f707abada8b566d062ef3504f3e130f86bb1
BLAKE2b-256 checksum
How to use checksums
827600a88018d9f9cffec1333b64efd35f26d0e363a2c0a4ef03b91c6915f3fb
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.0

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.0.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