Async Python client for the Ecobulles cloud API
Project description
pyecobulles
Async Python client for the Ecobulles cloud API.
This repository started as reverse-engineering notes for the Ecobulles mobile API and now hosts the reusable Python package needed by the Home Assistant integration.
Install
pip install pyecobulles
Usage
import asyncio
from aiohttp import ClientSession
from pyecobulles import EcobullesClient
async def main():
async with ClientSession() as session:
client = EcobullesClient(session=session)
ok, user_id, eco_ref, name = await client.authenticate("email", "password")
if not ok or eco_ref is None:
raise RuntimeError("Authentication failed")
usage = await client.get_total_water_and_co2_usage(eco_ref)
device = await client.get_device_info(eco_ref)
print(name, usage, device)
asyncio.run(main())
Development
python -m pip install -r requirements_dev.txt
pytest -q --cov
mypy pyecobulles
python -m build
Publishing
Publishing is automated with PyPI Trusted Publishing through .github/workflows/publish.yml.
Manual setup required once:
- Create a PyPI account.
- Create a GitHub environment named
pypi. - In PyPI, configure Trusted Publishing for:
- owner:
jul-fls - repository:
ecobulles_api - workflow:
publish.yml - environment:
pypi
- owner:
- Create a GitHub Release to publish the package.
No long-lived PyPI API token is needed when Trusted Publishing is configured.
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 pyecobulles-0.1.0.tar.gz.
File metadata
- Download URL: pyecobulles-0.1.0.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
891be04d4327c090ad5ff7a9a6aec49fcffe12925766c189fa25e4958371312a
|
|
| MD5 |
aefcfb1f2502f16678fad5f67e67703e
|
|
| BLAKE2b-256 |
8a4a09b57b4fad3929f06d4817b0cdbdacf0b547922b301d006c80ddfe4938a1
|
Provenance
The following attestation bundles were made for pyecobulles-0.1.0.tar.gz:
Publisher:
publish.yml on jul-fls/pyecobulles
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyecobulles-0.1.0.tar.gz -
Subject digest:
891be04d4327c090ad5ff7a9a6aec49fcffe12925766c189fa25e4958371312a - Sigstore transparency entry: 1675034098
- Sigstore integration time:
-
Permalink:
jul-fls/pyecobulles@f2c33bd0782b8fa163c022dbdde0a11af43d04f9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jul-fls
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f2c33bd0782b8fa163c022dbdde0a11af43d04f9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pyecobulles-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyecobulles-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
454c646d53061c4699d6870368930a5f36f20a184dc8dca32161897d4beeeaeb
|
|
| MD5 |
c26be7d9efb65675025e5a6804667141
|
|
| BLAKE2b-256 |
47d8197e956af17e5fec1b43a8f249af5a3dd55386d88bae49d13ad5ad38b55c
|
Provenance
The following attestation bundles were made for pyecobulles-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on jul-fls/pyecobulles
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyecobulles-0.1.0-py3-none-any.whl -
Subject digest:
454c646d53061c4699d6870368930a5f36f20a184dc8dca32161897d4beeeaeb - Sigstore transparency entry: 1675034132
- Sigstore integration time:
-
Permalink:
jul-fls/pyecobulles@f2c33bd0782b8fa163c022dbdde0a11af43d04f9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jul-fls
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f2c33bd0782b8fa163c022dbdde0a11af43d04f9 -
Trigger Event:
release
-
Statement type: