Skip to main content

Wrapper for PECO Outage API

Project description

PECO Outage API

A library for interacting with the PECO outage map to gain the numbers from it.

Interacting with the API is simple.

from peco import PecoOutageApi

async def get_data():
    api = PecoOutageApi()
    # How many customers are affected by an outage in Bucks county?
    print(await api.get_outage_count('BUCKS')["customers_out"])

    # What is the total outage count for the entire region?
    print(await api.get_outage_totals()["outage_count"])

    # What is the percentage of customers that are affected by an outage?
    print(await api.get_outage_totals()["percent_customers_out"])

import asyncio
asyncio.run(get_data())

Note: The percent_customers_out key does not go below 5%. It will show up as 4.999999 instead. Make sure to take this into account when using the API.

The counties that are available are:

  • BUCKS
  • CHESTER
  • DELAWARE
  • MONTGOMERY
  • PHILADELPHIA
  • YORK

The values you can access are:

  • customers_out
  • percent_customers_out
  • outage_count
  • customers_served

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

peco-0.0.24.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

peco-0.0.24-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file peco-0.0.24.tar.gz.

File metadata

  • Download URL: peco-0.0.24.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.5

File hashes

Hashes for peco-0.0.24.tar.gz
Algorithm Hash digest
SHA256 28155824579a8d9fa78e6895e22eecfd4c5d3a04f62bcd5a2a79e83aa099ee5d
MD5 1617607e416f82267adb70b45e91cfc8
BLAKE2b-256 90ba80ea790c34beb33d36c846d0c421ef4dc680a9a38bb2d5a6478332cb40e0

See more details on using hashes here.

File details

Details for the file peco-0.0.24-py3-none-any.whl.

File metadata

  • Download URL: peco-0.0.24-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.5

File hashes

Hashes for peco-0.0.24-py3-none-any.whl
Algorithm Hash digest
SHA256 ebf54b4afba8b4f346872e52da9fabc232a16bc0c43534f7946b6cd21fdd3e45
MD5 74399a0b1a786beb279cb470a9367ca6
BLAKE2b-256 559f2087c0cca3fdeb7a0b4e6a2b3c85760094d6589f3c07b059d3c575b82a1b

See more details on using hashes here.

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