Skip to content

Commit 5bd6f08

Browse files
committed
More detail on the "observable" property
1 parent 166f569 commit 5bd6f08

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/labthings_fastapi/descriptors/property.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,10 @@ def __init__(
140140
:param initial_value: The initial value of the property. If this is set,
141141
the property must not have a getter, and should behave like a variable.
142142
:param readonly: If True, the property cannot be set via the HTTP API.
143-
:param observable: If True, the property can be observed for changes.
143+
:param observable: If True, the property can be observed for changes via
144+
websockets. This causes the setter to run code in the async event loop
145+
that will notify a list of subscribers each time the property is set.
146+
Currently, only websockets can be used to observe properties.
144147
:param description: A description of the property, used in the API documentation.
145148
LabThings will attempt to take this from the docstring if not supplied.
146149
:param title: A human-readable title for the property, used in the API

0 commit comments

Comments
 (0)