openccu-loom-types 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- openccu_loom_types-0.1.0/LICENSE +21 -0
- openccu_loom_types-0.1.0/PKG-INFO +92 -0
- openccu_loom_types-0.1.0/README.md +69 -0
- openccu_loom_types-0.1.0/openccu_loom_types/__init__.py +20 -0
- openccu_loom_types-0.1.0/openccu_loom_types/enums.py +780 -0
- openccu_loom_types-0.1.0/openccu_loom_types/py.typed +0 -0
- openccu_loom_types-0.1.0/openccu_loom_types/rest.py +884 -0
- openccu_loom_types-0.1.0/openccu_loom_types.egg-info/PKG-INFO +92 -0
- openccu_loom_types-0.1.0/openccu_loom_types.egg-info/SOURCES.txt +12 -0
- openccu_loom_types-0.1.0/openccu_loom_types.egg-info/dependency_links.txt +1 -0
- openccu_loom_types-0.1.0/openccu_loom_types.egg-info/requires.txt +5 -0
- openccu_loom_types-0.1.0/openccu_loom_types.egg-info/top_level.txt +1 -0
- openccu_loom_types-0.1.0/pyproject.toml +39 -0
- openccu_loom_types-0.1.0/setup.cfg +4 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 SukramJ
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: openccu-loom-types
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Generated Pydantic / enum types for the openccu-loom REST + WebSocket contract
|
|
5
|
+
Author: OpenCCU-Loom authors
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/SukramJ/openccu-loom-types-py
|
|
8
|
+
Project-URL: Bug Tracker, https://github.com/SukramJ/openccu-loom-types-py/issues
|
|
9
|
+
Project-URL: Source Repo, https://github.com/SukramJ/openccu-loom
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Topic :: Home Automation
|
|
14
|
+
Classifier: Typing :: Typed
|
|
15
|
+
Requires-Python: >=3.11
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
License-File: LICENSE
|
|
18
|
+
Requires-Dist: pydantic>=2.6
|
|
19
|
+
Provides-Extra: dev
|
|
20
|
+
Requires-Dist: datamodel-code-generator[ruff]>=0.57; extra == "dev"
|
|
21
|
+
Requires-Dist: pytest>=7.4; extra == "dev"
|
|
22
|
+
Dynamic: license-file
|
|
23
|
+
|
|
24
|
+
# openccu-loom-types-py
|
|
25
|
+
|
|
26
|
+
Generated Pydantic models + enum definitions for the openccu-loom
|
|
27
|
+
REST + WebSocket contract. Sister-repo to the
|
|
28
|
+
[openccu-loom daemon](https://github.com/SukramJ/openccu-loom);
|
|
29
|
+
publishable as `openccu-loom-types` on PyPI.
|
|
30
|
+
|
|
31
|
+
## What this package provides
|
|
32
|
+
|
|
33
|
+
- `openccu_loom_types.enums` — every enum from the daemon's
|
|
34
|
+
`pkg/hmenum`. Each enum is a `str`-typed Python `Enum` whose values
|
|
35
|
+
match the wire strings the CCU emits. Source of truth:
|
|
36
|
+
`assets/schemas/enums.json` in the openccu-loom repo.
|
|
37
|
+
- `openccu_loom_types.rest` — Pydantic models for the REST surface.
|
|
38
|
+
Generated from `assets/openapi.yaml` via `datamodel-code-generator`.
|
|
39
|
+
- `openccu_loom_types.ws` — Pydantic models for the WebSocket
|
|
40
|
+
envelope + push payloads. Generated from the same OpenAPI document
|
|
41
|
+
(the WS envelope schemas live in `components.schemas` per ADR-0020).
|
|
42
|
+
|
|
43
|
+
## Why this exists (asks.md C1 + C3)
|
|
44
|
+
|
|
45
|
+
Higher-level clients (`py-openccu-loom-client`, the future
|
|
46
|
+
homematicip_local refactor) need stable typed bindings against the
|
|
47
|
+
daemon. Without a published types package each consumer would
|
|
48
|
+
duplicate the model code and drift away from the daemon's wire
|
|
49
|
+
contract. This package is the single import every Python consumer
|
|
50
|
+
shares — version-pinned and CI-rebuilt on every openccu-loom release.
|
|
51
|
+
|
|
52
|
+
## Regeneration workflow
|
|
53
|
+
|
|
54
|
+
Set `OPENCCU_LOOM_REPO` to a local checkout of the daemon repo
|
|
55
|
+
(default: `../openccu-loom`):
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
# Step 1 — make sure the daemon repo's schema export is fresh:
|
|
59
|
+
make -C "$OPENCCU_LOOM_REPO" export-schemas
|
|
60
|
+
|
|
61
|
+
# Step 2 — regenerate this package's models:
|
|
62
|
+
make generate
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
The two-step split keeps the daemon repo authoritative; this package
|
|
66
|
+
never re-parses Go source.
|
|
67
|
+
|
|
68
|
+
### Tooling required
|
|
69
|
+
|
|
70
|
+
- Python >= 3.11
|
|
71
|
+
- `datamodel-code-generator` >= 0.25 (for REST + WS Pydantic models)
|
|
72
|
+
|
|
73
|
+
Install both with `pip install -e '.[dev]'`.
|
|
74
|
+
|
|
75
|
+
## Versioning
|
|
76
|
+
|
|
77
|
+
The package version (`pyproject.toml`) tracks the daemon's
|
|
78
|
+
`api_version` (currently `1.0.0`). Minor bumps add fields without
|
|
79
|
+
breaking existing consumers; major bumps remove or rename payload
|
|
80
|
+
fields, scopes, or capabilities — see ADR-0020 in the daemon repo
|
|
81
|
+
for the contract evolution policy.
|
|
82
|
+
|
|
83
|
+
## What this package does NOT contain
|
|
84
|
+
|
|
85
|
+
- HTTP / WebSocket transport — see `py-openccu-loom-client`
|
|
86
|
+
(when published) for the higher-level client.
|
|
87
|
+
- Any business logic — types only.
|
|
88
|
+
- Async helpers — types are framework-neutral.
|
|
89
|
+
|
|
90
|
+
## License
|
|
91
|
+
|
|
92
|
+
MIT. See [LICENSE](./LICENSE).
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# openccu-loom-types-py
|
|
2
|
+
|
|
3
|
+
Generated Pydantic models + enum definitions for the openccu-loom
|
|
4
|
+
REST + WebSocket contract. Sister-repo to the
|
|
5
|
+
[openccu-loom daemon](https://github.com/SukramJ/openccu-loom);
|
|
6
|
+
publishable as `openccu-loom-types` on PyPI.
|
|
7
|
+
|
|
8
|
+
## What this package provides
|
|
9
|
+
|
|
10
|
+
- `openccu_loom_types.enums` — every enum from the daemon's
|
|
11
|
+
`pkg/hmenum`. Each enum is a `str`-typed Python `Enum` whose values
|
|
12
|
+
match the wire strings the CCU emits. Source of truth:
|
|
13
|
+
`assets/schemas/enums.json` in the openccu-loom repo.
|
|
14
|
+
- `openccu_loom_types.rest` — Pydantic models for the REST surface.
|
|
15
|
+
Generated from `assets/openapi.yaml` via `datamodel-code-generator`.
|
|
16
|
+
- `openccu_loom_types.ws` — Pydantic models for the WebSocket
|
|
17
|
+
envelope + push payloads. Generated from the same OpenAPI document
|
|
18
|
+
(the WS envelope schemas live in `components.schemas` per ADR-0020).
|
|
19
|
+
|
|
20
|
+
## Why this exists (asks.md C1 + C3)
|
|
21
|
+
|
|
22
|
+
Higher-level clients (`py-openccu-loom-client`, the future
|
|
23
|
+
homematicip_local refactor) need stable typed bindings against the
|
|
24
|
+
daemon. Without a published types package each consumer would
|
|
25
|
+
duplicate the model code and drift away from the daemon's wire
|
|
26
|
+
contract. This package is the single import every Python consumer
|
|
27
|
+
shares — version-pinned and CI-rebuilt on every openccu-loom release.
|
|
28
|
+
|
|
29
|
+
## Regeneration workflow
|
|
30
|
+
|
|
31
|
+
Set `OPENCCU_LOOM_REPO` to a local checkout of the daemon repo
|
|
32
|
+
(default: `../openccu-loom`):
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
# Step 1 — make sure the daemon repo's schema export is fresh:
|
|
36
|
+
make -C "$OPENCCU_LOOM_REPO" export-schemas
|
|
37
|
+
|
|
38
|
+
# Step 2 — regenerate this package's models:
|
|
39
|
+
make generate
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The two-step split keeps the daemon repo authoritative; this package
|
|
43
|
+
never re-parses Go source.
|
|
44
|
+
|
|
45
|
+
### Tooling required
|
|
46
|
+
|
|
47
|
+
- Python >= 3.11
|
|
48
|
+
- `datamodel-code-generator` >= 0.25 (for REST + WS Pydantic models)
|
|
49
|
+
|
|
50
|
+
Install both with `pip install -e '.[dev]'`.
|
|
51
|
+
|
|
52
|
+
## Versioning
|
|
53
|
+
|
|
54
|
+
The package version (`pyproject.toml`) tracks the daemon's
|
|
55
|
+
`api_version` (currently `1.0.0`). Minor bumps add fields without
|
|
56
|
+
breaking existing consumers; major bumps remove or rename payload
|
|
57
|
+
fields, scopes, or capabilities — see ADR-0020 in the daemon repo
|
|
58
|
+
for the contract evolution policy.
|
|
59
|
+
|
|
60
|
+
## What this package does NOT contain
|
|
61
|
+
|
|
62
|
+
- HTTP / WebSocket transport — see `py-openccu-loom-client`
|
|
63
|
+
(when published) for the higher-level client.
|
|
64
|
+
- Any business logic — types only.
|
|
65
|
+
- Async helpers — types are framework-neutral.
|
|
66
|
+
|
|
67
|
+
## License
|
|
68
|
+
|
|
69
|
+
MIT. See [LICENSE](./LICENSE).
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# SPDX-License-Identifier: MIT
|
|
2
|
+
# Copyright (C) 2026 OpenCCU-Loom authors.
|
|
3
|
+
|
|
4
|
+
"""openccu-loom-types — generated typing bindings for the openccu-loom daemon.
|
|
5
|
+
|
|
6
|
+
Submodules:
|
|
7
|
+
|
|
8
|
+
- :mod:`openccu_loom_types.enums` — every enum from `pkg/hmenum`
|
|
9
|
+
(generated from `assets/schemas/enums.json`).
|
|
10
|
+
- :mod:`openccu_loom_types.rest` — Pydantic models for the REST
|
|
11
|
+
surface (generated from `assets/openapi.yaml`).
|
|
12
|
+
- :mod:`openccu_loom_types.ws` — Pydantic models for the WebSocket
|
|
13
|
+
envelope + push payloads (planned; currently bundled in
|
|
14
|
+
:mod:`openccu_loom_types.rest` until the schema-grouping in
|
|
15
|
+
openapi.yaml stabilises).
|
|
16
|
+
|
|
17
|
+
See README.md for the regeneration workflow.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
__version__ = "0.1.0"
|