Skip to main content

Async HTTP client for the local Duco Connectivity API

Project description

python-duco-connectivity

Async Python client for the local Duco HTTP API.

python-duco-connectivity is a small async client for the unauthenticated local Duco HTTP endpoints that were validated during initial development. The library keeps its public models close to the API payload shape and is intended to stay reusable outside Home Assistant.

Installation

Until the first PyPI release is published, install directly from GitHub:

pip install git+https://github.com/ronaldvdmeer/python-duco-connectivity.git

After the package is published on PyPI, install it with:

pip install python-duco-connectivity

Current scope

  • HTTP only
  • asynchronous communication via aiohttp
  • typed models that stay close to the API response shape

Public API surface

The current client exposes:

  • async_get_api_info() for GET /api
  • async_get_board_info() for GET /info?module=General&submodule=Board
  • async_get_lan_info() for GET /info?module=General&submodule=Lan
  • async_get_nodes() for GET /info/nodes
  • async_get_diagnostics() for GET /info?module=Diag
  • async_get_write_requests_remaining() for GET /info?module=General&submodule=PublicApi
  • async_set_ventilation_state() for POST /action/nodes/{node} with SetVentilationState

The model layer includes ApiInfo, BoardInfo, LanInfo, Node, NodeGeneralInfo, NodeVentilationInfo, and NodeSensorInfo.

Development

Install the development dependencies and run the same checks as CI:

pip install ".[dev]"
pytest
ruff check src tests
ruff format --check src tests
mypy src
bandit -r src -ll
pip-audit --desc on

Validation

The current API surface was validated against a real Duco box during the first development pass, covering:

  • GET /api
  • GET /info?module=General&submodule=Board
  • GET /info?module=General&submodule=Lan
  • GET /info/nodes
  • GET /info?module=General&submodule=PublicApi
  • POST /action/nodes/{node} with a no-op SetVentilationState

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

python_duco_connectivity-0.1.0.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

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

python_duco_connectivity-0.1.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file python_duco_connectivity-0.1.0.tar.gz.

File metadata

  • Download URL: python_duco_connectivity-0.1.0.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for python_duco_connectivity-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a029506c99b53701e8b0188d2e5f78bb9ac5489e31692e4269ef317640e3fb6e
MD5 0960b20cb5727fa0aa7b98feb9e9cbc5
BLAKE2b-256 90882ed4965711b4dca3c8c3b962b49960944fe5dcdad64ae63d3daba2cb66ad

See more details on using hashes here.

Provenance

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

Publisher: ci.yml on ronaldvdmeer/python-duco-connectivity

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

File details

Details for the file python_duco_connectivity-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for python_duco_connectivity-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f9f9886fd5341875b03dd392ec76fc097b6fa9f0236c210fffc02e25aa1d9331
MD5 8edb34d90ed7271d9c19d4c11f8d22eb
BLAKE2b-256 9a7fad86e96079f6d8786be18b092a57a47a4b80834af990cb26372eb92301ff

See more details on using hashes here.

Provenance

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

Publisher: ci.yml on ronaldvdmeer/python-duco-connectivity

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