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
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.3.tar.gz
(3.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
peco-0.0.3-py3-none-any.whl
(3.8 kB
view details)
File details
Details for the file peco-0.0.3.tar.gz.
File metadata
- Download URL: peco-0.0.3.tar.gz
- Upload date:
- Size: 3.1 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd6f64e807c544c065d0b42ca4633797d25e59ba1e47dcde61cb40adaaa23031
|
|
| MD5 |
b2d8d0e6394f9c9e91e9109f5b7d095f
|
|
| BLAKE2b-256 |
582004db1ab6eef06e803ee9f4787d0ca09325932b7b049dbbace548867a448b
|
File details
Details for the file peco-0.0.3-py3-none-any.whl.
File metadata
- Download URL: peco-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.8 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64f13aa093eba00f75bf56235c482abd232c01e2b80e4aea76d891deaea0f624
|
|
| MD5 |
372e8d594bc6f6f05af97553f22628cf
|
|
| BLAKE2b-256 |
730e5328c23bb55808b22b365eb7309ad2f1375f47293e5b8db655b0c9395e57
|