dependencies
prefect.server.api.dependencies
Utilities for injecting FastAPI dependencies.
Functions
provide_request_api_version
LimitBody
A fastapi.Depends
factory for pulling a limit: int
parameter from the
request body while determining the default from the current settings.
get_created_by
A dependency that returns the provenance information to use when creating objects during this API call.
get_updated_by
A dependency that returns the provenance information to use when updating objects during this API call.
is_ephemeral_request
A dependency that returns whether the request is to an ephemeral server.
get_prefect_client_version
Attempts to parse out the Prefect client version from the User-Agent header.
Classes
EnforceMinimumAPIVersion
FastAPI Dependency used to check compatibility between the version of the api and a given request.
Looks for the header ‘X-PREFECT-API-VERSION’ in the request and compares it to the api’s version. Rejects requests that are lower than the minimum version.