labthings_fastapi.dependencies.invocation
FastAPI dependency for an invocation ID
Module Contents
Classes
Functions
Return a UUID for an action invocation |
|
Retrieve a logger object for an action invocation |
|
Get a cancel hook belonging to a particular invocation |
Data
API
- labthings_fastapi.dependencies.invocation.invocation_id() uuid.UUID
Return a UUID for an action invocation
This is for use as a FastAPI dependency, to allow other dependencies to access the invocation ID. Useful for e.g. file management.
- labthings_fastapi.dependencies.invocation.InvocationID
None
- labthings_fastapi.dependencies.invocation.invocation_logger(id: labthings_fastapi.dependencies.invocation.InvocationID) logging.Logger
Retrieve a logger object for an action invocation
This will have a level of at least INFO.
- labthings_fastapi.dependencies.invocation.InvocationLogger
None
- exception labthings_fastapi.dependencies.invocation.InvocationCancelledError
Bases:
SystemExit
- class labthings_fastapi.dependencies.invocation.CancelEvent(id: labthings_fastapi.dependencies.invocation.InvocationID)
Bases:
threading.Event- raise_if_set()
Raise a CancelledError if the event is set
- labthings_fastapi.dependencies.invocation.invocation_cancel_hook(id: labthings_fastapi.dependencies.invocation.InvocationID) CancelHook
Get a cancel hook belonging to a particular invocation
- labthings_fastapi.dependencies.invocation.CancelHook
None