Control Southern company websites with this api
Project description
Southern Company API
Control Southern company websites with this api
Supported utilities
| Utility | Class | Auth method |
|---|---|---|
| Georgia Power, Alabama Power, Mississippi Power | SouthernCompanyAPI |
JWT |
| Nicor Gas (LDC=7) | NicorGasAPI |
Cookie session |
Usage
Southern Company electric utilities (Georgia Power, Alabama Power, Mississippi Power)
import asyncio
import aiohttp
from southern_company_api import SouthernCompanyAPI
async def main():
async with aiohttp.ClientSession() as session:
api = SouthernCompanyAPI("username", "password", session)
await api.connect()
for account in await api.accounts:
usage = await account.get_daily_data(start, end, await api.jwt)
print(usage)
asyncio.run(main())
Nicor Gas
import asyncio
import aiohttp
from southern_company_api import NicorGasAPI
async def main():
async with aiohttp.ClientSession() as session:
api = NicorGasAPI("username", "password", session)
await api.connect()
history = await api.get_usage_history()
for period in history.billing_periods:
print(period.date, period.therms, "therms")
for day in history.daily_usage:
print(day.date.date(), day.therms, "therms", day.cost, "cost")
print("Projected bill:", history.projected_bill.low_amount,
"–", history.projected_bill.high_amount)
asyncio.run(main())
Nicor Gas data types
| Type | Fields |
|---|---|
NicorBillingPeriod |
date, meter_reading, reading_details, ccfs, therms, days_used |
NicorDailyUsage |
date, therms, cost, avg_temp, day_of_week, is_weekend, read_type, meter_read, billing_period |
NicorProjectedBill |
usage, low_amount, high_amount |
NicorMeterInfo |
meter_number, meter_status, next_read_date |
All date fields are timezone-aware UTC datetime objects. The parse_aspnet_date helper
converts the ASP.NET /Date(ms)/ format used in the portal.
Installation
Install this via pip (or your favourite package manager):
pip install southern-company-api
Contributors ✨
Thanks goes to these wonderful people (emoji key):
Luke 💻 🤔 📖 |
This project follows the all-contributors specification. Contributions of any kind welcome!
Credits
This package was created with Copier and the browniebroke/pypackage-template project template.
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
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
File details
Details for the file southern_company_api-0.7.0.tar.gz.
File metadata
- Download URL: southern_company_api-0.7.0.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bce8c9d48d2add8966347207c9b7ad1a734b3674d2b161fac1fed12686612c74
|
|
| MD5 |
b19fd50be96cfa98d2cc31c94aa61d50
|
|
| BLAKE2b-256 |
b6565bca452a9d215b7ad9f8cc86ea86cc59aa3ca74671bc8c0570b6b51aaf72
|
File details
Details for the file southern_company_api-0.7.0-py3-none-any.whl.
File metadata
- Download URL: southern_company_api-0.7.0-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be7fecf6a516c1999546424f13185f754d6adc183f3d7b4e339f6de07b66c034
|
|
| MD5 |
25455f7ed1f7f77b325b832ecd6d56a9
|
|
| BLAKE2b-256 |
541906a09b5bcdfb95d1908d1f91585649bc1816f685ae2ac7398ef956ec4a08
|