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 get_outage_count, get_outage_totals
# How many customers are affected by an outage in Bucks county?
print(get_outage_count('BUCKS')["customers_out"])
# What is the total outage count for the entire region?
print(get_outage_totals()["outage_count"])
# What is the percentage of customers that are affected by an outage?
print(get_outage_totals()["percent_customers_out"])
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
Release history Release notifications | RSS feed
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.16.tar.gz
(3.2 kB
view hashes)
Built Distribution
peco-0.0.16-py3-none-any.whl
(3.8 kB
view hashes)