Upstream

Upstream examples

The pinned tree ships 78 runnable example groups under docs_src/. Every one of them is a complete FastAPI program.

GroupFiles
additional_responses5
additional_status_codes3
advanced_middleware4
app_testing14
async_tests4
authentication_error_status_code2
background_tasks4
behind_a_proxy6
bigger_applications9
body5
body_fields3
body_multiple_params10
body_nested_models10
body_updates3
conditional_openapi2
configure_swagger_ui4
cookie_param_models7
cookie_params3
cors2
custom_docs_ui3
custom_request_and_route6
custom_response16
dataclasses_4
debugging2
dependencies32
dependency_testing3
encoder2
events4
extending_openapi2
extra_data_types3
extra_models6
first_steps3
frontend7
generate_clients6
graphql_2
handling_errors7
header_param_models9
header_params7
json_base64_bytes2
metadata6
middleware2
openapi_callbacks2
openapi_webhooks2
opentelemetry3
path_operation_advanced_configuration8
path_operation_configuration8
path_params7
path_params_numeric_validations13
pydantic_v1_in_v25
python_types14
query_param_models9
query_params7
query_params_str_validations31
request_files11
request_form_models13
request_forms3
request_forms_and_files3
response_change_status_code2
response_cookies3
response_directly3
response_headers3
response_model13
response_status_code3
schema_extra_example9
security15
separate_openapi_schemas3
server_sent_events6
settings19
sql_databases5
static_files2
stream_data3
stream_json_lines2
strict_content_type2
sub_applications2
templates8
using_request_directly2
websockets_5
wsgi2

Example groups are the upstream's own integration tests in documentation form: each directory contains a main.py plus the tutorial text that explains it.