labthings_fastapi.dependencies.thing_server
Retrieve the ThingServer object
This module provides a function that will retrieve the ThingServer
based on the Request object. It may be used as a dependency with:
Annotated[ThingServer, Depends(thing_server_from_request)].
Module Contents
Functions
Find the ThingServer associated with an app |
|
Retrieve the Action Manager from the Thing Server |
Data
API
- labthings_fastapi.dependencies.thing_server._thing_servers: weakref.WeakSet[labthings_fastapi.server.ThingServer]
‘WeakSet(…)’
- labthings_fastapi.dependencies.thing_server.find_thing_server(app: fastapi.FastAPI) labthings_fastapi.server.ThingServer
Find the ThingServer associated with an app
- labthings_fastapi.dependencies.thing_server.thing_server_from_request(request: fastapi.Request) labthings_fastapi.server.ThingServer
Retrieve the Action Manager from the Thing Server
This is for use as a FastAPI dependency, so the thing server is retrieved from the request object.