amberelectric
Amber is an Australian-based electricity retailer that pass through the real-time wholesale price of energy.
Because of Amber's wholesale power prices, you can save hundreds of dollars a year by automating high power devices like air-conditioners, heat pumps and pool pumps.
This Python library provides an interface to the API, allowing you to react to current and forecast prices, as well as download your historic usage.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 2.0.0
- Package version: 2.0.12
- Generator version: 7.10.0
- Build package: org.openapitools.codegen.languages.PythonPydanticV1ClientCodegen
For more information, please visit https://www.amber.com.au
Requirements.
Python 3.7+
Installation & Usage
pip install
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
)
Then import the package:
import amberelectric
Building
Build via Poetry
poetry build
Tests
Execute pytest
to run the tests.
Getting Started
Please follow the installation procedure and then run the following:
import time
import amberelectric
from amberelectric.rest import ApiException
from pprint import pprint
configuration = amberelectric.Configuration(
host = "https://api.amber.com.au/v1"
)
configuration = amberelectric.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
with amberelectric.ApiClient(configuration) as api_client:
api_instance = amberelectric.AmberApi(api_client)
site_id = '01J23BAP2SFA218BMV8A73Y9Z9'
next = 48
previous = 48
resolution = 56
try:
api_response = api_instance.get_current_prices(site_id, next=next, previous=previous, resolution=resolution)
print("The response of AmberApi->get_current_prices:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling AmberApi->get_current_prices: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://api.amber.com.au/v1
Documentation For Models
Documentation For Authorization
Authentication schemes defined for the API:
apiKey
- Type: Bearer authentication
Author
dev@amber.com.au