v0.1.0 — Initial release
Async client for every endpoint in the Aranet Cloud OpenAPI 3.0 spec (27 GETs, read-only), typed dataclass models, hidden pagination, full exception hierarchy.
Available on PyPI: pip install aranet-cloud==0.1.0
Added
AranetCloudClient— async client with one method per documented endpoint:- Sensors:
get_sensors,get_sensor,get_sensor_types,get_sensor_type - Measurements:
get_measurements_last,iter_measurements_history - Telemetry:
get_telemetry_last,iter_telemetry_history - Bases:
get_bases,get_base - Alarms:
get_alarms_actual,get_alarms_history,get_alarm_rules,get_alarm_rule - Assets:
get_assets,get_asset - Tags:
get_tags,get_tag - Catalog:
get_metrics,get_metric,get_unit - Attachments:
download_sensor_attachment,download_asset_attachment
- Sensors:
- 21 dataclasses covering the response schemas, each with a
from_dictthat silently ignores unknown fields (forward-compatible). - Exception hierarchy:
AranetError(base),AranetAuthError(401),AranetValidationError(400 withcorrelation_id),AranetRateLimitError(429 withretry_after),AranetServerError(5xx after retries),AranetConnectionError,AranetNotFoundError. - Async-iterator pagination —
iter_measurements_historyanditer_telemetry_historyfollow thenextURL transparently. - Exponential-backoff retry on 5xx / 429 / transient network errors, capped at 30 s; honours server-supplied
Retry-Afteron 429. - Polite-spacing floor (250 ms) between successive requests.
- Optional session injection — pass an existing
aiohttp.ClientSession; lib auto-creates and owns its session otherwise. py.typedmarker for PEP-561 type checkers.- 23 unit + integration tests against
aioresponses.
Notes
- Live-verified end-to-end against the production Aranet Cloud API on 2026-05-19.
- Build tooling:
ruff(lint),mypy --strict(types),pytest+pytest-asyncio(tests),hatchling(wheel/sdist).