Skip to main content

Async Python client for the Ecobulles cloud API

Project description

pyecobulles

CI codecov

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:

  1. Create a PyPI account.
  2. Create a GitHub environment named pypi.
  3. In PyPI, configure Trusted Publishing for:
    • owner: jul-fls
    • repository: ecobulles_api
    • workflow: publish.yml
    • environment: pypi
  4. Create a GitHub Release to publish the package.

No long-lived PyPI API token is needed when Trusted Publishing is configured.

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

pyecobulles-0.1.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyecobulles-0.1.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

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

Hashes for pyecobulles-0.1.0.tar.gz
Algorithm Hash digest
SHA256 891be04d4327c090ad5ff7a9a6aec49fcffe12925766c189fa25e4958371312a
MD5 aefcfb1f2502f16678fad5f67e67703e
BLAKE2b-256 8a4a09b57b4fad3929f06d4817b0cdbdacf0b547922b301d006c80ddfe4938a1

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyecobulles-0.1.0.tar.gz:

Publisher: publish.yml on jul-fls/pyecobulles

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for pyecobulles-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 454c646d53061c4699d6870368930a5f36f20a184dc8dca32161897d4beeeaeb
MD5 c26be7d9efb65675025e5a6804667141
BLAKE2b-256 47d8197e956af17e5fec1b43a8f249af5a3dd55386d88bae49d13ad5ad38b55c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyecobulles-0.1.0-py3-none-any.whl:

Publisher: publish.yml on jul-fls/pyecobulles

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page