labthings_fastapi.endpoints

Add a FastAPI endpoint without making it an action.

The EndpointDescriptor wraps a function and marks it to be added to the HTTP API at the same time as the properties and actions of the host Thing. This is intended to allow flexibility to implement endpoints that cannot be described in a Thing Description as actions or properties.

It may use any fastapi responses or arguments, as it passes keyword arguments through to the relevant fastapi decorator.

This will most usually be applied as a decorator with arguments, available as @endpoint. See the documentation for that function for more detail.

Attributes

HTTPMethod

Valid HTTP verbs to use with endpoint or EndpointDescriptor.

Module Contents

labthings_fastapi.endpoints.HTTPMethod

Valid HTTP verbs to use with endpoint or EndpointDescriptor.