Skip to content

Commit 0cf53bb

Browse files
committed
Reference starting the server from python.
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.
1 parent 40c23f9 commit 0cf53bb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/source/tutorial/running_labthings.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,9 @@ You can then start the server using the command:
3838
3939
labthings-server --config example_things.json
4040
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

Comments
 (0)