prefect.server.api.server
is_client_retryable_exception
replace_placeholder_string_in_files
copy_directory
create_api_app
dependencies
: a list of global dependencies to add to each Prefect REST API routerhealth_check_path
: the health check route pathfast_api_app_kwargs
: kwargs to pass to the FastAPI constructorfinal
: whether this will be the last instance of the Prefect server to be
created in this process, so that additional optimizations may be appliedignore_cache
: if set, a new app will be created even if the settings and fast_api_app_kwargs match
an existing app in the cachecreate_ui_app
create_app
settings
: The settings to use to create the app. If not set, settings are pulled
from the context.ephemeral
: If set, the application will be treated as ephemeral. The UI
and services will be disabled.webserver_only
: If set, the webserver and UI will be available but all background
services will be disabled.final
: whether this will be the last instance of the Prefect server to be
created in this process, so that additional optimizations may be appliedignore_cache
: If set, a new application will be created even if the settings
match. Otherwise, an application is returned from the cache.SPAStaticFiles
StaticFiles
for serving single page applications.
Adds get_response
handling to ensure that when a resource isn’t found the
application still returns the index.
RequestLimitMiddleware
SubprocessASGIServer
find_available_port
is_port_available
address
api_url
start
timeout
: The maximum time to wait for the server to startstop