Documentation Index Fetch the complete documentation index at: https://docs.prefect.io/llms.txt
Use this file to discover all available pages before exploring further.
prefect.server.api.dependencies
Utilities for injecting FastAPI dependencies.
Functions
provide_request_api_version
provide_request_api_version(x_prefect_api_version: str = Header( None )) -> Version | None
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
get_created_by(prefect_automation_id: Optional[ UUID ] = Header( None , include_in_schema = False ), prefect_automation_name: Optional[ str ] = Header( None , include_in_schema = False )) -> Optional[schemas.core.CreatedBy]
A dependency that returns the provenance information to use when creating objects
during this API call.
get_updated_by
get_updated_by(prefect_automation_id: Optional[ UUID ] = Header( None , include_in_schema = False ), prefect_automation_name: Optional[ str ] = Header( None , include_in_schema = False )) -> Optional[schemas.core.UpdatedBy]
A dependency that returns the provenance information to use when updating objects
during this API call.
is_ephemeral_request
is_ephemeral_request(request: Request) -> bool
A dependency that returns whether the request is to an ephemeral server.
get_prefect_client_version
get_prefect_client_version(user_agent: Annotated[Optional[ str ], Header( include_in_schema = False )] = None ) -> Optional[ str ]
Attempts to parse out the Prefect client version from the User-Agent header.
docket
docket(request: Request) -> Docket_
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.