Python Library for Amber Electric API
Description
Connects to the Amber Electric API and retrieves market, usage and pricing information
Note
This is in no way affiliated with Amber Electric.
Issues
I don't know what the usage data for an account looks like at the moment. Until I have an account with active usage data - this part of the API is going to be very light.
Logging / Debugging
This library uses logging just set the log level and format you need.
Example
The examples below may look a little complex - because this library relies on functions like .auth() and .update() being awaited.
See current market pricing
import asyncio
from amber_electric import AmberElectric
api = AmberElectric(
latitude=-37.828690,
longitude=144.997460,
)
async def display_market_pricing():
await api.market.update()
print(api.market)
asyncio.get_event_loop().run_until_complete(display_market_pricing())
Get your current pricing
import asyncio
from amber_electric import AmberElectric
api = AmberElectric(
latitude=-37.828690,
longitude=144.997460,
username="family@example.com",
password="secret"
)
async def get_account_pricing():
await api.auth()
await api.price.update()
print(api.price)
asyncio.get_event_loop().run_until_complete(get_account_pricing())
Get your current usage (WIP)
import asyncio
from amber_electric import AmberElectric
api = AmberElectric(
latitude=-37.828690,
longitude=144.997460,
username="family@example.com",
password="secret"
)
async def get_account_pricing():
await api.auth()
await api.usage.update()
print(api.usage)
asyncio.get_event_loop().run_until_complete(get_account_pricing())
Support
Metadata
Release files for amber-electric 0.0.17
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| amber-electric-0.0.17.tar.gz | 30.6 kB | Without provenance | Details for amber-electric-0.0.17.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| amber_electric-0.0.17-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for amber_electric-0.0.17-py2.py3-none-any.whl |
Total release size: 52.7 kB
Release files / amber-electric-0.0.17.tar.gz
| Download URL | amber-electric-0.0.17.tar.gz |
|---|---|
| Size | 30.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
90f1fbcfd47cd2a517c1fefe47ab664205b767a82d5f2cc45a99ade938193a80
|
|
BLAKE2b-256 checksum How to use checksums |
2001b0bf49474c61b08aa074d020b5644a6c25b2846c05ed5c1409db9a8ade1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.1 CPython/3.8.6
|
Release files / amber_electric-0.0.17-py2.py3-none-any.whl
| Download URL | amber_electric-0.0.17-py2.py3-none-any.whl |
|---|---|
| Size | 22.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
b9f253399a05e834651795c99e162dafe2edb8bcbe5047895273fc7ca6f9dcca
|
|
BLAKE2b-256 checksum How to use checksums |
7f27fce6499fce50486f715a3797b9d51a36d06cc80ca7f15392bec101c1930d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.1 CPython/3.8.6
|
Security for amber-electric 0.0.17
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.