You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "running LabThings" page in the tutorial didn't mention that it was possible
to start a ThingServer from within Python.
I have now mentioned this on that page, with a link to an example.
Copy file name to clipboardExpand all lines: docs/source/tutorial/running_labthings.rst
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,3 +38,9 @@ You can then start the server using the command:
38
38
39
39
labthings-server --config example_things.json
40
40
41
+
.. _serving_from_python:
42
+
43
+
Starting the server from Python
44
+
-------------------------------
45
+
46
+
It is also possible to start a LabThings server from within a Python script. This is the only way to serve `.Thing` classes that are not importable (e.g. if you're running example code that's not structured as a proper package). Many of the examples will start a server in this way - for example :ref:`tutorial_thing`\ .
0 commit comments