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.
Metadata
Release files for southern-company-api 0.7.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| southern_company_api-0.7.1.tar.gz | 17.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| southern_company_api-0.7.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.7 kB
Release files / southern_company_api-0.7.1.tar.gz
| Download URL | southern_company_api-0.7.1.tar.gz |
|---|---|
| Size | 17.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
05f7b6c693f8005b014e79354ec08172215feee64f28da12534afbe1be505875
|
|
BLAKE2b-256 checksum How to use checksums |
16cf4208ecf89571ada16f4fe30dcbfdd8bf3b0b1efdb47ed7a39d6c36652621
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / southern_company_api-0.7.1-py3-none-any.whl
| Download URL | southern_company_api-0.7.1-py3-none-any.whl |
|---|---|
| Size | 17.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ef320f197b2ebe59143c82cd7422f69feacd799318b0b444e9110ac2e7c5b5b6
|
|
BLAKE2b-256 checksum How to use checksums |
fd33b5025e73f19b201b519429696052972480527000776ef861429520fb9414
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|