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.1.tar.gz (12.9 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.1-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python_duco_connectivity-0.1.1.tar.gz
  • Upload date:
  • Size: 12.9 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.1.tar.gz
Algorithm Hash digest
SHA256 1d39faeaf1f11b92144e2e33e217fec7e2d9917acf4e23a1cbff6e65415edbf7
MD5 4a20931a6ca898c9c4c0fabb923fa5da
BLAKE2b-256 77d9a2be3ef06cea85ebc6976fd562b7730daa1b621764f7fc3ed3225c0d721e

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_duco_connectivity-0.1.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for python_duco_connectivity-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f0a842f5e5db408c6632ef6995f9776c5080cf74392da95534f056c19045b2da
MD5 a81ca1f057148dcb8a496bd862d8b6fc
BLAKE2b-256 edaa972c2071ef7ca32edb633a7fa8ff576a5fbd5699ec4d2ebfcf27fafc2c2e

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_duco_connectivity-0.1.1-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