labthings_fastapi.dependencies.metadata
Module Contents
Functions
A dependency to retrieve summary metadata from all Things in this server. |
Data
API
- labthings_fastapi.dependencies.metadata.thing_states_getter(request: fastapi.Request) Callable[[], collections.abc.Mapping[str, Any]]
A dependency to retrieve summary metadata from all Things in this server.
This is intended to make it easy for a Thing to summarise the other Things it’s associated with, for example it’s used to populate the UserComment EXIF field in the OpenFlexure Microscope.
thing_states_getterdiffers fromget_thing_statesbecause the latter is evaluated once, before the action, and this dependency returns a function that collects the metadata when it’s run.If your action is likely to be run from other actions where the metadata changes, you should use this version.
- labthings_fastapi.dependencies.metadata.GetThingStates
None