Skip to content

v0.1.0 — Initial release

Choose a tag to compare

@jasonjhofmann jasonjhofmann released this 28 May 03:38
· 10 commits to main since this 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
  • 21 dataclasses covering the response schemas, each with a from_dict that silently ignores unknown fields (forward-compatible).
  • Exception hierarchy: AranetError (base), AranetAuthError (401), AranetValidationError (400 with correlation_id), AranetRateLimitError (429 with retry_after), AranetServerError (5xx after retries), AranetConnectionError, AranetNotFoundError.
  • Async-iterator paginationiter_measurements_history and iter_telemetry_history follow the next URL transparently.
  • Exponential-backoff retry on 5xx / 429 / transient network errors, capped at 30 s; honours server-supplied Retry-After on 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.typed marker 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).