led-controller-version-3 3.0.2__tar.gz → 3.0.3__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.
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/PKG-INFO +5 -5
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/pyproject.toml +5 -5
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/device/respeaker/registration.py +54 -3
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/device/respeaker/xvf.py +31 -4
- led_controller_version_3-3.0.3/src/lefx/interfaces/__init__.py +77 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/interfaces/api.py +1 -2
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/interfaces/client.py +1 -1
- led_controller_version_3-3.0.3/src/lefx/interfaces/contract.py +19 -0
- led_controller_version_3-3.0.3/src/lefx/sets/core_set/core-set.lefxset +0 -0
- led_controller_version_3-3.0.3/src/lefx/sets/smartspeaker_set/smartspeaker-set.lefxset +0 -0
- led_controller_version_3-3.0.2/src/lefx/interfaces/__init__.py +0 -40
- led_controller_version_3-3.0.2/src/lefx/sets/core_set/core-set.lefxset +0 -0
- led_controller_version_3-3.0.2/src/lefx/sets/smartspeaker_set/smartspeaker-set.lefxset +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/.gitignore +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/README.md +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/device/respeaker/__init__.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/device/respeaker/cli.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/device/respeaker/contention.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/device/respeaker/provider.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/device/respeaker/sink.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/device/respeaker/transport.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/engine/__init__.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/engine/composer.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/engine/config.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/engine/errors.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/engine/inputs.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/engine/invocation.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/engine/layers.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/engine/library.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/engine/packages/__init__.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/engine/packages/loader.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/engine/packages/manifest.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/engine/registry.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/engine/renderer.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/engine/runtime.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/engine/store.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/interfaces/cli.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/interfaces/config.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/interfaces/discovery.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/interfaces/hosting.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/interfaces/paths.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/interfaces/presentation.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/interfaces/service.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/sdk/__init__.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/sdk/calibration.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/sdk/color.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/sdk/context.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/sdk/definitions.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/sdk/effects.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/sdk/errors.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/sdk/parameters.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/sdk/ports.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/sdk/validation.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/sdk/values.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/sets/core_set/__init__.py +0 -0
- {led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/sets/smartspeaker_set/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: led-controller-version-3
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.3
|
|
4
4
|
Summary: LED ring control for the reSpeaker XVF3800 — the LEFX V3 effect system
|
|
5
5
|
Project-URL: Homepage, https://github.com/marcosudau-vps/led_controller_respeaker-v3
|
|
6
6
|
Project-URL: Source, https://github.com/marcosudau-vps/led_controller_respeaker-v3
|
|
@@ -21,12 +21,12 @@ Requires-Dist: pyyaml<7,>=6.0.2
|
|
|
21
21
|
Requires-Dist: tzdata>=2025.2; platform_system == 'Windows'
|
|
22
22
|
Requires-Dist: uvicorn<0.45,>=0.44.0
|
|
23
23
|
Provides-Extra: all
|
|
24
|
-
Requires-Dist: led-controller-version-3-device-simulated-respeaker[gui]==3.0.
|
|
25
|
-
Requires-Dist: led-controller-version-3-effect-creation==3.0.
|
|
24
|
+
Requires-Dist: led-controller-version-3-device-simulated-respeaker[gui]==3.0.3; extra == 'all'
|
|
25
|
+
Requires-Dist: led-controller-version-3-effect-creation==3.0.3; extra == 'all'
|
|
26
26
|
Provides-Extra: effect-creation
|
|
27
|
-
Requires-Dist: led-controller-version-3-effect-creation==3.0.
|
|
27
|
+
Requires-Dist: led-controller-version-3-effect-creation==3.0.3; extra == 'effect-creation'
|
|
28
28
|
Provides-Extra: simulated-respeaker
|
|
29
|
-
Requires-Dist: led-controller-version-3-device-simulated-respeaker[gui]==3.0.
|
|
29
|
+
Requires-Dist: led-controller-version-3-device-simulated-respeaker[gui]==3.0.3; extra == 'simulated-respeaker'
|
|
30
30
|
Description-Content-Type: text/markdown
|
|
31
31
|
|
|
32
32
|
# led-controller-version-3
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "led-controller-version-3"
|
|
7
|
-
version = "3.0.
|
|
7
|
+
version = "3.0.3"
|
|
8
8
|
description = "LED ring control for the reSpeaker XVF3800 — the LEFX V3 effect system"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -50,11 +50,11 @@ dependencies = [
|
|
|
50
50
|
# selected at runtime by included_lefxset, because choosing which effects to
|
|
51
51
|
# load is a configuration question, not an installation question.
|
|
52
52
|
[project.optional-dependencies]
|
|
53
|
-
simulated-respeaker = ["led-controller-version-3-device-simulated-respeaker[gui]==3.0.
|
|
54
|
-
effect-creation = ["led-controller-version-3-effect-creation==3.0.
|
|
53
|
+
simulated-respeaker = ["led-controller-version-3-device-simulated-respeaker[gui]==3.0.3"]
|
|
54
|
+
effect-creation = ["led-controller-version-3-effect-creation==3.0.3"]
|
|
55
55
|
all = [
|
|
56
|
-
"led-controller-version-3-device-simulated-respeaker[gui]==3.0.
|
|
57
|
-
"led-controller-version-3-effect-creation==3.0.
|
|
56
|
+
"led-controller-version-3-device-simulated-respeaker[gui]==3.0.3",
|
|
57
|
+
"led-controller-version-3-effect-creation==3.0.3",
|
|
58
58
|
]
|
|
59
59
|
|
|
60
60
|
[project.scripts]
|
|
@@ -44,6 +44,20 @@ def as_bool(value: Any) -> bool:
|
|
|
44
44
|
return str(value).strip().casefold() in {"1", "true", "yes", "on", "ja", "an"}
|
|
45
45
|
|
|
46
46
|
|
|
47
|
+
def as_int(value: Any) -> int:
|
|
48
|
+
"""Coerce a sink option to a whole number, accepting ``0x2886`` as written.
|
|
49
|
+
|
|
50
|
+
Base zero rather than ten, because the two options that use this are a USB
|
|
51
|
+
vendor and product id, and every datasheet, every device manager entry and
|
|
52
|
+
every line of documentation writes those in hex.
|
|
53
|
+
"""
|
|
54
|
+
if isinstance(value, bool):
|
|
55
|
+
raise ValueError("expected a number, got a flag")
|
|
56
|
+
if isinstance(value, int):
|
|
57
|
+
return value
|
|
58
|
+
return int(str(value).strip(), 0)
|
|
59
|
+
|
|
60
|
+
|
|
47
61
|
def shared_transport(**options: Any) -> UsbTransport:
|
|
48
62
|
"""The one managed USB connection, created on first use and kept running.
|
|
49
63
|
|
|
@@ -71,17 +85,38 @@ def reset_shared_transport() -> None:
|
|
|
71
85
|
transport.close()
|
|
72
86
|
|
|
73
87
|
|
|
74
|
-
def _transport_options(
|
|
88
|
+
def _transport_options(
|
|
89
|
+
force_claim: Any,
|
|
90
|
+
claim_unrelated: Any,
|
|
91
|
+
vendor_id: Any = None,
|
|
92
|
+
product_id: Any = None,
|
|
93
|
+
usb_timeout_ms: Any = None,
|
|
94
|
+
) -> dict[str, Any]:
|
|
75
95
|
"""Only what the caller actually asked for.
|
|
76
96
|
|
|
77
97
|
Force-claiming terminates another program, so it is never inferred from a
|
|
78
98
|
default. It has to be spelled out, every time, by whoever is running this.
|
|
99
|
+
|
|
100
|
+
Device identity and transfer timeout travel as a prepared ``finder`` rather
|
|
101
|
+
than as three more transport parameters. The transport's job is keeping a
|
|
102
|
+
connection alive, not knowing which device it is or how patient to be with
|
|
103
|
+
it; both of those belong to whoever opens the handle, and that is the finder.
|
|
104
|
+
Left unspecified, no finder is passed at all and the transport keeps its own
|
|
105
|
+
default — so an ordinary installation is unaffected by any of this.
|
|
79
106
|
"""
|
|
80
107
|
options: dict[str, Any] = {}
|
|
81
108
|
if force_claim is not None:
|
|
82
109
|
options["force_claim"] = as_bool(force_claim)
|
|
83
110
|
if claim_unrelated is not None:
|
|
84
111
|
options["claim_unrelated"] = as_bool(claim_unrelated)
|
|
112
|
+
|
|
113
|
+
if vendor_id is None and product_id is None and usb_timeout_ms is None:
|
|
114
|
+
return options
|
|
115
|
+
|
|
116
|
+
vid = xvf.VENDOR_ID if vendor_id is None else as_int(vendor_id)
|
|
117
|
+
pid = xvf.PRODUCT_ID if product_id is None else as_int(product_id)
|
|
118
|
+
timeout = None if usb_timeout_ms is None else as_int(usb_timeout_ms)
|
|
119
|
+
options["finder"] = lambda: xvf.find(vid, pid, timeout_ms=timeout)
|
|
85
120
|
return options
|
|
86
121
|
|
|
87
122
|
|
|
@@ -90,10 +125,17 @@ def create_frame_sink(
|
|
|
90
125
|
led_count: int = xvf.RING_LED_COUNT,
|
|
91
126
|
force_claim: Any = None,
|
|
92
127
|
claim_unrelated: Any = None,
|
|
128
|
+
vendor_id: Any = None,
|
|
129
|
+
product_id: Any = None,
|
|
130
|
+
usb_timeout_ms: Any = None,
|
|
93
131
|
**options: Any,
|
|
94
132
|
) -> FrameSink:
|
|
95
133
|
del options
|
|
96
|
-
transport = shared_transport(
|
|
134
|
+
transport = shared_transport(
|
|
135
|
+
**_transport_options(
|
|
136
|
+
force_claim, claim_unrelated, vendor_id, product_id, usb_timeout_ms
|
|
137
|
+
)
|
|
138
|
+
)
|
|
97
139
|
return ReSpeakerFrameSink(transport, led_count=led_count)
|
|
98
140
|
|
|
99
141
|
|
|
@@ -102,13 +144,20 @@ def create_doa_provider(
|
|
|
102
144
|
max_hz: float = DEFAULT_MAX_HZ,
|
|
103
145
|
force_claim: Any = None,
|
|
104
146
|
claim_unrelated: Any = None,
|
|
147
|
+
vendor_id: Any = None,
|
|
148
|
+
product_id: Any = None,
|
|
149
|
+
usb_timeout_ms: Any = None,
|
|
105
150
|
angle_offset_deg: Any = None,
|
|
106
151
|
reverse: Any = None,
|
|
107
152
|
calibration_file: Any = None,
|
|
108
153
|
**options: Any,
|
|
109
154
|
) -> InputProvider:
|
|
110
155
|
del options
|
|
111
|
-
transport = shared_transport(
|
|
156
|
+
transport = shared_transport(
|
|
157
|
+
**_transport_options(
|
|
158
|
+
force_claim, claim_unrelated, vendor_id, product_id, usb_timeout_ms
|
|
159
|
+
)
|
|
160
|
+
)
|
|
112
161
|
return ReSpeakerDoaProvider(
|
|
113
162
|
transport,
|
|
114
163
|
max_hz=max_hz,
|
|
@@ -123,6 +172,8 @@ def create_doa_provider(
|
|
|
123
172
|
|
|
124
173
|
__all__ = [
|
|
125
174
|
"DEVICE_NAME",
|
|
175
|
+
"as_bool",
|
|
176
|
+
"as_int",
|
|
126
177
|
"create_doa_provider",
|
|
127
178
|
"create_frame_sink",
|
|
128
179
|
"reset_shared_transport",
|
{led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/device/respeaker/xvf.py
RENAMED
|
@@ -35,6 +35,22 @@ PRODUCT_ID = 0x001A
|
|
|
35
35
|
MAX_READ_ATTEMPTS = 100
|
|
36
36
|
"""How often a busy servicer may answer ``retry`` before the read gives up."""
|
|
37
37
|
|
|
38
|
+
DEFAULT_TIMEOUT_MS = 1000
|
|
39
|
+
"""How long one control transfer may take before libusb gives up, in ms.
|
|
40
|
+
|
|
41
|
+
The vendor's tool used 100 seconds. That is not a timeout, it is the absence of
|
|
42
|
+
one: a healthy control transfer answers in microseconds, so the only thing the
|
|
43
|
+
value ever decides is how long a caller waits for a device that has stopped
|
|
44
|
+
answering while its handle still exists — a suspended hub, a driver hiccup, a
|
|
45
|
+
sleep/wake cycle. Waiting 100 seconds for that hangs whoever asked, and the
|
|
46
|
+
managed transport's reconnect loop cannot begin until the call returns, so the
|
|
47
|
+
self-healing that exists on paper never gets a turn.
|
|
48
|
+
|
|
49
|
+
A second is already generous by two orders of magnitude for this device, and it
|
|
50
|
+
sits far below the transport's heartbeat and retry cadence, which is what makes
|
|
51
|
+
a dead link visible while it can still be acted on.
|
|
52
|
+
"""
|
|
53
|
+
|
|
38
54
|
# name, resid, cmdid, length, access, type, description
|
|
39
55
|
PARAMETERS = {
|
|
40
56
|
# APPLICATION_SERVICER_RESID commands
|
|
@@ -183,10 +199,13 @@ class ReSpeaker:
|
|
|
183
199
|
Not thread-safe on its own — serialising access is the transport's job.
|
|
184
200
|
"""
|
|
185
201
|
|
|
186
|
-
TIMEOUT =
|
|
202
|
+
TIMEOUT = DEFAULT_TIMEOUT_MS
|
|
203
|
+
"""Class-level default. ``timeout_ms`` overrides it for one device."""
|
|
187
204
|
|
|
188
|
-
def __init__(self, dev: object) -> None:
|
|
205
|
+
def __init__(self, dev: object, *, timeout_ms: int | None = None) -> None:
|
|
189
206
|
self.dev = dev
|
|
207
|
+
if timeout_ms is not None:
|
|
208
|
+
self.TIMEOUT = int(timeout_ms)
|
|
190
209
|
|
|
191
210
|
def write(self, name: str, data_list: list) -> None:
|
|
192
211
|
try:
|
|
@@ -284,12 +303,19 @@ class ReSpeaker:
|
|
|
284
303
|
usb.util.dispose_resources(self.dev)
|
|
285
304
|
|
|
286
305
|
|
|
287
|
-
def find(
|
|
306
|
+
def find(
|
|
307
|
+
vid: int = VENDOR_ID, pid: int = PRODUCT_ID, *, timeout_ms: int | None = None
|
|
308
|
+
) -> ReSpeaker | None:
|
|
288
309
|
"""Return the connected device, or ``None`` when there is none.
|
|
289
310
|
|
|
290
311
|
Windows needs the backend that ``libusb-package`` ships; elsewhere the
|
|
291
312
|
system backend is already there. The import is local so that a machine
|
|
292
313
|
without the wheel can still import this module.
|
|
314
|
+
|
|
315
|
+
``timeout_ms`` is carried to the device rather than set on it afterwards,
|
|
316
|
+
because a caller that wanted a short timeout wants it to hold for the very
|
|
317
|
+
first transfer too — and the first transfer is the connection probe, which
|
|
318
|
+
is exactly where an unresponsive device shows up.
|
|
293
319
|
"""
|
|
294
320
|
if sys.platform.startswith("win"):
|
|
295
321
|
import libusb_package
|
|
@@ -297,11 +323,12 @@ def find(vid: int = VENDOR_ID, pid: int = PRODUCT_ID) -> ReSpeaker | None:
|
|
|
297
323
|
dev = libusb_package.find(idVendor=vid, idProduct=pid)
|
|
298
324
|
else:
|
|
299
325
|
dev = usb.core.find(idVendor=vid, idProduct=pid)
|
|
300
|
-
return None if dev is None else ReSpeaker(dev)
|
|
326
|
+
return None if dev is None else ReSpeaker(dev, timeout_ms=timeout_ms)
|
|
301
327
|
|
|
302
328
|
|
|
303
329
|
__all__ = [
|
|
304
330
|
"CONTROL_SUCCESS",
|
|
331
|
+
"DEFAULT_TIMEOUT_MS",
|
|
305
332
|
"LED_EFFECT_RING_MODE",
|
|
306
333
|
"PARAMETERS",
|
|
307
334
|
"PRODUCT_ID",
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"""LEFX V3 control surface — HTTP API, CLI, client and service hosting.
|
|
2
|
+
|
|
3
|
+
CLI and API carry the same commands and hold no logic of their own. Frame sinks
|
|
4
|
+
and input providers are discovered through entry points, never imported, so this
|
|
5
|
+
package depends on neither the hardware integration nor the simulator.
|
|
6
|
+
|
|
7
|
+
``create_app`` is resolved on first use rather than on import. It is the only
|
|
8
|
+
name here that needs FastAPI, and an application that embeds
|
|
9
|
+
:class:`~lefx.interfaces.service.ControllerService` in its own process needs no
|
|
10
|
+
HTTP server at all — but it would still have paid for one, because importing any
|
|
11
|
+
submodule runs this file first. That cost is not theoretical: in a frozen
|
|
12
|
+
single-file build the whole FastAPI, Starlette and Pydantic chain lands in the
|
|
13
|
+
binary of an application that never opens a port.
|
|
14
|
+
|
|
15
|
+
Nothing about the public surface changes. The name remains importable, ``dir()``
|
|
16
|
+
still lists it, and type checkers still see it through ``TYPE_CHECKING`` — only
|
|
17
|
+
the moment of import moves.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
from __future__ import annotations
|
|
21
|
+
|
|
22
|
+
from typing import TYPE_CHECKING, Any
|
|
23
|
+
|
|
24
|
+
from .client import ControllerClient, Result
|
|
25
|
+
from .contract import API_PREFIX
|
|
26
|
+
from .discovery import (
|
|
27
|
+
NullSink,
|
|
28
|
+
available_providers,
|
|
29
|
+
available_sinks,
|
|
30
|
+
create_providers,
|
|
31
|
+
create_sink,
|
|
32
|
+
describe,
|
|
33
|
+
split_provider_name,
|
|
34
|
+
)
|
|
35
|
+
from .service import ControllerService, StatusListener
|
|
36
|
+
|
|
37
|
+
if TYPE_CHECKING: # pragma: no cover — for type checkers, never at runtime
|
|
38
|
+
from .api import create_app
|
|
39
|
+
|
|
40
|
+
INTERFACES_VERSION = "3.0.0"
|
|
41
|
+
|
|
42
|
+
_LAZY: dict[str, str] = {"create_app": ".api"}
|
|
43
|
+
"""Name to the module it comes from. Imported on first access, then cached."""
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def __getattr__(name: str) -> Any:
|
|
47
|
+
"""Resolve a deferred name, once, and bind it for every access after."""
|
|
48
|
+
module = _LAZY.get(name)
|
|
49
|
+
if module is None:
|
|
50
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
51
|
+
from importlib import import_module
|
|
52
|
+
|
|
53
|
+
value = getattr(import_module(module, __name__), name)
|
|
54
|
+
globals()[name] = value
|
|
55
|
+
return value
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def __dir__() -> list[str]:
|
|
59
|
+
return sorted(__all__)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
__all__ = [
|
|
63
|
+
"API_PREFIX",
|
|
64
|
+
"ControllerClient",
|
|
65
|
+
"ControllerService",
|
|
66
|
+
"INTERFACES_VERSION",
|
|
67
|
+
"NullSink",
|
|
68
|
+
"Result",
|
|
69
|
+
"StatusListener",
|
|
70
|
+
"available_providers",
|
|
71
|
+
"available_sinks",
|
|
72
|
+
"create_app",
|
|
73
|
+
"create_providers",
|
|
74
|
+
"create_sink",
|
|
75
|
+
"describe",
|
|
76
|
+
"split_provider_name",
|
|
77
|
+
]
|
{led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/interfaces/api.py
RENAMED
|
@@ -27,10 +27,9 @@ from lefx.engine import (
|
|
|
27
27
|
)
|
|
28
28
|
from lefx.sdk import DefinitionType, ParameterValidationError
|
|
29
29
|
|
|
30
|
+
from .contract import API_PREFIX
|
|
30
31
|
from .service import ControllerService
|
|
31
32
|
|
|
32
|
-
API_PREFIX = "/api/v3"
|
|
33
|
-
|
|
34
33
|
|
|
35
34
|
class SetStateRequest(BaseModel):
|
|
36
35
|
target: str
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""What both ends of the wire have to agree on, and nothing else.
|
|
2
|
+
|
|
3
|
+
Small on purpose, and free of dependencies on purpose. The route prefix is not
|
|
4
|
+
the server's property — a client that cannot name it cannot call anything — so
|
|
5
|
+
keeping it in the server module made the HTTP *client* import FastAPI, Starlette
|
|
6
|
+
and Pydantic to learn a seven-character string. In a frozen build that is the
|
|
7
|
+
whole server stack in the binary of an application that never serves.
|
|
8
|
+
|
|
9
|
+
Anything else the two sides must agree on before they can talk belongs here too.
|
|
10
|
+
Anything only one of them needs does not.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
from __future__ import annotations
|
|
14
|
+
|
|
15
|
+
API_PREFIX = "/api/v3"
|
|
16
|
+
"""The only route prefix there is. No compatibility route, by design."""
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
__all__ = ["API_PREFIX"]
|
|
Binary file
|
|
Binary file
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"""LEFX V3 control surface — HTTP API, CLI, client and service hosting.
|
|
2
|
-
|
|
3
|
-
CLI and API carry the same commands and hold no logic of their own. Frame sinks
|
|
4
|
-
and input providers are discovered through entry points, never imported, so this
|
|
5
|
-
package depends on neither the hardware integration nor the simulator.
|
|
6
|
-
"""
|
|
7
|
-
|
|
8
|
-
from __future__ import annotations
|
|
9
|
-
|
|
10
|
-
from .api import API_PREFIX, create_app
|
|
11
|
-
from .client import ControllerClient, Result
|
|
12
|
-
from .discovery import (
|
|
13
|
-
NullSink,
|
|
14
|
-
available_providers,
|
|
15
|
-
available_sinks,
|
|
16
|
-
create_providers,
|
|
17
|
-
create_sink,
|
|
18
|
-
describe,
|
|
19
|
-
split_provider_name,
|
|
20
|
-
)
|
|
21
|
-
from .service import ControllerService, StatusListener
|
|
22
|
-
|
|
23
|
-
INTERFACES_VERSION = "3.0.0"
|
|
24
|
-
|
|
25
|
-
__all__ = [
|
|
26
|
-
"API_PREFIX",
|
|
27
|
-
"ControllerClient",
|
|
28
|
-
"ControllerService",
|
|
29
|
-
"INTERFACES_VERSION",
|
|
30
|
-
"NullSink",
|
|
31
|
-
"Result",
|
|
32
|
-
"StatusListener",
|
|
33
|
-
"available_providers",
|
|
34
|
-
"available_sinks",
|
|
35
|
-
"create_app",
|
|
36
|
-
"create_providers",
|
|
37
|
-
"create_sink",
|
|
38
|
-
"describe",
|
|
39
|
-
"split_provider_name",
|
|
40
|
-
]
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/device/respeaker/cli.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/device/respeaker/sink.py
RENAMED
|
File without changes
|
|
File without changes
|
{led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/engine/__init__.py
RENAMED
|
File without changes
|
{led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/engine/composer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/engine/invocation.py
RENAMED
|
File without changes
|
|
File without changes
|
{led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/engine/library.py
RENAMED
|
File without changes
|
|
File without changes
|
{led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/engine/packages/loader.py
RENAMED
|
File without changes
|
|
File without changes
|
{led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/engine/registry.py
RENAMED
|
File without changes
|
{led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/engine/renderer.py
RENAMED
|
File without changes
|
{led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/engine/runtime.py
RENAMED
|
File without changes
|
|
File without changes
|
{led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/interfaces/cli.py
RENAMED
|
File without changes
|
{led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/interfaces/config.py
RENAMED
|
File without changes
|
{led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/interfaces/discovery.py
RENAMED
|
File without changes
|
{led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/interfaces/hosting.py
RENAMED
|
File without changes
|
{led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/interfaces/paths.py
RENAMED
|
File without changes
|
|
File without changes
|
{led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/interfaces/service.py
RENAMED
|
File without changes
|
|
File without changes
|
{led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/sdk/calibration.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/sdk/definitions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/sdk/parameters.py
RENAMED
|
File without changes
|
|
File without changes
|
{led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/sdk/validation.py
RENAMED
|
File without changes
|
|
File without changes
|
{led_controller_version_3-3.0.2 → led_controller_version_3-3.0.3}/src/lefx/sets/core_set/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|