Python library to access the Aurora+ API: https://api.auroraenergy.com.au/api
Project description
AuroraPlus is a package to pull data from https://api.auroraenergy.com.au/api. To use the Aurora+ API you need a valid account with Aurora.
Requirements
- Install Python 3.9 (for all users)
- Pip install requests
Usage
Connect to Aurora+ API:
import auroraplus
AuroraPlus = auroraplus.api("user.name@outlook.com", "password")
To get current account information use the following:
AuroraPlus.getcurrent()
getcurrent() gets the following data:
EstimatedBalance - This is shown in the Aurora+ app as 'Balance'
UsageDaysRemaining - This is shown in the Aurora+ app as 'Days Prepaid'
AverageDailyUsage
AmountOwed
ActualBalance
UnbilledAmount
BillTotalAmount
NumberOfUnpaidBills
BillOverDueAmount
Note: All data except AverageDailyUsage is updated Daily.
An example getting specific data with getcurrent:
import auroraplus
AuroraPlus = auroraplus.api("user.name@outlook.com", "password")
if (not AuroraPlus.Error):
AuroraPlus.getcurrent()
print(AuroraPlus.AmountOwed)
else:
print(AuroraPlus.Error)
To get summary usage information use the following:
AuroraPlus.getsummary()
Note: This returns two collections, DollarValueUsage and KilowattHourUsage.
An example getting specific data with getsummary:
import auroraplus
AuroraPlus = auroraplus.api("user.name@outlook.com", "password")
if (not AuroraPlus.Error):
AuroraPlus.getsummary()
print(AuroraPlus.DollarValueUsage['T41'])
print(AuroraPlus.DollarValueUsage['T31'])
print(AuroraPlus.DollarValueUsage['Other'])
print(AuroraPlus.DollarValueUsage['Total'])
print(AuroraPlus.KilowattHourUsage['T41'])
print(AuroraPlus.KilowattHourUsage['T31'])
print(AuroraPlus.KilowattHourUsage['Total'])
else:
print(AuroraPlus.Error)
Note: Offpeak tarrifs not listed
To get usage data use the following, this returns all available data in json format for each timespan:
AuroraPlus.getday()
AuroraPlus.getweek()
AuroraPlus.getmonth()
AuroraPlus.getquarter()
AuroraPlus.getyear()
Full example:
AuroraPlus = auroraplus.api("user.name@outlook.com", "password")
if (not AuroraPlus.Error):
AuroraPlus.getcurrent()
print(AuroraPlus.AmountOwed)
AuroraPlus.getday()
print(AuroraPlus.day)
AuroraPlus.getweek()
print(AuroraPlus.week)
AuroraPlus.getmonth()
print(AuroraPlus.month
AuroraPlus.getyear()
print(AuroraPlus.year)
else:
print(AuroraPlus.Error)
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
File details
Details for the file auroraplus-1.5.0.tar.gz.
File metadata
- Download URL: auroraplus-1.5.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e0fec03242c6bfe8abb0ce4b5cc1ac4fbf7657ebf144ed1be34101420792d13
|
|
| MD5 |
dbd7d7fb5a50e624a35457034f5c3f79
|
|
| BLAKE2b-256 |
f5c05ba4a5ac9982c19772d7df7f3ffcf7039f921e65142ee73de0b70b542432
|