labthings_fastapi.client.in_server
A mock client that uses a Thing directly.
When Thing objects interact on the server, it can be very useful to
use an interface that is identical to the ThingClient used to access
the same Thing remotely. This means that code can run either on the
server or on a client, e.g. in a Jupyter notebook where it is much
easier to debug. See Using Things from other Things for more detail.
Currently DirectThingClient is not a subclass of ThingClient,
that may need to change. It’s a good idea to create a
DirectThingClient at module level, so that type hints work.