Skip to main content

Generated Pydantic / enum types for the openccu-loom REST + WebSocket contract

Project description

openccu-loom-types-py

Generated Pydantic models + enum definitions for the openccu-loom REST + WebSocket contract. Sister-repo to the openccu-loom daemon; publishable as openccu-loom-types on PyPI.

What this package provides

  • openccu_loom_types.enums — every enum from the daemon's pkg/hmenum. Each enum is a str-typed Python Enum whose values match the wire strings the CCU emits. Source of truth: assets/schemas/enums.json in the openccu-loom repo.
  • openccu_loom_types.rest — Pydantic models for the REST surface. Generated from assets/openapi.yaml via datamodel-code-generator.
  • openccu_loom_types.ws — Pydantic models for the WebSocket envelope + push payloads. Generated from the same OpenAPI document (the WS envelope schemas live in components.schemas per ADR-0020).

Why this exists (asks.md C1 + C3)

Higher-level clients (py-openccu-loom-client, the future homematicip_local refactor) need stable typed bindings against the daemon. Without a published types package each consumer would duplicate the model code and drift away from the daemon's wire contract. This package is the single import every Python consumer shares — version-pinned and CI-rebuilt on every openccu-loom release.

Regeneration workflow

Set OPENCCU_LOOM_REPO to a local checkout of the daemon repo (default: ../openccu-loom):

# Step 1 — make sure the daemon repo's schema export is fresh:
make -C "$OPENCCU_LOOM_REPO" export-schemas

# Step 2 — regenerate this package's models:
make generate

The two-step split keeps the daemon repo authoritative; this package never re-parses Go source.

Tooling required

  • Python >= 3.11
  • datamodel-code-generator >= 0.25 (for REST + WS Pydantic models)

Install both with pip install -e '.[dev]'.

Versioning

The package version (pyproject.toml) tracks the daemon's api_version (currently 1.0.0). Minor bumps add fields without breaking existing consumers; major bumps remove or rename payload fields, scopes, or capabilities — see ADR-0020 in the daemon repo for the contract evolution policy.

What this package does NOT contain

  • HTTP / WebSocket transport — see py-openccu-loom-client (when published) for the higher-level client.
  • Any business logic — types only.
  • Async helpers — types are framework-neutral.

License

MIT. See LICENSE.

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

openccu_loom_types-0.1.8.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

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

openccu_loom_types-0.1.8-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

Details for the file openccu_loom_types-0.1.8.tar.gz.

File metadata

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

File hashes

Hashes for openccu_loom_types-0.1.8.tar.gz
Algorithm Hash digest
SHA256 6094863526a5a1e4dc12830b2c13c014e4d7332c73e7deed5b87d59874d0fd4f
MD5 6cf6062f55d52798b4c09ece6cfb05fb
BLAKE2b-256 1ad33f423442a9abd9f36969e299f528d39d58c042d66843444e72855c2c96d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for openccu_loom_types-0.1.8.tar.gz:

Publisher: python-publish.yml on SukramJ/openccu-loom-types

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

File details

Details for the file openccu_loom_types-0.1.8-py3-none-any.whl.

File metadata

File hashes

Hashes for openccu_loom_types-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 f8d2e7f931d6eeaa0e0c9eecb8aadc67c09ff9347e577aa68bc012d3a4f4c946
MD5 83bc1877db6900cbb0e6ebb99852e86d
BLAKE2b-256 18ff0dbb9af5cc5ab71195a27734e72450eb7635665f55e95cbf6b9a8c23b221

See more details on using hashes here.

Provenance

The following attestation bundles were made for openccu_loom_types-0.1.8-py3-none-any.whl:

Publisher: python-publish.yml on SukramJ/openccu-loom-types

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