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.23.tar.gz (4.0 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.23-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: peco-0.0.23.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.21.0 requests-toolbelt/0.8.0 tqdm/4.62.3 CPython/3.7.3

File hashes

Hashes for peco-0.0.23.tar.gz
Algorithm Hash digest
SHA256 40c497d0a397911e1e2d6e7d67cc0ad61c3d5b2c736cbc728c727d96ef5cae8b
MD5 877f6405928b6211532f4eb9bbbc2ac6
BLAKE2b-256 9352f3a5c9024dc2876a4f4d8b8b5d05f0cb79d407a2a8bfe0d94c577a62499e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: peco-0.0.23-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.21.0 requests-toolbelt/0.8.0 tqdm/4.62.3 CPython/3.7.3

File hashes

Hashes for peco-0.0.23-py3-none-any.whl
Algorithm Hash digest
SHA256 0f66f069f13f4716f2cfc7f8fc75a4bc30e5e20bbe2208bf16b040d1e7da2a67
MD5 112486f2a1fa210dcc5efb5e7cdcf664
BLAKE2b-256 4e8a6c60fe0e67b5c6b6e3e5e5e6040ae84f9dc88cc2f2e2208238780a69cd69

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