Copy disabled (too large)
Download .txt
Showing preview only (14,790K chars total). Download the full file to get everything.
Repository: tiangolo/fastapi
Branch: master
Commit: ecace740f3ea
Files: 2746
Total size: 12.7 MB
Directory structure:
gitextract_3s9wpzee/
├── .github/
│ ├── DISCUSSION_TEMPLATE/
│ │ ├── questions.yml
│ │ └── translations.yml
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── config.yml
│ │ └── privileged.yml
│ ├── dependabot.yml
│ ├── labeler.yml
│ └── workflows/
│ ├── add-to-project.yml
│ ├── build-docs.yml
│ ├── contributors.yml
│ ├── deploy-docs.yml
│ ├── detect-conflicts.yml
│ ├── issue-manager.yml
│ ├── label-approved.yml
│ ├── labeler.yml
│ ├── latest-changes.yml
│ ├── notify-translations.yml
│ ├── people.yml
│ ├── pre-commit.yml
│ ├── publish.yml
│ ├── smokeshow.yml
│ ├── sponsors.yml
│ ├── test-redistribute.yml
│ ├── test.yml
│ ├── topic-repos.yml
│ └── translate.yml
├── .gitignore
├── .pre-commit-config.yaml
├── .python-version
├── CITATION.cff
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── SECURITY.md
├── docs/
│ ├── de/
│ │ ├── docs/
│ │ │ ├── _llm-test.md
│ │ │ ├── about/
│ │ │ │ └── index.md
│ │ │ ├── advanced/
│ │ │ │ ├── additional-responses.md
│ │ │ │ ├── additional-status-codes.md
│ │ │ │ ├── advanced-dependencies.md
│ │ │ │ ├── advanced-python-types.md
│ │ │ │ ├── async-tests.md
│ │ │ │ ├── behind-a-proxy.md
│ │ │ │ ├── custom-response.md
│ │ │ │ ├── dataclasses.md
│ │ │ │ ├── events.md
│ │ │ │ ├── generate-clients.md
│ │ │ │ ├── index.md
│ │ │ │ ├── json-base64-bytes.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── openapi-callbacks.md
│ │ │ │ ├── openapi-webhooks.md
│ │ │ │ ├── path-operation-advanced-configuration.md
│ │ │ │ ├── response-change-status-code.md
│ │ │ │ ├── response-cookies.md
│ │ │ │ ├── response-directly.md
│ │ │ │ ├── response-headers.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── http-basic-auth.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── oauth2-scopes.md
│ │ │ │ ├── settings.md
│ │ │ │ ├── stream-data.md
│ │ │ │ ├── strict-content-type.md
│ │ │ │ ├── sub-applications.md
│ │ │ │ ├── templates.md
│ │ │ │ ├── testing-dependencies.md
│ │ │ │ ├── testing-events.md
│ │ │ │ ├── testing-websockets.md
│ │ │ │ ├── using-request-directly.md
│ │ │ │ ├── websockets.md
│ │ │ │ └── wsgi.md
│ │ │ ├── alternatives.md
│ │ │ ├── async.md
│ │ │ ├── benchmarks.md
│ │ │ ├── deployment/
│ │ │ │ ├── cloud.md
│ │ │ │ ├── concepts.md
│ │ │ │ ├── docker.md
│ │ │ │ ├── fastapicloud.md
│ │ │ │ ├── https.md
│ │ │ │ ├── index.md
│ │ │ │ ├── manually.md
│ │ │ │ ├── server-workers.md
│ │ │ │ └── versions.md
│ │ │ ├── editor-support.md
│ │ │ ├── environment-variables.md
│ │ │ ├── fastapi-cli.md
│ │ │ ├── features.md
│ │ │ ├── help-fastapi.md
│ │ │ ├── history-design-future.md
│ │ │ ├── how-to/
│ │ │ │ ├── authentication-error-status-code.md
│ │ │ │ ├── conditional-openapi.md
│ │ │ │ ├── configure-swagger-ui.md
│ │ │ │ ├── custom-docs-ui-assets.md
│ │ │ │ ├── custom-request-and-route.md
│ │ │ │ ├── extending-openapi.md
│ │ │ │ ├── general.md
│ │ │ │ ├── graphql.md
│ │ │ │ ├── index.md
│ │ │ │ ├── migrate-from-pydantic-v1-to-pydantic-v2.md
│ │ │ │ ├── separate-openapi-schemas.md
│ │ │ │ └── testing-database.md
│ │ │ ├── index.md
│ │ │ ├── learn/
│ │ │ │ └── index.md
│ │ │ ├── project-generation.md
│ │ │ ├── python-types.md
│ │ │ ├── resources/
│ │ │ │ └── index.md
│ │ │ ├── translation-banner.md
│ │ │ ├── tutorial/
│ │ │ │ ├── background-tasks.md
│ │ │ │ ├── bigger-applications.md
│ │ │ │ ├── body-fields.md
│ │ │ │ ├── body-multiple-params.md
│ │ │ │ ├── body-nested-models.md
│ │ │ │ ├── body-updates.md
│ │ │ │ ├── body.md
│ │ │ │ ├── cookie-param-models.md
│ │ │ │ ├── cookie-params.md
│ │ │ │ ├── cors.md
│ │ │ │ ├── debugging.md
│ │ │ │ ├── dependencies/
│ │ │ │ │ ├── classes-as-dependencies.md
│ │ │ │ │ ├── dependencies-in-path-operation-decorators.md
│ │ │ │ │ ├── dependencies-with-yield.md
│ │ │ │ │ ├── global-dependencies.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── sub-dependencies.md
│ │ │ │ ├── encoder.md
│ │ │ │ ├── extra-data-types.md
│ │ │ │ ├── extra-models.md
│ │ │ │ ├── first-steps.md
│ │ │ │ ├── handling-errors.md
│ │ │ │ ├── header-param-models.md
│ │ │ │ ├── header-params.md
│ │ │ │ ├── index.md
│ │ │ │ ├── metadata.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── path-operation-configuration.md
│ │ │ │ ├── path-params-numeric-validations.md
│ │ │ │ ├── path-params.md
│ │ │ │ ├── query-param-models.md
│ │ │ │ ├── query-params-str-validations.md
│ │ │ │ ├── query-params.md
│ │ │ │ ├── request-files.md
│ │ │ │ ├── request-form-models.md
│ │ │ │ ├── request-forms-and-files.md
│ │ │ │ ├── request-forms.md
│ │ │ │ ├── response-model.md
│ │ │ │ ├── response-status-code.md
│ │ │ │ ├── schema-extra-example.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── first-steps.md
│ │ │ │ │ ├── get-current-user.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ ├── oauth2-jwt.md
│ │ │ │ │ └── simple-oauth2.md
│ │ │ │ ├── server-sent-events.md
│ │ │ │ ├── sql-databases.md
│ │ │ │ ├── static-files.md
│ │ │ │ ├── stream-json-lines.md
│ │ │ │ └── testing.md
│ │ │ └── virtual-environments.md
│ │ ├── llm-prompt.md
│ │ └── mkdocs.yml
│ ├── en/
│ │ ├── data/
│ │ │ ├── contributors.yml
│ │ │ ├── github_sponsors.yml
│ │ │ ├── members.yml
│ │ │ ├── people.yml
│ │ │ ├── skip_users.yml
│ │ │ ├── sponsors.yml
│ │ │ ├── sponsors_badge.yml
│ │ │ ├── topic_repos.yml
│ │ │ ├── translation_reviewers.yml
│ │ │ └── translators.yml
│ │ ├── docs/
│ │ │ ├── _llm-test.md
│ │ │ ├── about/
│ │ │ │ └── index.md
│ │ │ ├── advanced/
│ │ │ │ ├── additional-responses.md
│ │ │ │ ├── additional-status-codes.md
│ │ │ │ ├── advanced-dependencies.md
│ │ │ │ ├── advanced-python-types.md
│ │ │ │ ├── async-tests.md
│ │ │ │ ├── behind-a-proxy.md
│ │ │ │ ├── custom-response.md
│ │ │ │ ├── dataclasses.md
│ │ │ │ ├── events.md
│ │ │ │ ├── generate-clients.md
│ │ │ │ ├── index.md
│ │ │ │ ├── json-base64-bytes.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── openapi-callbacks.md
│ │ │ │ ├── openapi-webhooks.md
│ │ │ │ ├── path-operation-advanced-configuration.md
│ │ │ │ ├── response-change-status-code.md
│ │ │ │ ├── response-cookies.md
│ │ │ │ ├── response-directly.md
│ │ │ │ ├── response-headers.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── http-basic-auth.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── oauth2-scopes.md
│ │ │ │ ├── settings.md
│ │ │ │ ├── stream-data.md
│ │ │ │ ├── strict-content-type.md
│ │ │ │ ├── sub-applications.md
│ │ │ │ ├── templates.md
│ │ │ │ ├── testing-dependencies.md
│ │ │ │ ├── testing-events.md
│ │ │ │ ├── testing-websockets.md
│ │ │ │ ├── using-request-directly.md
│ │ │ │ ├── websockets.md
│ │ │ │ └── wsgi.md
│ │ │ ├── alternatives.md
│ │ │ ├── async.md
│ │ │ ├── benchmarks.md
│ │ │ ├── contributing.md
│ │ │ ├── css/
│ │ │ │ ├── custom.css
│ │ │ │ └── termynal.css
│ │ │ ├── deployment/
│ │ │ │ ├── cloud.md
│ │ │ │ ├── concepts.md
│ │ │ │ ├── docker.md
│ │ │ │ ├── fastapicloud.md
│ │ │ │ ├── https.md
│ │ │ │ ├── index.md
│ │ │ │ ├── manually.md
│ │ │ │ ├── server-workers.md
│ │ │ │ └── versions.md
│ │ │ ├── editor-support.md
│ │ │ ├── environment-variables.md
│ │ │ ├── external-links.md
│ │ │ ├── fastapi-cli.md
│ │ │ ├── fastapi-people.md
│ │ │ ├── features.md
│ │ │ ├── help-fastapi.md
│ │ │ ├── history-design-future.md
│ │ │ ├── how-to/
│ │ │ │ ├── authentication-error-status-code.md
│ │ │ │ ├── conditional-openapi.md
│ │ │ │ ├── configure-swagger-ui.md
│ │ │ │ ├── custom-docs-ui-assets.md
│ │ │ │ ├── custom-request-and-route.md
│ │ │ │ ├── extending-openapi.md
│ │ │ │ ├── general.md
│ │ │ │ ├── graphql.md
│ │ │ │ ├── index.md
│ │ │ │ ├── migrate-from-pydantic-v1-to-pydantic-v2.md
│ │ │ │ ├── separate-openapi-schemas.md
│ │ │ │ └── testing-database.md
│ │ │ ├── index.md
│ │ │ ├── js/
│ │ │ │ ├── custom.js
│ │ │ │ ├── init_kapa_widget.js
│ │ │ │ └── termynal.js
│ │ │ ├── learn/
│ │ │ │ └── index.md
│ │ │ ├── management-tasks.md
│ │ │ ├── management.md
│ │ │ ├── newsletter.md
│ │ │ ├── project-generation.md
│ │ │ ├── python-types.md
│ │ │ ├── reference/
│ │ │ │ ├── apirouter.md
│ │ │ │ ├── background.md
│ │ │ │ ├── dependencies.md
│ │ │ │ ├── encoders.md
│ │ │ │ ├── exceptions.md
│ │ │ │ ├── fastapi.md
│ │ │ │ ├── httpconnection.md
│ │ │ │ ├── index.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── openapi/
│ │ │ │ │ ├── docs.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── models.md
│ │ │ │ ├── parameters.md
│ │ │ │ ├── request.md
│ │ │ │ ├── response.md
│ │ │ │ ├── responses.md
│ │ │ │ ├── security/
│ │ │ │ │ └── index.md
│ │ │ │ ├── staticfiles.md
│ │ │ │ ├── status.md
│ │ │ │ ├── templating.md
│ │ │ │ ├── testclient.md
│ │ │ │ ├── uploadfile.md
│ │ │ │ └── websockets.md
│ │ │ ├── release-notes.md
│ │ │ ├── resources/
│ │ │ │ └── index.md
│ │ │ ├── translation-banner.md
│ │ │ ├── tutorial/
│ │ │ │ ├── background-tasks.md
│ │ │ │ ├── bigger-applications.md
│ │ │ │ ├── body-fields.md
│ │ │ │ ├── body-multiple-params.md
│ │ │ │ ├── body-nested-models.md
│ │ │ │ ├── body-updates.md
│ │ │ │ ├── body.md
│ │ │ │ ├── cookie-param-models.md
│ │ │ │ ├── cookie-params.md
│ │ │ │ ├── cors.md
│ │ │ │ ├── debugging.md
│ │ │ │ ├── dependencies/
│ │ │ │ │ ├── classes-as-dependencies.md
│ │ │ │ │ ├── dependencies-in-path-operation-decorators.md
│ │ │ │ │ ├── dependencies-with-yield.md
│ │ │ │ │ ├── global-dependencies.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── sub-dependencies.md
│ │ │ │ ├── encoder.md
│ │ │ │ ├── extra-data-types.md
│ │ │ │ ├── extra-models.md
│ │ │ │ ├── first-steps.md
│ │ │ │ ├── handling-errors.md
│ │ │ │ ├── header-param-models.md
│ │ │ │ ├── header-params.md
│ │ │ │ ├── index.md
│ │ │ │ ├── metadata.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── path-operation-configuration.md
│ │ │ │ ├── path-params-numeric-validations.md
│ │ │ │ ├── path-params.md
│ │ │ │ ├── query-param-models.md
│ │ │ │ ├── query-params-str-validations.md
│ │ │ │ ├── query-params.md
│ │ │ │ ├── request-files.md
│ │ │ │ ├── request-form-models.md
│ │ │ │ ├── request-forms-and-files.md
│ │ │ │ ├── request-forms.md
│ │ │ │ ├── response-model.md
│ │ │ │ ├── response-status-code.md
│ │ │ │ ├── schema-extra-example.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── first-steps.md
│ │ │ │ │ ├── get-current-user.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ ├── oauth2-jwt.md
│ │ │ │ │ └── simple-oauth2.md
│ │ │ │ ├── server-sent-events.md
│ │ │ │ ├── sql-databases.md
│ │ │ │ ├── static-files.md
│ │ │ │ ├── stream-json-lines.md
│ │ │ │ └── testing.md
│ │ │ └── virtual-environments.md
│ │ ├── mkdocs.env.yml
│ │ ├── mkdocs.yml
│ │ └── overrides/
│ │ ├── main.html
│ │ └── partials/
│ │ └── copyright.html
│ ├── es/
│ │ ├── docs/
│ │ │ ├── _llm-test.md
│ │ │ ├── about/
│ │ │ │ └── index.md
│ │ │ ├── advanced/
│ │ │ │ ├── additional-responses.md
│ │ │ │ ├── additional-status-codes.md
│ │ │ │ ├── advanced-dependencies.md
│ │ │ │ ├── advanced-python-types.md
│ │ │ │ ├── async-tests.md
│ │ │ │ ├── behind-a-proxy.md
│ │ │ │ ├── custom-response.md
│ │ │ │ ├── dataclasses.md
│ │ │ │ ├── events.md
│ │ │ │ ├── generate-clients.md
│ │ │ │ ├── index.md
│ │ │ │ ├── json-base64-bytes.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── openapi-callbacks.md
│ │ │ │ ├── openapi-webhooks.md
│ │ │ │ ├── path-operation-advanced-configuration.md
│ │ │ │ ├── response-change-status-code.md
│ │ │ │ ├── response-cookies.md
│ │ │ │ ├── response-directly.md
│ │ │ │ ├── response-headers.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── http-basic-auth.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── oauth2-scopes.md
│ │ │ │ ├── settings.md
│ │ │ │ ├── stream-data.md
│ │ │ │ ├── strict-content-type.md
│ │ │ │ ├── sub-applications.md
│ │ │ │ ├── templates.md
│ │ │ │ ├── testing-dependencies.md
│ │ │ │ ├── testing-events.md
│ │ │ │ ├── testing-websockets.md
│ │ │ │ ├── using-request-directly.md
│ │ │ │ ├── websockets.md
│ │ │ │ └── wsgi.md
│ │ │ ├── alternatives.md
│ │ │ ├── async.md
│ │ │ ├── benchmarks.md
│ │ │ ├── deployment/
│ │ │ │ ├── cloud.md
│ │ │ │ ├── concepts.md
│ │ │ │ ├── docker.md
│ │ │ │ ├── fastapicloud.md
│ │ │ │ ├── https.md
│ │ │ │ ├── index.md
│ │ │ │ ├── manually.md
│ │ │ │ ├── server-workers.md
│ │ │ │ └── versions.md
│ │ │ ├── editor-support.md
│ │ │ ├── environment-variables.md
│ │ │ ├── fastapi-cli.md
│ │ │ ├── features.md
│ │ │ ├── help-fastapi.md
│ │ │ ├── history-design-future.md
│ │ │ ├── how-to/
│ │ │ │ ├── authentication-error-status-code.md
│ │ │ │ ├── conditional-openapi.md
│ │ │ │ ├── configure-swagger-ui.md
│ │ │ │ ├── custom-docs-ui-assets.md
│ │ │ │ ├── custom-request-and-route.md
│ │ │ │ ├── extending-openapi.md
│ │ │ │ ├── general.md
│ │ │ │ ├── graphql.md
│ │ │ │ ├── index.md
│ │ │ │ ├── migrate-from-pydantic-v1-to-pydantic-v2.md
│ │ │ │ ├── separate-openapi-schemas.md
│ │ │ │ └── testing-database.md
│ │ │ ├── index.md
│ │ │ ├── learn/
│ │ │ │ └── index.md
│ │ │ ├── project-generation.md
│ │ │ ├── python-types.md
│ │ │ ├── resources/
│ │ │ │ └── index.md
│ │ │ ├── translation-banner.md
│ │ │ ├── tutorial/
│ │ │ │ ├── background-tasks.md
│ │ │ │ ├── bigger-applications.md
│ │ │ │ ├── body-fields.md
│ │ │ │ ├── body-multiple-params.md
│ │ │ │ ├── body-nested-models.md
│ │ │ │ ├── body-updates.md
│ │ │ │ ├── body.md
│ │ │ │ ├── cookie-param-models.md
│ │ │ │ ├── cookie-params.md
│ │ │ │ ├── cors.md
│ │ │ │ ├── debugging.md
│ │ │ │ ├── dependencies/
│ │ │ │ │ ├── classes-as-dependencies.md
│ │ │ │ │ ├── dependencies-in-path-operation-decorators.md
│ │ │ │ │ ├── dependencies-with-yield.md
│ │ │ │ │ ├── global-dependencies.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── sub-dependencies.md
│ │ │ │ ├── encoder.md
│ │ │ │ ├── extra-data-types.md
│ │ │ │ ├── extra-models.md
│ │ │ │ ├── first-steps.md
│ │ │ │ ├── handling-errors.md
│ │ │ │ ├── header-param-models.md
│ │ │ │ ├── header-params.md
│ │ │ │ ├── index.md
│ │ │ │ ├── metadata.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── path-operation-configuration.md
│ │ │ │ ├── path-params-numeric-validations.md
│ │ │ │ ├── path-params.md
│ │ │ │ ├── query-param-models.md
│ │ │ │ ├── query-params-str-validations.md
│ │ │ │ ├── query-params.md
│ │ │ │ ├── request-files.md
│ │ │ │ ├── request-form-models.md
│ │ │ │ ├── request-forms-and-files.md
│ │ │ │ ├── request-forms.md
│ │ │ │ ├── response-model.md
│ │ │ │ ├── response-status-code.md
│ │ │ │ ├── schema-extra-example.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── first-steps.md
│ │ │ │ │ ├── get-current-user.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ ├── oauth2-jwt.md
│ │ │ │ │ └── simple-oauth2.md
│ │ │ │ ├── server-sent-events.md
│ │ │ │ ├── sql-databases.md
│ │ │ │ ├── static-files.md
│ │ │ │ ├── stream-json-lines.md
│ │ │ │ └── testing.md
│ │ │ └── virtual-environments.md
│ │ ├── llm-prompt.md
│ │ └── mkdocs.yml
│ ├── fr/
│ │ ├── docs/
│ │ │ ├── _llm-test.md
│ │ │ ├── about/
│ │ │ │ └── index.md
│ │ │ ├── advanced/
│ │ │ │ ├── additional-responses.md
│ │ │ │ ├── additional-status-codes.md
│ │ │ │ ├── advanced-dependencies.md
│ │ │ │ ├── advanced-python-types.md
│ │ │ │ ├── async-tests.md
│ │ │ │ ├── behind-a-proxy.md
│ │ │ │ ├── custom-response.md
│ │ │ │ ├── dataclasses.md
│ │ │ │ ├── events.md
│ │ │ │ ├── generate-clients.md
│ │ │ │ ├── index.md
│ │ │ │ ├── json-base64-bytes.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── openapi-callbacks.md
│ │ │ │ ├── openapi-webhooks.md
│ │ │ │ ├── path-operation-advanced-configuration.md
│ │ │ │ ├── response-change-status-code.md
│ │ │ │ ├── response-cookies.md
│ │ │ │ ├── response-directly.md
│ │ │ │ ├── response-headers.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── http-basic-auth.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── oauth2-scopes.md
│ │ │ │ ├── settings.md
│ │ │ │ ├── stream-data.md
│ │ │ │ ├── strict-content-type.md
│ │ │ │ ├── sub-applications.md
│ │ │ │ ├── templates.md
│ │ │ │ ├── testing-dependencies.md
│ │ │ │ ├── testing-events.md
│ │ │ │ ├── testing-websockets.md
│ │ │ │ ├── using-request-directly.md
│ │ │ │ ├── websockets.md
│ │ │ │ └── wsgi.md
│ │ │ ├── alternatives.md
│ │ │ ├── async.md
│ │ │ ├── benchmarks.md
│ │ │ ├── deployment/
│ │ │ │ ├── cloud.md
│ │ │ │ ├── concepts.md
│ │ │ │ ├── docker.md
│ │ │ │ ├── fastapicloud.md
│ │ │ │ ├── https.md
│ │ │ │ ├── index.md
│ │ │ │ ├── manually.md
│ │ │ │ ├── server-workers.md
│ │ │ │ └── versions.md
│ │ │ ├── editor-support.md
│ │ │ ├── environment-variables.md
│ │ │ ├── fastapi-cli.md
│ │ │ ├── features.md
│ │ │ ├── help-fastapi.md
│ │ │ ├── history-design-future.md
│ │ │ ├── how-to/
│ │ │ │ ├── authentication-error-status-code.md
│ │ │ │ ├── conditional-openapi.md
│ │ │ │ ├── configure-swagger-ui.md
│ │ │ │ ├── custom-docs-ui-assets.md
│ │ │ │ ├── custom-request-and-route.md
│ │ │ │ ├── extending-openapi.md
│ │ │ │ ├── general.md
│ │ │ │ ├── graphql.md
│ │ │ │ ├── index.md
│ │ │ │ ├── migrate-from-pydantic-v1-to-pydantic-v2.md
│ │ │ │ ├── separate-openapi-schemas.md
│ │ │ │ └── testing-database.md
│ │ │ ├── index.md
│ │ │ ├── learn/
│ │ │ │ └── index.md
│ │ │ ├── project-generation.md
│ │ │ ├── python-types.md
│ │ │ ├── resources/
│ │ │ │ └── index.md
│ │ │ ├── translation-banner.md
│ │ │ ├── tutorial/
│ │ │ │ ├── background-tasks.md
│ │ │ │ ├── bigger-applications.md
│ │ │ │ ├── body-fields.md
│ │ │ │ ├── body-multiple-params.md
│ │ │ │ ├── body-nested-models.md
│ │ │ │ ├── body-updates.md
│ │ │ │ ├── body.md
│ │ │ │ ├── cookie-param-models.md
│ │ │ │ ├── cookie-params.md
│ │ │ │ ├── cors.md
│ │ │ │ ├── debugging.md
│ │ │ │ ├── dependencies/
│ │ │ │ │ ├── classes-as-dependencies.md
│ │ │ │ │ ├── dependencies-in-path-operation-decorators.md
│ │ │ │ │ ├── dependencies-with-yield.md
│ │ │ │ │ ├── global-dependencies.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── sub-dependencies.md
│ │ │ │ ├── encoder.md
│ │ │ │ ├── extra-data-types.md
│ │ │ │ ├── extra-models.md
│ │ │ │ ├── first-steps.md
│ │ │ │ ├── handling-errors.md
│ │ │ │ ├── header-param-models.md
│ │ │ │ ├── header-params.md
│ │ │ │ ├── index.md
│ │ │ │ ├── metadata.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── path-operation-configuration.md
│ │ │ │ ├── path-params-numeric-validations.md
│ │ │ │ ├── path-params.md
│ │ │ │ ├── query-param-models.md
│ │ │ │ ├── query-params-str-validations.md
│ │ │ │ ├── query-params.md
│ │ │ │ ├── request-files.md
│ │ │ │ ├── request-form-models.md
│ │ │ │ ├── request-forms-and-files.md
│ │ │ │ ├── request-forms.md
│ │ │ │ ├── response-model.md
│ │ │ │ ├── response-status-code.md
│ │ │ │ ├── schema-extra-example.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── first-steps.md
│ │ │ │ │ ├── get-current-user.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ ├── oauth2-jwt.md
│ │ │ │ │ └── simple-oauth2.md
│ │ │ │ ├── server-sent-events.md
│ │ │ │ ├── sql-databases.md
│ │ │ │ ├── static-files.md
│ │ │ │ ├── stream-json-lines.md
│ │ │ │ └── testing.md
│ │ │ └── virtual-environments.md
│ │ ├── llm-prompt.md
│ │ └── mkdocs.yml
│ ├── ja/
│ │ ├── docs/
│ │ │ ├── _llm-test.md
│ │ │ ├── about/
│ │ │ │ └── index.md
│ │ │ ├── advanced/
│ │ │ │ ├── additional-responses.md
│ │ │ │ ├── additional-status-codes.md
│ │ │ │ ├── advanced-dependencies.md
│ │ │ │ ├── advanced-python-types.md
│ │ │ │ ├── async-tests.md
│ │ │ │ ├── behind-a-proxy.md
│ │ │ │ ├── custom-response.md
│ │ │ │ ├── dataclasses.md
│ │ │ │ ├── events.md
│ │ │ │ ├── generate-clients.md
│ │ │ │ ├── index.md
│ │ │ │ ├── json-base64-bytes.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── openapi-callbacks.md
│ │ │ │ ├── openapi-webhooks.md
│ │ │ │ ├── path-operation-advanced-configuration.md
│ │ │ │ ├── response-change-status-code.md
│ │ │ │ ├── response-cookies.md
│ │ │ │ ├── response-directly.md
│ │ │ │ ├── response-headers.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── http-basic-auth.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── oauth2-scopes.md
│ │ │ │ ├── settings.md
│ │ │ │ ├── stream-data.md
│ │ │ │ ├── strict-content-type.md
│ │ │ │ ├── sub-applications.md
│ │ │ │ ├── templates.md
│ │ │ │ ├── testing-dependencies.md
│ │ │ │ ├── testing-events.md
│ │ │ │ ├── testing-websockets.md
│ │ │ │ ├── using-request-directly.md
│ │ │ │ ├── websockets.md
│ │ │ │ └── wsgi.md
│ │ │ ├── alternatives.md
│ │ │ ├── async.md
│ │ │ ├── benchmarks.md
│ │ │ ├── deployment/
│ │ │ │ ├── cloud.md
│ │ │ │ ├── concepts.md
│ │ │ │ ├── docker.md
│ │ │ │ ├── fastapicloud.md
│ │ │ │ ├── https.md
│ │ │ │ ├── index.md
│ │ │ │ ├── manually.md
│ │ │ │ ├── server-workers.md
│ │ │ │ └── versions.md
│ │ │ ├── editor-support.md
│ │ │ ├── environment-variables.md
│ │ │ ├── fastapi-cli.md
│ │ │ ├── features.md
│ │ │ ├── help-fastapi.md
│ │ │ ├── history-design-future.md
│ │ │ ├── how-to/
│ │ │ │ ├── authentication-error-status-code.md
│ │ │ │ ├── conditional-openapi.md
│ │ │ │ ├── configure-swagger-ui.md
│ │ │ │ ├── custom-docs-ui-assets.md
│ │ │ │ ├── custom-request-and-route.md
│ │ │ │ ├── extending-openapi.md
│ │ │ │ ├── general.md
│ │ │ │ ├── graphql.md
│ │ │ │ ├── index.md
│ │ │ │ ├── migrate-from-pydantic-v1-to-pydantic-v2.md
│ │ │ │ ├── separate-openapi-schemas.md
│ │ │ │ └── testing-database.md
│ │ │ ├── index.md
│ │ │ ├── learn/
│ │ │ │ └── index.md
│ │ │ ├── project-generation.md
│ │ │ ├── python-types.md
│ │ │ ├── resources/
│ │ │ │ └── index.md
│ │ │ ├── translation-banner.md
│ │ │ ├── tutorial/
│ │ │ │ ├── background-tasks.md
│ │ │ │ ├── bigger-applications.md
│ │ │ │ ├── body-fields.md
│ │ │ │ ├── body-multiple-params.md
│ │ │ │ ├── body-nested-models.md
│ │ │ │ ├── body-updates.md
│ │ │ │ ├── body.md
│ │ │ │ ├── cookie-param-models.md
│ │ │ │ ├── cookie-params.md
│ │ │ │ ├── cors.md
│ │ │ │ ├── debugging.md
│ │ │ │ ├── dependencies/
│ │ │ │ │ ├── classes-as-dependencies.md
│ │ │ │ │ ├── dependencies-in-path-operation-decorators.md
│ │ │ │ │ ├── dependencies-with-yield.md
│ │ │ │ │ ├── global-dependencies.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── sub-dependencies.md
│ │ │ │ ├── encoder.md
│ │ │ │ ├── extra-data-types.md
│ │ │ │ ├── extra-models.md
│ │ │ │ ├── first-steps.md
│ │ │ │ ├── handling-errors.md
│ │ │ │ ├── header-param-models.md
│ │ │ │ ├── header-params.md
│ │ │ │ ├── index.md
│ │ │ │ ├── metadata.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── path-operation-configuration.md
│ │ │ │ ├── path-params-numeric-validations.md
│ │ │ │ ├── path-params.md
│ │ │ │ ├── query-param-models.md
│ │ │ │ ├── query-params-str-validations.md
│ │ │ │ ├── query-params.md
│ │ │ │ ├── request-files.md
│ │ │ │ ├── request-form-models.md
│ │ │ │ ├── request-forms-and-files.md
│ │ │ │ ├── request-forms.md
│ │ │ │ ├── response-model.md
│ │ │ │ ├── response-status-code.md
│ │ │ │ ├── schema-extra-example.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── first-steps.md
│ │ │ │ │ ├── get-current-user.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ ├── oauth2-jwt.md
│ │ │ │ │ └── simple-oauth2.md
│ │ │ │ ├── server-sent-events.md
│ │ │ │ ├── sql-databases.md
│ │ │ │ ├── static-files.md
│ │ │ │ ├── stream-json-lines.md
│ │ │ │ └── testing.md
│ │ │ └── virtual-environments.md
│ │ ├── llm-prompt.md
│ │ └── mkdocs.yml
│ ├── ko/
│ │ ├── docs/
│ │ │ ├── _llm-test.md
│ │ │ ├── about/
│ │ │ │ └── index.md
│ │ │ ├── advanced/
│ │ │ │ ├── additional-responses.md
│ │ │ │ ├── additional-status-codes.md
│ │ │ │ ├── advanced-dependencies.md
│ │ │ │ ├── advanced-python-types.md
│ │ │ │ ├── async-tests.md
│ │ │ │ ├── behind-a-proxy.md
│ │ │ │ ├── custom-response.md
│ │ │ │ ├── dataclasses.md
│ │ │ │ ├── events.md
│ │ │ │ ├── generate-clients.md
│ │ │ │ ├── index.md
│ │ │ │ ├── json-base64-bytes.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── openapi-callbacks.md
│ │ │ │ ├── openapi-webhooks.md
│ │ │ │ ├── path-operation-advanced-configuration.md
│ │ │ │ ├── response-change-status-code.md
│ │ │ │ ├── response-cookies.md
│ │ │ │ ├── response-directly.md
│ │ │ │ ├── response-headers.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── http-basic-auth.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── oauth2-scopes.md
│ │ │ │ ├── settings.md
│ │ │ │ ├── stream-data.md
│ │ │ │ ├── strict-content-type.md
│ │ │ │ ├── sub-applications.md
│ │ │ │ ├── templates.md
│ │ │ │ ├── testing-dependencies.md
│ │ │ │ ├── testing-events.md
│ │ │ │ ├── testing-websockets.md
│ │ │ │ ├── using-request-directly.md
│ │ │ │ ├── websockets.md
│ │ │ │ └── wsgi.md
│ │ │ ├── alternatives.md
│ │ │ ├── async.md
│ │ │ ├── benchmarks.md
│ │ │ ├── deployment/
│ │ │ │ ├── cloud.md
│ │ │ │ ├── concepts.md
│ │ │ │ ├── docker.md
│ │ │ │ ├── fastapicloud.md
│ │ │ │ ├── https.md
│ │ │ │ ├── index.md
│ │ │ │ ├── manually.md
│ │ │ │ ├── server-workers.md
│ │ │ │ └── versions.md
│ │ │ ├── editor-support.md
│ │ │ ├── environment-variables.md
│ │ │ ├── fastapi-cli.md
│ │ │ ├── features.md
│ │ │ ├── help-fastapi.md
│ │ │ ├── history-design-future.md
│ │ │ ├── how-to/
│ │ │ │ ├── authentication-error-status-code.md
│ │ │ │ ├── conditional-openapi.md
│ │ │ │ ├── configure-swagger-ui.md
│ │ │ │ ├── custom-docs-ui-assets.md
│ │ │ │ ├── custom-request-and-route.md
│ │ │ │ ├── extending-openapi.md
│ │ │ │ ├── general.md
│ │ │ │ ├── graphql.md
│ │ │ │ ├── index.md
│ │ │ │ ├── migrate-from-pydantic-v1-to-pydantic-v2.md
│ │ │ │ ├── separate-openapi-schemas.md
│ │ │ │ └── testing-database.md
│ │ │ ├── index.md
│ │ │ ├── learn/
│ │ │ │ └── index.md
│ │ │ ├── project-generation.md
│ │ │ ├── python-types.md
│ │ │ ├── resources/
│ │ │ │ └── index.md
│ │ │ ├── translation-banner.md
│ │ │ ├── tutorial/
│ │ │ │ ├── background-tasks.md
│ │ │ │ ├── bigger-applications.md
│ │ │ │ ├── body-fields.md
│ │ │ │ ├── body-multiple-params.md
│ │ │ │ ├── body-nested-models.md
│ │ │ │ ├── body-updates.md
│ │ │ │ ├── body.md
│ │ │ │ ├── cookie-param-models.md
│ │ │ │ ├── cookie-params.md
│ │ │ │ ├── cors.md
│ │ │ │ ├── debugging.md
│ │ │ │ ├── dependencies/
│ │ │ │ │ ├── classes-as-dependencies.md
│ │ │ │ │ ├── dependencies-in-path-operation-decorators.md
│ │ │ │ │ ├── dependencies-with-yield.md
│ │ │ │ │ ├── global-dependencies.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── sub-dependencies.md
│ │ │ │ ├── encoder.md
│ │ │ │ ├── extra-data-types.md
│ │ │ │ ├── extra-models.md
│ │ │ │ ├── first-steps.md
│ │ │ │ ├── handling-errors.md
│ │ │ │ ├── header-param-models.md
│ │ │ │ ├── header-params.md
│ │ │ │ ├── index.md
│ │ │ │ ├── metadata.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── path-operation-configuration.md
│ │ │ │ ├── path-params-numeric-validations.md
│ │ │ │ ├── path-params.md
│ │ │ │ ├── query-param-models.md
│ │ │ │ ├── query-params-str-validations.md
│ │ │ │ ├── query-params.md
│ │ │ │ ├── request-files.md
│ │ │ │ ├── request-form-models.md
│ │ │ │ ├── request-forms-and-files.md
│ │ │ │ ├── request-forms.md
│ │ │ │ ├── response-model.md
│ │ │ │ ├── response-status-code.md
│ │ │ │ ├── schema-extra-example.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── first-steps.md
│ │ │ │ │ ├── get-current-user.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ ├── oauth2-jwt.md
│ │ │ │ │ └── simple-oauth2.md
│ │ │ │ ├── server-sent-events.md
│ │ │ │ ├── sql-databases.md
│ │ │ │ ├── static-files.md
│ │ │ │ ├── stream-json-lines.md
│ │ │ │ └── testing.md
│ │ │ └── virtual-environments.md
│ │ ├── llm-prompt.md
│ │ └── mkdocs.yml
│ ├── language_names.yml
│ ├── missing-translation.md
│ ├── pt/
│ │ ├── docs/
│ │ │ ├── _llm-test.md
│ │ │ ├── about/
│ │ │ │ └── index.md
│ │ │ ├── advanced/
│ │ │ │ ├── additional-responses.md
│ │ │ │ ├── additional-status-codes.md
│ │ │ │ ├── advanced-dependencies.md
│ │ │ │ ├── advanced-python-types.md
│ │ │ │ ├── async-tests.md
│ │ │ │ ├── behind-a-proxy.md
│ │ │ │ ├── custom-response.md
│ │ │ │ ├── dataclasses.md
│ │ │ │ ├── events.md
│ │ │ │ ├── generate-clients.md
│ │ │ │ ├── index.md
│ │ │ │ ├── json-base64-bytes.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── openapi-callbacks.md
│ │ │ │ ├── openapi-webhooks.md
│ │ │ │ ├── path-operation-advanced-configuration.md
│ │ │ │ ├── response-change-status-code.md
│ │ │ │ ├── response-cookies.md
│ │ │ │ ├── response-directly.md
│ │ │ │ ├── response-headers.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── http-basic-auth.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── oauth2-scopes.md
│ │ │ │ ├── settings.md
│ │ │ │ ├── stream-data.md
│ │ │ │ ├── strict-content-type.md
│ │ │ │ ├── sub-applications.md
│ │ │ │ ├── templates.md
│ │ │ │ ├── testing-dependencies.md
│ │ │ │ ├── testing-events.md
│ │ │ │ ├── testing-websockets.md
│ │ │ │ ├── using-request-directly.md
│ │ │ │ ├── websockets.md
│ │ │ │ └── wsgi.md
│ │ │ ├── alternatives.md
│ │ │ ├── async.md
│ │ │ ├── benchmarks.md
│ │ │ ├── deployment/
│ │ │ │ ├── cloud.md
│ │ │ │ ├── concepts.md
│ │ │ │ ├── docker.md
│ │ │ │ ├── fastapicloud.md
│ │ │ │ ├── https.md
│ │ │ │ ├── index.md
│ │ │ │ ├── manually.md
│ │ │ │ ├── server-workers.md
│ │ │ │ └── versions.md
│ │ │ ├── editor-support.md
│ │ │ ├── environment-variables.md
│ │ │ ├── fastapi-cli.md
│ │ │ ├── features.md
│ │ │ ├── help-fastapi.md
│ │ │ ├── history-design-future.md
│ │ │ ├── how-to/
│ │ │ │ ├── authentication-error-status-code.md
│ │ │ │ ├── conditional-openapi.md
│ │ │ │ ├── configure-swagger-ui.md
│ │ │ │ ├── custom-docs-ui-assets.md
│ │ │ │ ├── custom-request-and-route.md
│ │ │ │ ├── extending-openapi.md
│ │ │ │ ├── general.md
│ │ │ │ ├── graphql.md
│ │ │ │ ├── index.md
│ │ │ │ ├── migrate-from-pydantic-v1-to-pydantic-v2.md
│ │ │ │ ├── separate-openapi-schemas.md
│ │ │ │ └── testing-database.md
│ │ │ ├── index.md
│ │ │ ├── learn/
│ │ │ │ └── index.md
│ │ │ ├── project-generation.md
│ │ │ ├── python-types.md
│ │ │ ├── resources/
│ │ │ │ └── index.md
│ │ │ ├── translation-banner.md
│ │ │ ├── tutorial/
│ │ │ │ ├── background-tasks.md
│ │ │ │ ├── bigger-applications.md
│ │ │ │ ├── body-fields.md
│ │ │ │ ├── body-multiple-params.md
│ │ │ │ ├── body-nested-models.md
│ │ │ │ ├── body-updates.md
│ │ │ │ ├── body.md
│ │ │ │ ├── cookie-param-models.md
│ │ │ │ ├── cookie-params.md
│ │ │ │ ├── cors.md
│ │ │ │ ├── debugging.md
│ │ │ │ ├── dependencies/
│ │ │ │ │ ├── classes-as-dependencies.md
│ │ │ │ │ ├── dependencies-in-path-operation-decorators.md
│ │ │ │ │ ├── dependencies-with-yield.md
│ │ │ │ │ ├── global-dependencies.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── sub-dependencies.md
│ │ │ │ ├── encoder.md
│ │ │ │ ├── extra-data-types.md
│ │ │ │ ├── extra-models.md
│ │ │ │ ├── first-steps.md
│ │ │ │ ├── handling-errors.md
│ │ │ │ ├── header-param-models.md
│ │ │ │ ├── header-params.md
│ │ │ │ ├── index.md
│ │ │ │ ├── metadata.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── path-operation-configuration.md
│ │ │ │ ├── path-params-numeric-validations.md
│ │ │ │ ├── path-params.md
│ │ │ │ ├── query-param-models.md
│ │ │ │ ├── query-params-str-validations.md
│ │ │ │ ├── query-params.md
│ │ │ │ ├── request-files.md
│ │ │ │ ├── request-form-models.md
│ │ │ │ ├── request-forms-and-files.md
│ │ │ │ ├── request-forms.md
│ │ │ │ ├── response-model.md
│ │ │ │ ├── response-status-code.md
│ │ │ │ ├── schema-extra-example.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── first-steps.md
│ │ │ │ │ ├── get-current-user.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ ├── oauth2-jwt.md
│ │ │ │ │ └── simple-oauth2.md
│ │ │ │ ├── server-sent-events.md
│ │ │ │ ├── sql-databases.md
│ │ │ │ ├── static-files.md
│ │ │ │ ├── stream-json-lines.md
│ │ │ │ └── testing.md
│ │ │ └── virtual-environments.md
│ │ ├── llm-prompt.md
│ │ └── mkdocs.yml
│ ├── ru/
│ │ ├── docs/
│ │ │ ├── _llm-test.md
│ │ │ ├── about/
│ │ │ │ └── index.md
│ │ │ ├── advanced/
│ │ │ │ ├── additional-responses.md
│ │ │ │ ├── additional-status-codes.md
│ │ │ │ ├── advanced-dependencies.md
│ │ │ │ ├── advanced-python-types.md
│ │ │ │ ├── async-tests.md
│ │ │ │ ├── behind-a-proxy.md
│ │ │ │ ├── custom-response.md
│ │ │ │ ├── dataclasses.md
│ │ │ │ ├── events.md
│ │ │ │ ├── generate-clients.md
│ │ │ │ ├── index.md
│ │ │ │ ├── json-base64-bytes.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── openapi-callbacks.md
│ │ │ │ ├── openapi-webhooks.md
│ │ │ │ ├── path-operation-advanced-configuration.md
│ │ │ │ ├── response-change-status-code.md
│ │ │ │ ├── response-cookies.md
│ │ │ │ ├── response-directly.md
│ │ │ │ ├── response-headers.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── http-basic-auth.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── oauth2-scopes.md
│ │ │ │ ├── settings.md
│ │ │ │ ├── stream-data.md
│ │ │ │ ├── strict-content-type.md
│ │ │ │ ├── sub-applications.md
│ │ │ │ ├── templates.md
│ │ │ │ ├── testing-dependencies.md
│ │ │ │ ├── testing-events.md
│ │ │ │ ├── testing-websockets.md
│ │ │ │ ├── using-request-directly.md
│ │ │ │ ├── websockets.md
│ │ │ │ └── wsgi.md
│ │ │ ├── alternatives.md
│ │ │ ├── async.md
│ │ │ ├── benchmarks.md
│ │ │ ├── deployment/
│ │ │ │ ├── cloud.md
│ │ │ │ ├── concepts.md
│ │ │ │ ├── docker.md
│ │ │ │ ├── fastapicloud.md
│ │ │ │ ├── https.md
│ │ │ │ ├── index.md
│ │ │ │ ├── manually.md
│ │ │ │ ├── server-workers.md
│ │ │ │ └── versions.md
│ │ │ ├── editor-support.md
│ │ │ ├── environment-variables.md
│ │ │ ├── fastapi-cli.md
│ │ │ ├── features.md
│ │ │ ├── help-fastapi.md
│ │ │ ├── history-design-future.md
│ │ │ ├── how-to/
│ │ │ │ ├── authentication-error-status-code.md
│ │ │ │ ├── conditional-openapi.md
│ │ │ │ ├── configure-swagger-ui.md
│ │ │ │ ├── custom-docs-ui-assets.md
│ │ │ │ ├── custom-request-and-route.md
│ │ │ │ ├── extending-openapi.md
│ │ │ │ ├── general.md
│ │ │ │ ├── graphql.md
│ │ │ │ ├── index.md
│ │ │ │ ├── migrate-from-pydantic-v1-to-pydantic-v2.md
│ │ │ │ ├── separate-openapi-schemas.md
│ │ │ │ └── testing-database.md
│ │ │ ├── index.md
│ │ │ ├── learn/
│ │ │ │ └── index.md
│ │ │ ├── project-generation.md
│ │ │ ├── python-types.md
│ │ │ ├── resources/
│ │ │ │ └── index.md
│ │ │ ├── translation-banner.md
│ │ │ ├── tutorial/
│ │ │ │ ├── background-tasks.md
│ │ │ │ ├── bigger-applications.md
│ │ │ │ ├── body-fields.md
│ │ │ │ ├── body-multiple-params.md
│ │ │ │ ├── body-nested-models.md
│ │ │ │ ├── body-updates.md
│ │ │ │ ├── body.md
│ │ │ │ ├── cookie-param-models.md
│ │ │ │ ├── cookie-params.md
│ │ │ │ ├── cors.md
│ │ │ │ ├── debugging.md
│ │ │ │ ├── dependencies/
│ │ │ │ │ ├── classes-as-dependencies.md
│ │ │ │ │ ├── dependencies-in-path-operation-decorators.md
│ │ │ │ │ ├── dependencies-with-yield.md
│ │ │ │ │ ├── global-dependencies.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── sub-dependencies.md
│ │ │ │ ├── encoder.md
│ │ │ │ ├── extra-data-types.md
│ │ │ │ ├── extra-models.md
│ │ │ │ ├── first-steps.md
│ │ │ │ ├── handling-errors.md
│ │ │ │ ├── header-param-models.md
│ │ │ │ ├── header-params.md
│ │ │ │ ├── index.md
│ │ │ │ ├── metadata.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── path-operation-configuration.md
│ │ │ │ ├── path-params-numeric-validations.md
│ │ │ │ ├── path-params.md
│ │ │ │ ├── query-param-models.md
│ │ │ │ ├── query-params-str-validations.md
│ │ │ │ ├── query-params.md
│ │ │ │ ├── request-files.md
│ │ │ │ ├── request-form-models.md
│ │ │ │ ├── request-forms-and-files.md
│ │ │ │ ├── request-forms.md
│ │ │ │ ├── response-model.md
│ │ │ │ ├── response-status-code.md
│ │ │ │ ├── schema-extra-example.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── first-steps.md
│ │ │ │ │ ├── get-current-user.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ ├── oauth2-jwt.md
│ │ │ │ │ └── simple-oauth2.md
│ │ │ │ ├── server-sent-events.md
│ │ │ │ ├── sql-databases.md
│ │ │ │ ├── static-files.md
│ │ │ │ ├── stream-json-lines.md
│ │ │ │ └── testing.md
│ │ │ └── virtual-environments.md
│ │ ├── llm-prompt.md
│ │ └── mkdocs.yml
│ ├── tr/
│ │ ├── docs/
│ │ │ ├── _llm-test.md
│ │ │ ├── about/
│ │ │ │ └── index.md
│ │ │ ├── advanced/
│ │ │ │ ├── additional-responses.md
│ │ │ │ ├── additional-status-codes.md
│ │ │ │ ├── advanced-dependencies.md
│ │ │ │ ├── advanced-python-types.md
│ │ │ │ ├── async-tests.md
│ │ │ │ ├── behind-a-proxy.md
│ │ │ │ ├── custom-response.md
│ │ │ │ ├── dataclasses.md
│ │ │ │ ├── events.md
│ │ │ │ ├── generate-clients.md
│ │ │ │ ├── index.md
│ │ │ │ ├── json-base64-bytes.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── openapi-callbacks.md
│ │ │ │ ├── openapi-webhooks.md
│ │ │ │ ├── path-operation-advanced-configuration.md
│ │ │ │ ├── response-change-status-code.md
│ │ │ │ ├── response-cookies.md
│ │ │ │ ├── response-directly.md
│ │ │ │ ├── response-headers.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── http-basic-auth.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── oauth2-scopes.md
│ │ │ │ ├── settings.md
│ │ │ │ ├── stream-data.md
│ │ │ │ ├── strict-content-type.md
│ │ │ │ ├── sub-applications.md
│ │ │ │ ├── templates.md
│ │ │ │ ├── testing-dependencies.md
│ │ │ │ ├── testing-events.md
│ │ │ │ ├── testing-websockets.md
│ │ │ │ ├── using-request-directly.md
│ │ │ │ ├── websockets.md
│ │ │ │ └── wsgi.md
│ │ │ ├── alternatives.md
│ │ │ ├── async.md
│ │ │ ├── benchmarks.md
│ │ │ ├── deployment/
│ │ │ │ ├── cloud.md
│ │ │ │ ├── concepts.md
│ │ │ │ ├── docker.md
│ │ │ │ ├── fastapicloud.md
│ │ │ │ ├── https.md
│ │ │ │ ├── index.md
│ │ │ │ ├── manually.md
│ │ │ │ ├── server-workers.md
│ │ │ │ └── versions.md
│ │ │ ├── editor-support.md
│ │ │ ├── environment-variables.md
│ │ │ ├── fastapi-cli.md
│ │ │ ├── features.md
│ │ │ ├── help-fastapi.md
│ │ │ ├── history-design-future.md
│ │ │ ├── how-to/
│ │ │ │ ├── authentication-error-status-code.md
│ │ │ │ ├── conditional-openapi.md
│ │ │ │ ├── configure-swagger-ui.md
│ │ │ │ ├── custom-docs-ui-assets.md
│ │ │ │ ├── custom-request-and-route.md
│ │ │ │ ├── extending-openapi.md
│ │ │ │ ├── general.md
│ │ │ │ ├── graphql.md
│ │ │ │ ├── index.md
│ │ │ │ ├── migrate-from-pydantic-v1-to-pydantic-v2.md
│ │ │ │ ├── separate-openapi-schemas.md
│ │ │ │ └── testing-database.md
│ │ │ ├── index.md
│ │ │ ├── learn/
│ │ │ │ └── index.md
│ │ │ ├── project-generation.md
│ │ │ ├── python-types.md
│ │ │ ├── resources/
│ │ │ │ └── index.md
│ │ │ ├── translation-banner.md
│ │ │ ├── tutorial/
│ │ │ │ ├── background-tasks.md
│ │ │ │ ├── bigger-applications.md
│ │ │ │ ├── body-fields.md
│ │ │ │ ├── body-multiple-params.md
│ │ │ │ ├── body-nested-models.md
│ │ │ │ ├── body-updates.md
│ │ │ │ ├── body.md
│ │ │ │ ├── cookie-param-models.md
│ │ │ │ ├── cookie-params.md
│ │ │ │ ├── cors.md
│ │ │ │ ├── debugging.md
│ │ │ │ ├── dependencies/
│ │ │ │ │ ├── classes-as-dependencies.md
│ │ │ │ │ ├── dependencies-in-path-operation-decorators.md
│ │ │ │ │ ├── dependencies-with-yield.md
│ │ │ │ │ ├── global-dependencies.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── sub-dependencies.md
│ │ │ │ ├── encoder.md
│ │ │ │ ├── extra-data-types.md
│ │ │ │ ├── extra-models.md
│ │ │ │ ├── first-steps.md
│ │ │ │ ├── handling-errors.md
│ │ │ │ ├── header-param-models.md
│ │ │ │ ├── header-params.md
│ │ │ │ ├── index.md
│ │ │ │ ├── metadata.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── path-operation-configuration.md
│ │ │ │ ├── path-params-numeric-validations.md
│ │ │ │ ├── path-params.md
│ │ │ │ ├── query-param-models.md
│ │ │ │ ├── query-params-str-validations.md
│ │ │ │ ├── query-params.md
│ │ │ │ ├── request-files.md
│ │ │ │ ├── request-form-models.md
│ │ │ │ ├── request-forms-and-files.md
│ │ │ │ ├── request-forms.md
│ │ │ │ ├── response-model.md
│ │ │ │ ├── response-status-code.md
│ │ │ │ ├── schema-extra-example.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── first-steps.md
│ │ │ │ │ ├── get-current-user.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ ├── oauth2-jwt.md
│ │ │ │ │ └── simple-oauth2.md
│ │ │ │ ├── server-sent-events.md
│ │ │ │ ├── sql-databases.md
│ │ │ │ ├── static-files.md
│ │ │ │ ├── stream-json-lines.md
│ │ │ │ └── testing.md
│ │ │ └── virtual-environments.md
│ │ ├── llm-prompt.md
│ │ └── mkdocs.yml
│ ├── uk/
│ │ ├── docs/
│ │ │ ├── _llm-test.md
│ │ │ ├── about/
│ │ │ │ └── index.md
│ │ │ ├── advanced/
│ │ │ │ ├── additional-responses.md
│ │ │ │ ├── additional-status-codes.md
│ │ │ │ ├── advanced-dependencies.md
│ │ │ │ ├── advanced-python-types.md
│ │ │ │ ├── async-tests.md
│ │ │ │ ├── behind-a-proxy.md
│ │ │ │ ├── custom-response.md
│ │ │ │ ├── dataclasses.md
│ │ │ │ ├── events.md
│ │ │ │ ├── generate-clients.md
│ │ │ │ ├── index.md
│ │ │ │ ├── json-base64-bytes.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── openapi-callbacks.md
│ │ │ │ ├── openapi-webhooks.md
│ │ │ │ ├── path-operation-advanced-configuration.md
│ │ │ │ ├── response-change-status-code.md
│ │ │ │ ├── response-cookies.md
│ │ │ │ ├── response-directly.md
│ │ │ │ ├── response-headers.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── http-basic-auth.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── oauth2-scopes.md
│ │ │ │ ├── settings.md
│ │ │ │ ├── stream-data.md
│ │ │ │ ├── strict-content-type.md
│ │ │ │ ├── sub-applications.md
│ │ │ │ ├── templates.md
│ │ │ │ ├── testing-dependencies.md
│ │ │ │ ├── testing-events.md
│ │ │ │ ├── testing-websockets.md
│ │ │ │ ├── using-request-directly.md
│ │ │ │ ├── websockets.md
│ │ │ │ └── wsgi.md
│ │ │ ├── alternatives.md
│ │ │ ├── async.md
│ │ │ ├── benchmarks.md
│ │ │ ├── deployment/
│ │ │ │ ├── cloud.md
│ │ │ │ ├── concepts.md
│ │ │ │ ├── docker.md
│ │ │ │ ├── fastapicloud.md
│ │ │ │ ├── https.md
│ │ │ │ ├── index.md
│ │ │ │ ├── manually.md
│ │ │ │ ├── server-workers.md
│ │ │ │ └── versions.md
│ │ │ ├── editor-support.md
│ │ │ ├── environment-variables.md
│ │ │ ├── fastapi-cli.md
│ │ │ ├── features.md
│ │ │ ├── help-fastapi.md
│ │ │ ├── history-design-future.md
│ │ │ ├── how-to/
│ │ │ │ ├── authentication-error-status-code.md
│ │ │ │ ├── conditional-openapi.md
│ │ │ │ ├── configure-swagger-ui.md
│ │ │ │ ├── custom-docs-ui-assets.md
│ │ │ │ ├── custom-request-and-route.md
│ │ │ │ ├── extending-openapi.md
│ │ │ │ ├── general.md
│ │ │ │ ├── graphql.md
│ │ │ │ ├── index.md
│ │ │ │ ├── migrate-from-pydantic-v1-to-pydantic-v2.md
│ │ │ │ ├── separate-openapi-schemas.md
│ │ │ │ └── testing-database.md
│ │ │ ├── index.md
│ │ │ ├── learn/
│ │ │ │ └── index.md
│ │ │ ├── project-generation.md
│ │ │ ├── python-types.md
│ │ │ ├── resources/
│ │ │ │ └── index.md
│ │ │ ├── translation-banner.md
│ │ │ ├── tutorial/
│ │ │ │ ├── background-tasks.md
│ │ │ │ ├── bigger-applications.md
│ │ │ │ ├── body-fields.md
│ │ │ │ ├── body-multiple-params.md
│ │ │ │ ├── body-nested-models.md
│ │ │ │ ├── body-updates.md
│ │ │ │ ├── body.md
│ │ │ │ ├── cookie-param-models.md
│ │ │ │ ├── cookie-params.md
│ │ │ │ ├── cors.md
│ │ │ │ ├── debugging.md
│ │ │ │ ├── dependencies/
│ │ │ │ │ ├── classes-as-dependencies.md
│ │ │ │ │ ├── dependencies-in-path-operation-decorators.md
│ │ │ │ │ ├── dependencies-with-yield.md
│ │ │ │ │ ├── global-dependencies.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── sub-dependencies.md
│ │ │ │ ├── encoder.md
│ │ │ │ ├── extra-data-types.md
│ │ │ │ ├── extra-models.md
│ │ │ │ ├── first-steps.md
│ │ │ │ ├── handling-errors.md
│ │ │ │ ├── header-param-models.md
│ │ │ │ ├── header-params.md
│ │ │ │ ├── index.md
│ │ │ │ ├── metadata.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── path-operation-configuration.md
│ │ │ │ ├── path-params-numeric-validations.md
│ │ │ │ ├── path-params.md
│ │ │ │ ├── query-param-models.md
│ │ │ │ ├── query-params-str-validations.md
│ │ │ │ ├── query-params.md
│ │ │ │ ├── request-files.md
│ │ │ │ ├── request-form-models.md
│ │ │ │ ├── request-forms-and-files.md
│ │ │ │ ├── request-forms.md
│ │ │ │ ├── response-model.md
│ │ │ │ ├── response-status-code.md
│ │ │ │ ├── schema-extra-example.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── first-steps.md
│ │ │ │ │ ├── get-current-user.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ ├── oauth2-jwt.md
│ │ │ │ │ └── simple-oauth2.md
│ │ │ │ ├── server-sent-events.md
│ │ │ │ ├── sql-databases.md
│ │ │ │ ├── static-files.md
│ │ │ │ ├── stream-json-lines.md
│ │ │ │ └── testing.md
│ │ │ └── virtual-environments.md
│ │ ├── llm-prompt.md
│ │ └── mkdocs.yml
│ ├── zh/
│ │ ├── docs/
│ │ │ ├── _llm-test.md
│ │ │ ├── about/
│ │ │ │ └── index.md
│ │ │ ├── advanced/
│ │ │ │ ├── additional-responses.md
│ │ │ │ ├── additional-status-codes.md
│ │ │ │ ├── advanced-dependencies.md
│ │ │ │ ├── advanced-python-types.md
│ │ │ │ ├── async-tests.md
│ │ │ │ ├── behind-a-proxy.md
│ │ │ │ ├── custom-response.md
│ │ │ │ ├── dataclasses.md
│ │ │ │ ├── events.md
│ │ │ │ ├── generate-clients.md
│ │ │ │ ├── index.md
│ │ │ │ ├── json-base64-bytes.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── openapi-callbacks.md
│ │ │ │ ├── openapi-webhooks.md
│ │ │ │ ├── path-operation-advanced-configuration.md
│ │ │ │ ├── response-change-status-code.md
│ │ │ │ ├── response-cookies.md
│ │ │ │ ├── response-directly.md
│ │ │ │ ├── response-headers.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── http-basic-auth.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── oauth2-scopes.md
│ │ │ │ ├── settings.md
│ │ │ │ ├── stream-data.md
│ │ │ │ ├── strict-content-type.md
│ │ │ │ ├── sub-applications.md
│ │ │ │ ├── templates.md
│ │ │ │ ├── testing-dependencies.md
│ │ │ │ ├── testing-events.md
│ │ │ │ ├── testing-websockets.md
│ │ │ │ ├── using-request-directly.md
│ │ │ │ ├── websockets.md
│ │ │ │ └── wsgi.md
│ │ │ ├── alternatives.md
│ │ │ ├── async.md
│ │ │ ├── benchmarks.md
│ │ │ ├── deployment/
│ │ │ │ ├── cloud.md
│ │ │ │ ├── concepts.md
│ │ │ │ ├── docker.md
│ │ │ │ ├── fastapicloud.md
│ │ │ │ ├── https.md
│ │ │ │ ├── index.md
│ │ │ │ ├── manually.md
│ │ │ │ ├── server-workers.md
│ │ │ │ └── versions.md
│ │ │ ├── editor-support.md
│ │ │ ├── environment-variables.md
│ │ │ ├── fastapi-cli.md
│ │ │ ├── features.md
│ │ │ ├── help-fastapi.md
│ │ │ ├── history-design-future.md
│ │ │ ├── how-to/
│ │ │ │ ├── authentication-error-status-code.md
│ │ │ │ ├── conditional-openapi.md
│ │ │ │ ├── configure-swagger-ui.md
│ │ │ │ ├── custom-docs-ui-assets.md
│ │ │ │ ├── custom-request-and-route.md
│ │ │ │ ├── extending-openapi.md
│ │ │ │ ├── general.md
│ │ │ │ ├── graphql.md
│ │ │ │ ├── index.md
│ │ │ │ ├── migrate-from-pydantic-v1-to-pydantic-v2.md
│ │ │ │ ├── separate-openapi-schemas.md
│ │ │ │ └── testing-database.md
│ │ │ ├── index.md
│ │ │ ├── learn/
│ │ │ │ └── index.md
│ │ │ ├── project-generation.md
│ │ │ ├── python-types.md
│ │ │ ├── resources/
│ │ │ │ └── index.md
│ │ │ ├── translation-banner.md
│ │ │ ├── tutorial/
│ │ │ │ ├── background-tasks.md
│ │ │ │ ├── bigger-applications.md
│ │ │ │ ├── body-fields.md
│ │ │ │ ├── body-multiple-params.md
│ │ │ │ ├── body-nested-models.md
│ │ │ │ ├── body-updates.md
│ │ │ │ ├── body.md
│ │ │ │ ├── cookie-param-models.md
│ │ │ │ ├── cookie-params.md
│ │ │ │ ├── cors.md
│ │ │ │ ├── debugging.md
│ │ │ │ ├── dependencies/
│ │ │ │ │ ├── classes-as-dependencies.md
│ │ │ │ │ ├── dependencies-in-path-operation-decorators.md
│ │ │ │ │ ├── dependencies-with-yield.md
│ │ │ │ │ ├── global-dependencies.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── sub-dependencies.md
│ │ │ │ ├── encoder.md
│ │ │ │ ├── extra-data-types.md
│ │ │ │ ├── extra-models.md
│ │ │ │ ├── first-steps.md
│ │ │ │ ├── handling-errors.md
│ │ │ │ ├── header-param-models.md
│ │ │ │ ├── header-params.md
│ │ │ │ ├── index.md
│ │ │ │ ├── metadata.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── path-operation-configuration.md
│ │ │ │ ├── path-params-numeric-validations.md
│ │ │ │ ├── path-params.md
│ │ │ │ ├── query-param-models.md
│ │ │ │ ├── query-params-str-validations.md
│ │ │ │ ├── query-params.md
│ │ │ │ ├── request-files.md
│ │ │ │ ├── request-form-models.md
│ │ │ │ ├── request-forms-and-files.md
│ │ │ │ ├── request-forms.md
│ │ │ │ ├── response-model.md
│ │ │ │ ├── response-status-code.md
│ │ │ │ ├── schema-extra-example.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── first-steps.md
│ │ │ │ │ ├── get-current-user.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ ├── oauth2-jwt.md
│ │ │ │ │ └── simple-oauth2.md
│ │ │ │ ├── server-sent-events.md
│ │ │ │ ├── sql-databases.md
│ │ │ │ ├── static-files.md
│ │ │ │ ├── stream-json-lines.md
│ │ │ │ └── testing.md
│ │ │ └── virtual-environments.md
│ │ ├── llm-prompt.md
│ │ └── mkdocs.yml
│ └── zh-hant/
│ ├── docs/
│ │ ├── _llm-test.md
│ │ ├── about/
│ │ │ └── index.md
│ │ ├── advanced/
│ │ │ ├── additional-responses.md
│ │ │ ├── additional-status-codes.md
│ │ │ ├── advanced-dependencies.md
│ │ │ ├── advanced-python-types.md
│ │ │ ├── async-tests.md
│ │ │ ├── behind-a-proxy.md
│ │ │ ├── custom-response.md
│ │ │ ├── dataclasses.md
│ │ │ ├── events.md
│ │ │ ├── generate-clients.md
│ │ │ ├── index.md
│ │ │ ├── json-base64-bytes.md
│ │ │ ├── middleware.md
│ │ │ ├── openapi-callbacks.md
│ │ │ ├── openapi-webhooks.md
│ │ │ ├── path-operation-advanced-configuration.md
│ │ │ ├── response-change-status-code.md
│ │ │ ├── response-cookies.md
│ │ │ ├── response-directly.md
│ │ │ ├── response-headers.md
│ │ │ ├── security/
│ │ │ │ ├── http-basic-auth.md
│ │ │ │ ├── index.md
│ │ │ │ └── oauth2-scopes.md
│ │ │ ├── settings.md
│ │ │ ├── stream-data.md
│ │ │ ├── strict-content-type.md
│ │ │ ├── sub-applications.md
│ │ │ ├── templates.md
│ │ │ ├── testing-dependencies.md
│ │ │ ├── testing-events.md
│ │ │ ├── testing-websockets.md
│ │ │ ├── using-request-directly.md
│ │ │ ├── websockets.md
│ │ │ └── wsgi.md
│ │ ├── alternatives.md
│ │ ├── async.md
│ │ ├── benchmarks.md
│ │ ├── deployment/
│ │ │ ├── cloud.md
│ │ │ ├── concepts.md
│ │ │ ├── docker.md
│ │ │ ├── fastapicloud.md
│ │ │ ├── https.md
│ │ │ ├── index.md
│ │ │ ├── manually.md
│ │ │ ├── server-workers.md
│ │ │ └── versions.md
│ │ ├── editor-support.md
│ │ ├── environment-variables.md
│ │ ├── fastapi-cli.md
│ │ ├── features.md
│ │ ├── help-fastapi.md
│ │ ├── history-design-future.md
│ │ ├── how-to/
│ │ │ ├── authentication-error-status-code.md
│ │ │ ├── conditional-openapi.md
│ │ │ ├── configure-swagger-ui.md
│ │ │ ├── custom-docs-ui-assets.md
│ │ │ ├── custom-request-and-route.md
│ │ │ ├── extending-openapi.md
│ │ │ ├── general.md
│ │ │ ├── graphql.md
│ │ │ ├── index.md
│ │ │ ├── migrate-from-pydantic-v1-to-pydantic-v2.md
│ │ │ ├── separate-openapi-schemas.md
│ │ │ └── testing-database.md
│ │ ├── index.md
│ │ ├── learn/
│ │ │ └── index.md
│ │ ├── project-generation.md
│ │ ├── python-types.md
│ │ ├── resources/
│ │ │ └── index.md
│ │ ├── translation-banner.md
│ │ ├── tutorial/
│ │ │ ├── background-tasks.md
│ │ │ ├── bigger-applications.md
│ │ │ ├── body-fields.md
│ │ │ ├── body-multiple-params.md
│ │ │ ├── body-nested-models.md
│ │ │ ├── body-updates.md
│ │ │ ├── body.md
│ │ │ ├── cookie-param-models.md
│ │ │ ├── cookie-params.md
│ │ │ ├── cors.md
│ │ │ ├── debugging.md
│ │ │ ├── dependencies/
│ │ │ │ ├── classes-as-dependencies.md
│ │ │ │ ├── dependencies-in-path-operation-decorators.md
│ │ │ │ ├── dependencies-with-yield.md
│ │ │ │ ├── global-dependencies.md
│ │ │ │ ├── index.md
│ │ │ │ └── sub-dependencies.md
│ │ │ ├── encoder.md
│ │ │ ├── extra-data-types.md
│ │ │ ├── extra-models.md
│ │ │ ├── first-steps.md
│ │ │ ├── handling-errors.md
│ │ │ ├── header-param-models.md
│ │ │ ├── header-params.md
│ │ │ ├── index.md
│ │ │ ├── metadata.md
│ │ │ ├── middleware.md
│ │ │ ├── path-operation-configuration.md
│ │ │ ├── path-params-numeric-validations.md
│ │ │ ├── path-params.md
│ │ │ ├── query-param-models.md
│ │ │ ├── query-params-str-validations.md
│ │ │ ├── query-params.md
│ │ │ ├── request-files.md
│ │ │ ├── request-form-models.md
│ │ │ ├── request-forms-and-files.md
│ │ │ ├── request-forms.md
│ │ │ ├── response-model.md
│ │ │ ├── response-status-code.md
│ │ │ ├── schema-extra-example.md
│ │ │ ├── security/
│ │ │ │ ├── first-steps.md
│ │ │ │ ├── get-current-user.md
│ │ │ │ ├── index.md
│ │ │ │ ├── oauth2-jwt.md
│ │ │ │ └── simple-oauth2.md
│ │ │ ├── server-sent-events.md
│ │ │ ├── sql-databases.md
│ │ │ ├── static-files.md
│ │ │ ├── stream-json-lines.md
│ │ │ └── testing.md
│ │ └── virtual-environments.md
│ ├── llm-prompt.md
│ └── mkdocs.yml
├── docs_src/
│ ├── additional_responses/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ └── tutorial004_py310.py
│ ├── additional_status_codes/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ └── tutorial001_py310.py
│ ├── advanced_middleware/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ └── tutorial003_py310.py
│ ├── app_testing/
│ │ ├── __init__.py
│ │ ├── app_a_py310/
│ │ │ ├── __init__.py
│ │ │ ├── main.py
│ │ │ └── test_main.py
│ │ ├── app_b_an_py310/
│ │ │ ├── __init__.py
│ │ │ ├── main.py
│ │ │ └── test_main.py
│ │ ├── app_b_py310/
│ │ │ ├── __init__.py
│ │ │ ├── main.py
│ │ │ └── test_main.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ └── tutorial004_py310.py
│ ├── async_tests/
│ │ ├── __init__.py
│ │ └── app_a_py310/
│ │ ├── __init__.py
│ │ ├── main.py
│ │ └── test_main.py
│ ├── authentication_error_status_code/
│ │ ├── __init__.py
│ │ └── tutorial001_an_py310.py
│ ├── background_tasks/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ └── tutorial002_py310.py
│ ├── behind_a_proxy/
│ │ ├── __init__.py
│ │ ├── tutorial001_01_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ └── tutorial004_py310.py
│ ├── bigger_applications/
│ │ ├── __init__.py
│ │ └── app_an_py310/
│ │ ├── __init__.py
│ │ ├── dependencies.py
│ │ ├── internal/
│ │ │ ├── __init__.py
│ │ │ └── admin.py
│ │ ├── main.py
│ │ └── routers/
│ │ ├── __init__.py
│ │ ├── items.py
│ │ └── users.py
│ ├── body/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ └── tutorial004_py310.py
│ ├── body_fields/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ └── tutorial001_py310.py
│ ├── body_multiple_params/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_an_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_an_py310.py
│ │ ├── tutorial004_py310.py
│ │ ├── tutorial005_an_py310.py
│ │ └── tutorial005_py310.py
│ ├── body_nested_models/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_py310.py
│ │ ├── tutorial005_py310.py
│ │ ├── tutorial006_py310.py
│ │ ├── tutorial007_py310.py
│ │ ├── tutorial008_py310.py
│ │ └── tutorial009_py310.py
│ ├── body_updates/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ └── tutorial002_py310.py
│ ├── conditional_openapi/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── configure_swagger_ui/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ └── tutorial003_py310.py
│ ├── cookie_param_models/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ └── tutorial002_py310.py
│ ├── cookie_params/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ └── tutorial001_py310.py
│ ├── cors/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── custom_docs_ui/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ └── tutorial002_py310.py
│ ├── custom_request_and_route/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ ├── tutorial002_py310.py
│ │ └── tutorial003_py310.py
│ ├── custom_response/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial001b_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_py310.py
│ │ ├── tutorial005_py310.py
│ │ ├── tutorial006_py310.py
│ │ ├── tutorial006b_py310.py
│ │ ├── tutorial006c_py310.py
│ │ ├── tutorial007_py310.py
│ │ ├── tutorial008_py310.py
│ │ ├── tutorial009_py310.py
│ │ ├── tutorial009b_py310.py
│ │ ├── tutorial009c_py310.py
│ │ └── tutorial010_py310.py
│ ├── dataclasses_/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ └── tutorial003_py310.py
│ ├── debugging/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── dependencies/
│ │ ├── __init__.py
│ │ ├── tutorial001_02_an_py310.py
│ │ ├── tutorial001_an_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_an_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_an_py310.py
│ │ ├── tutorial004_py310.py
│ │ ├── tutorial005_an_py310.py
│ │ ├── tutorial005_py310.py
│ │ ├── tutorial006_an_py310.py
│ │ ├── tutorial006_py310.py
│ │ ├── tutorial007_py310.py
│ │ ├── tutorial008_an_py310.py
│ │ ├── tutorial008_py310.py
│ │ ├── tutorial008b_an_py310.py
│ │ ├── tutorial008b_py310.py
│ │ ├── tutorial008c_an_py310.py
│ │ ├── tutorial008c_py310.py
│ │ ├── tutorial008d_an_py310.py
│ │ ├── tutorial008d_py310.py
│ │ ├── tutorial008e_an_py310.py
│ │ ├── tutorial008e_py310.py
│ │ ├── tutorial010_py310.py
│ │ ├── tutorial011_an_py310.py
│ │ ├── tutorial011_py310.py
│ │ ├── tutorial012_an_py310.py
│ │ ├── tutorial012_py310.py
│ │ ├── tutorial013_an_py310.py
│ │ └── tutorial014_an_py310.py
│ ├── dependency_testing/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ └── tutorial001_py310.py
│ ├── encoder/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── events/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ └── tutorial003_py310.py
│ ├── extending_openapi/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── extra_data_types/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ └── tutorial001_py310.py
│ ├── extra_models/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_py310.py
│ │ └── tutorial005_py310.py
│ ├── first_steps/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ └── tutorial003_py310.py
│ ├── generate_clients/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004.js
│ │ └── tutorial004_py310.py
│ ├── graphql_/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── handling_errors/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_py310.py
│ │ ├── tutorial005_py310.py
│ │ └── tutorial006_py310.py
│ ├── header_param_models/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_an_py310.py
│ │ └── tutorial003_py310.py
│ ├── header_params/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_an_py310.py
│ │ └── tutorial003_py310.py
│ ├── json_base64_bytes/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── metadata/
│ │ ├── __init__.py
│ │ ├── tutorial001_1_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ └── tutorial004_py310.py
│ ├── middleware/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── openapi_callbacks/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── openapi_webhooks/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── path_operation_advanced_configuration/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_py310.py
│ │ ├── tutorial005_py310.py
│ │ ├── tutorial006_py310.py
│ │ └── tutorial007_py310.py
│ ├── path_operation_configuration/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial002b_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_py310.py
│ │ ├── tutorial005_py310.py
│ │ └── tutorial006_py310.py
│ ├── path_params/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial003b_py310.py
│ │ ├── tutorial004_py310.py
│ │ └── tutorial005_py310.py
│ ├── path_params_numeric_validations/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_an_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_an_py310.py
│ │ ├── tutorial004_py310.py
│ │ ├── tutorial005_an_py310.py
│ │ ├── tutorial005_py310.py
│ │ ├── tutorial006_an_py310.py
│ │ └── tutorial006_py310.py
│ ├── pydantic_v1_in_v2/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ ├── tutorial003_an_py310.py
│ │ └── tutorial004_an_py310.py
│ ├── python_types/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_py310.py
│ │ ├── tutorial005_py310.py
│ │ ├── tutorial006_py310.py
│ │ ├── tutorial007_py310.py
│ │ ├── tutorial008_py310.py
│ │ ├── tutorial008b_py310.py
│ │ ├── tutorial009_py310.py
│ │ ├── tutorial010_py310.py
│ │ ├── tutorial011_py310.py
│ │ └── tutorial013_py310.py
│ ├── query_param_models/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ └── tutorial002_py310.py
│ ├── query_params/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_py310.py
│ │ ├── tutorial005_py310.py
│ │ └── tutorial006_py310.py
│ ├── query_params_str_validations/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_an_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_an_py310.py
│ │ ├── tutorial004_py310.py
│ │ ├── tutorial005_an_py310.py
│ │ ├── tutorial005_py310.py
│ │ ├── tutorial006_an_py310.py
│ │ ├── tutorial006_py310.py
│ │ ├── tutorial006c_an_py310.py
│ │ ├── tutorial006c_py310.py
│ │ ├── tutorial007_an_py310.py
│ │ ├── tutorial007_py310.py
│ │ ├── tutorial008_an_py310.py
│ │ ├── tutorial008_py310.py
│ │ ├── tutorial009_an_py310.py
│ │ ├── tutorial009_py310.py
│ │ ├── tutorial010_an_py310.py
│ │ ├── tutorial010_py310.py
│ │ ├── tutorial011_an_py310.py
│ │ ├── tutorial011_py310.py
│ │ ├── tutorial012_an_py310.py
│ │ ├── tutorial012_py310.py
│ │ ├── tutorial013_an_py310.py
│ │ ├── tutorial013_py310.py
│ │ ├── tutorial014_an_py310.py
│ │ ├── tutorial014_py310.py
│ │ └── tutorial015_an_py310.py
│ ├── request_files/
│ │ ├── __init__.py
│ │ ├── tutorial001_02_an_py310.py
│ │ ├── tutorial001_02_py310.py
│ │ ├── tutorial001_03_an_py310.py
│ │ ├── tutorial001_03_py310.py
│ │ ├── tutorial001_an_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_an_py310.py
│ │ └── tutorial003_py310.py
│ ├── request_form_models/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ └── tutorial002_py310.py
│ ├── request_forms/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ └── tutorial001_py310.py
│ ├── request_forms_and_files/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ └── tutorial001_py310.py
│ ├── response_change_status_code/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── response_cookies/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ └── tutorial002_py310.py
│ ├── response_directly/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ └── tutorial002_py310.py
│ ├── response_headers/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ └── tutorial002_py310.py
│ ├── response_model/
│ │ ├── __init__.py
│ │ ├── tutorial001_01_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_01_py310.py
│ │ ├── tutorial003_02_py310.py
│ │ ├── tutorial003_03_py310.py
│ │ ├── tutorial003_04_py310.py
│ │ ├── tutorial003_05_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_py310.py
│ │ ├── tutorial005_py310.py
│ │ └── tutorial006_py310.py
│ ├── response_status_code/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ └── tutorial002_py310.py
│ ├── schema_extra_example/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_an_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_an_py310.py
│ │ ├── tutorial004_py310.py
│ │ ├── tutorial005_an_py310.py
│ │ └── tutorial005_py310.py
│ ├── security/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_an_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_an_py310.py
│ │ ├── tutorial004_py310.py
│ │ ├── tutorial005_an_py310.py
│ │ ├── tutorial005_py310.py
│ │ ├── tutorial006_an_py310.py
│ │ ├── tutorial006_py310.py
│ │ ├── tutorial007_an_py310.py
│ │ └── tutorial007_py310.py
│ ├── separate_openapi_schemas/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ └── tutorial002_py310.py
│ ├── server_sent_events/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_py310.py
│ │ └── tutorial005_py310.py
│ ├── settings/
│ │ ├── __init__.py
│ │ ├── app01_py310/
│ │ │ ├── __init__.py
│ │ │ ├── config.py
│ │ │ └── main.py
│ │ ├── app02_an_py310/
│ │ │ ├── __init__.py
│ │ │ ├── config.py
│ │ │ ├── main.py
│ │ │ └── test_main.py
│ │ ├── app02_py310/
│ │ │ ├── __init__.py
│ │ │ ├── config.py
│ │ │ ├── main.py
│ │ │ └── test_main.py
│ │ ├── app03_an_py310/
│ │ │ ├── __init__.py
│ │ │ ├── config.py
│ │ │ └── main.py
│ │ ├── app03_py310/
│ │ │ ├── __init__.py
│ │ │ ├── config.py
│ │ │ └── main.py
│ │ └── tutorial001_py310.py
│ ├── sql_databases/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ └── tutorial002_py310.py
│ ├── static_files/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── stream_data/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ └── tutorial002_py310.py
│ ├── stream_json_lines/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── strict_content_type/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── sub_applications/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── templates/
│ │ ├── __init__.py
│ │ ├── static/
│ │ │ ├── __init__.py
│ │ │ └── styles.css
│ │ ├── templates/
│ │ │ ├── __init__.py
│ │ │ └── item.html
│ │ └── tutorial001_py310.py
│ ├── using_request_directly/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── websockets_/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ ├── tutorial002_py310.py
│ │ └── tutorial003_py310.py
│ └── wsgi/
│ ├── __init__.py
│ └── tutorial001_py310.py
├── fastapi/
│ ├── .agents/
│ │ └── skills/
│ │ └── fastapi/
│ │ ├── SKILL.md
│ │ └── references/
│ │ ├── dependencies.md
│ │ ├── other-tools.md
│ │ └── streaming.md
│ ├── __init__.py
│ ├── __main__.py
│ ├── _compat/
│ │ ├── __init__.py
│ │ ├── shared.py
│ │ └── v2.py
│ ├── applications.py
│ ├── background.py
│ ├── cli.py
│ ├── concurrency.py
│ ├── datastructures.py
│ ├── dependencies/
│ │ ├── __init__.py
│ │ ├── models.py
│ │ └── utils.py
│ ├── encoders.py
│ ├── exception_handlers.py
│ ├── exceptions.py
│ ├── logger.py
│ ├── middleware/
│ │ ├── __init__.py
│ │ ├── asyncexitstack.py
│ │ ├── cors.py
│ │ ├── gzip.py
│ │ ├── httpsredirect.py
│ │ ├── trustedhost.py
│ │ └── wsgi.py
│ ├── openapi/
│ │ ├── __init__.py
│ │ ├── constants.py
│ │ ├── docs.py
│ │ ├── models.py
│ │ └── utils.py
│ ├── param_functions.py
│ ├── params.py
│ ├── py.typed
│ ├── requests.py
│ ├── responses.py
│ ├── routing.py
│ ├── security/
│ │ ├── __init__.py
│ │ ├── api_key.py
│ │ ├── base.py
│ │ ├── http.py
│ │ ├── oauth2.py
│ │ ├── open_id_connect_url.py
│ │ └── utils.py
│ ├── sse.py
│ ├── staticfiles.py
│ ├── templating.py
│ ├── testclient.py
│ ├── types.py
│ ├── utils.py
│ └── websockets.py
├── fastapi-slim/
│ └── README.md
├── pyproject.toml
├── scripts/
│ ├── add_latest_release_date.py
│ ├── contributors.py
│ ├── coverage.sh
│ ├── deploy_docs_status.py
│ ├── doc_parsing_utils.py
│ ├── docs.py
│ ├── format.sh
│ ├── general-llm-prompt.md
│ ├── label_approved.py
│ ├── lint.sh
│ ├── mkdocs_hooks.py
│ ├── notify_translations.py
│ ├── people.py
│ ├── playwright/
│ │ ├── cookie_param_models/
│ │ │ └── image01.py
│ │ ├── header_param_models/
│ │ │ └── image01.py
│ │ ├── json_base64_bytes/
│ │ │ └── image01.py
│ │ ├── query_param_models/
│ │ │ └── image01.py
│ │ ├── request_form_models/
│ │ │ └── image01.py
│ │ ├── separate_openapi_schemas/
│ │ │ ├── image01.py
│ │ │ ├── image02.py
│ │ │ ├── image03.py
│ │ │ ├── image04.py
│ │ │ └── image05.py
│ │ └── sql_databases/
│ │ ├── image01.py
│ │ └── image02.py
│ ├── sponsors.py
│ ├── test-cov-html.sh
│ ├── test-cov.sh
│ ├── test.sh
│ ├── tests/
│ │ └── test_translation_fixer/
│ │ ├── conftest.py
│ │ ├── test_code_blocks/
│ │ │ ├── data/
│ │ │ │ ├── en_doc.md
│ │ │ │ ├── translated_doc_lines_number_gt.md
│ │ │ │ ├── translated_doc_lines_number_lt.md
│ │ │ │ ├── translated_doc_mermaid_not_translated.md
│ │ │ │ ├── translated_doc_mermaid_translated.md
│ │ │ │ ├── translated_doc_number_gt.md
│ │ │ │ ├── translated_doc_number_lt.md
│ │ │ │ ├── translated_doc_wrong_lang_code.md
│ │ │ │ └── translated_doc_wrong_lang_code_2.md
│ │ │ ├── test_code_blocks_lines_number_mismatch.py
│ │ │ ├── test_code_blocks_mermaid.py
│ │ │ ├── test_code_blocks_number_mismatch.py
│ │ │ └── test_code_blocks_wrong_lang_code.py
│ │ ├── test_code_includes/
│ │ │ ├── data/
│ │ │ │ ├── en_doc.md
│ │ │ │ ├── translated_doc_number_gt.md
│ │ │ │ └── translated_doc_number_lt.md
│ │ │ └── test_number_mismatch.py
│ │ ├── test_complex_doc/
│ │ │ ├── data/
│ │ │ │ ├── en_doc.md
│ │ │ │ ├── translated_doc.md
│ │ │ │ └── translated_doc_expected.md
│ │ │ └── test_compex_doc.py
│ │ ├── test_header_permalinks/
│ │ │ ├── data/
│ │ │ │ ├── en_doc.md
│ │ │ │ ├── translated_doc_level_mismatch_1.md
│ │ │ │ ├── translated_doc_level_mismatch_2.md
│ │ │ │ ├── translated_doc_number_gt.md
│ │ │ │ └── translated_doc_number_lt.md
│ │ │ ├── test_header_level_mismatch.py
│ │ │ └── test_header_number_mismatch.py
│ │ ├── test_html_links/
│ │ │ ├── data/
│ │ │ │ ├── en_doc.md
│ │ │ │ ├── translated_doc_number_gt.md
│ │ │ │ └── translated_doc_number_lt.md
│ │ │ └── test_html_links_number_mismatch.py
│ │ └── test_markdown_links/
│ │ ├── data/
│ │ │ ├── en_doc.md
│ │ │ ├── translated_doc.md
│ │ │ ├── translated_doc_number_gt.md
│ │ │ └── translated_doc_number_lt.md
│ │ └── test_mkd_links_number_mismatch.py
│ ├── topic_repos.py
│ ├── translate.py
│ └── translation_fixer.py
└── tests/
├── __init__.py
├── benchmarks/
│ ├── __init__.py
│ └── test_general_performance.py
├── forward_reference_type.py
├── main.py
├── test_additional_properties.py
├── test_additional_properties_bool.py
├── test_additional_response_extra.py
├── test_additional_responses_bad.py
├── test_additional_responses_custom_model_in_callback.py
├── test_additional_responses_custom_validationerror.py
├── test_additional_responses_default_validationerror.py
├── test_additional_responses_response_class.py
├── test_additional_responses_router.py
├── test_additional_responses_union_duplicate_anyof.py
├── test_allow_inf_nan_in_enforcing.py
├── test_ambiguous_params.py
├── test_annotated.py
├── test_application.py
├── test_arbitrary_types.py
├── test_callable_endpoint.py
├── test_compat.py
├── test_computed_fields.py
├── test_custom_middleware_exception.py
├── test_custom_route_class.py
├── test_custom_schema_fields.py
├── test_custom_swagger_ui_redirect.py
├── test_datastructures.py
├── test_datetime_custom_encoder.py
├── test_default_response_class.py
├── test_default_response_class_router.py
├── test_dependencies_utils.py
├── test_dependency_after_yield_raise.py
├── test_dependency_after_yield_streaming.py
├── test_dependency_after_yield_websockets.py
├── test_dependency_cache.py
├── test_dependency_class.py
├── test_dependency_contextmanager.py
├── test_dependency_contextvars.py
├── test_dependency_duplicates.py
├── test_dependency_overrides.py
├── test_dependency_paramless.py
├── test_dependency_partial.py
├── test_dependency_pep695.py
├── test_dependency_security_overrides.py
├── test_dependency_wrapped.py
├── test_dependency_yield_except_httpexception.py
├── test_dependency_yield_scope.py
├── test_dependency_yield_scope_websockets.py
├── test_depends_hashable.py
├── test_deprecated_openapi_prefix.py
├── test_deprecated_responses.py
├── test_dump_json_fast_path.py
├── test_duplicate_models_openapi.py
├── test_empty_router.py
├── test_enforce_once_required_parameter.py
├── test_exception_handlers.py
├── test_extra_routes.py
├── test_fastapi_cli.py
├── test_file_and_form_order_issue_9116.py
├── test_filter_pydantic_sub_model_pv2.py
├── test_form_default.py
├── test_forms_from_non_typing_sequences.py
├── test_forms_single_model.py
├── test_forms_single_param.py
├── test_generate_unique_id_function.py
├── test_generic_parameterless_depends.py
├── test_get_model_definitions_formfeed_escape.py
├── test_get_request_body.py
├── test_http_connection_injection.py
├── test_include_route.py
├── test_include_router_defaults_overrides.py
├── test_infer_param_optionality.py
├── test_inherited_custom_class.py
├── test_invalid_path_param.py
├── test_invalid_sequence_param.py
├── test_json_type.py
├── test_jsonable_encoder.py
├── test_list_bytes_file_order_preserved_issue_14811.py
├── test_local_docs.py
├── test_modules_same_name_body/
│ ├── __init__.py
│ ├── app/
│ │ ├── __init__.py
│ │ ├── a.py
│ │ ├── b.py
│ │ └── main.py
│ └── test_main.py
├── test_multi_body_errors.py
├── test_multi_query_errors.py
├── test_multipart_installation.py
├── test_no_schema_split.py
├── test_no_swagger_ui_redirect.py
├── test_openapi_cache_root_path.py
├── test_openapi_examples.py
├── test_openapi_model_description_trim_on_formfeed.py
├── test_openapi_query_parameter_extension.py
├── test_openapi_route_extensions.py
├── test_openapi_schema_type.py
├── test_openapi_separate_input_output_schemas.py
├── test_openapi_servers.py
├── test_operations_signatures.py
├── test_optional_file_list.py
├── test_orjson_response_class.py
├── test_param_class.py
├── test_param_in_path_and_dependency.py
├── test_param_include_in_schema.py
├── test_params_repr.py
├── test_path.py
├── test_put_no_body.py
├── test_pydantic_v1_error.py
├── test_pydanticv2_dataclasses_uuid_stringified_annotations.py
├── test_query.py
├── test_query_cookie_header_model_extra_params.py
├── test_read_with_orm_mode.py
├── test_regex_deprecated_body.py
├── test_regex_deprecated_params.py
├── test_repeated_cookie_headers.py
├── test_repeated_dependency_schema.py
├── test_repeated_parameter_alias.py
├── test_request_body_parameters_media_type.py
├── test_request_param_model_by_alias.py
├── test_request_params/
│ ├── __init__.py
│ ├── test_body/
│ │ ├── __init__.py
│ │ ├── test_list.py
│ │ ├── test_optional_list.py
│ │ ├── test_optional_str.py
│ │ ├── test_required_str.py
│ │ └── utils.py
│ ├── test_cookie/
│ │ ├── __init__.py
│ │ ├── test_list.py
│ │ ├── test_optional_list.py
│ │ ├── test_optional_str.py
│ │ └── test_required_str.py
│ ├── test_file/
│ │ ├── __init__.py
│ │ ├── test_list.py
│ │ ├── test_optional.py
│ │ ├── test_optional_list.py
│ │ ├── test_required.py
│ │ └── utils.py
│ ├── test_form/
│ │ ├── __init__.py
│ │ ├── test_list.py
│ │ ├── test_optional_list.py
│ │ ├── test_optional_str.py
│ │ ├── test_required_str.py
│ │ └── utils.py
│ ├── test_header/
│ │ ├── __init__.py
│ │ ├── test_list.py
│ │ ├── test_optional_list.py
│ │ ├── test_optional_str.py
│ │ └── test_required_str.py
│ ├── test_path/
│ │ ├── __init__.py
│ │ ├── test_list.py
│ │ ├── test_optional_list.py
│ │ ├── test_optional_str.py
│ │ └── test_required_str.py
│ └── test_query/
│ ├── __init__.py
│ ├── test_list.py
│ ├── test_optional_list.py
│ ├── test_optional_str.py
│ └── test_required_str.py
├── test_required_noneable.py
├── test_response_by_alias.py
├── test_response_change_status_code.py
├── test_response_class_no_mediatype.py
├── test_response_code_no_body.py
├── test_response_dependency.py
├── test_response_model_as_return_annotation.py
├── test_response_model_data_filter.py
├── test_response_model_data_filter_no_inheritance.py
├── test_response_model_default_factory.py
├── test_response_model_include_exclude.py
├── test_response_model_invalid.py
├── test_response_model_sub_types.py
├── test_response_set_response_code_empty.py
├── test_return_none_stringified_annotations.py
├── test_route_scope.py
├── test_router_circular_import.py
├── test_router_events.py
├── test_router_prefix_with_template.py
├── test_router_redirect_slashes.py
├── test_schema_compat_pydantic_v2.py
├── test_schema_extra_examples.py
├── test_schema_ref_pydantic_v2.py
├── test_security_api_key_cookie.py
├── test_security_api_key_cookie_description.py
├── test_security_api_key_cookie_optional.py
├── test_security_api_key_header.py
├── test_security_api_key_header_description.py
├── test_security_api_key_header_optional.py
├── test_security_api_key_query.py
├── test_security_api_key_query_description.py
├── test_security_api_key_query_optional.py
├── test_security_http_base.py
├── test_security_http_base_description.py
├── test_security_http_base_optional.py
├── test_security_http_basic_optional.py
├── test_security_http_basic_realm.py
├── test_security_http_basic_realm_description.py
├── test_security_http_bearer.py
├── test_security_http_bearer_description.py
├── test_security_http_bearer_optional.py
├── test_security_http_digest.py
├── test_security_http_digest_description.py
├── test_security_http_digest_optional.py
├── test_security_oauth2.py
├── test_security_oauth2_authorization_code_bearer.py
├── test_security_oauth2_authorization_code_bearer_description.py
├── test_security_oauth2_authorization_code_bearer_scopes_openapi.py
├── test_security_oauth2_authorization_code_bearer_scopes_openapi_simple.py
├── test_security_oauth2_optional.py
├── test_security_oauth2_optional_description.py
├── test_security_oauth2_password_bearer_optional.py
├── test_security_oauth2_password_bearer_optional_description.py
├── test_security_openid_connect.py
├── test_security_openid_connect_description.py
├── test_security_openid_connect_optional.py
├── test_security_scopes.py
├── test_security_scopes_dont_propagate.py
├── test_security_scopes_sub_dependency.py
├── test_serialize_response.py
├── test_serialize_response_dataclass.py
├── test_serialize_response_model.py
├── test_skip_defaults.py
├── test_sse.py
├── test_starlette_exception.py
├── test_starlette_urlconvertors.py
├── test_stream_bare_type.py
├── test_stream_cancellation.py
├── test_stream_json_validation_error.py
├── test_strict_content_type_app_level.py
├── test_strict_content_type_nested.py
├── test_strict_content_type_router_level.py
├── test_stringified_annotation_dependency.py
├── test_stringified_annotation_dependency_py314.py
├── test_stringified_annotations_simple.py
├── test_sub_callbacks.py
├── test_swagger_ui_escape.py
├── test_swagger_ui_init_oauth.py
├── test_top_level_security_scheme_in_openapi.py
├── test_tuples.py
├── test_tutorial/
│ ├── __init__.py
│ ├── test_additional_responses/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ └── test_tutorial004.py
│ ├── test_additional_status_codes/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_advanced_middleware/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ └── test_tutorial003.py
│ ├── test_async_tests/
│ │ ├── __init__.py
│ │ └── test_main_a.py
│ ├── test_authentication_error_status_code/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_background_tasks/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ └── test_tutorial002.py
│ ├── test_behind_a_proxy/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial001_01.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ └── test_tutorial004.py
│ ├── test_bigger_applications/
│ │ ├── __init__.py
│ │ └── test_main.py
│ ├── test_body/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ └── test_tutorial004.py
│ ├── test_body_fields/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_body_multiple_params/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ ├── test_tutorial004.py
│ │ └── test_tutorial005.py
│ ├── test_body_nested_models/
│ │ ├── __init__.py
│ │ ├── test_tutorial001_tutorial002_tutorial003.py
│ │ ├── test_tutorial004.py
│ │ ├── test_tutorial005.py
│ │ ├── test_tutorial006.py
│ │ ├── test_tutorial007.py
│ │ ├── test_tutorial008.py
│ │ └── test_tutorial009.py
│ ├── test_body_updates/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ └── test_tutorial002.py
│ ├── test_conditional_openapi/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_configure_swagger_ui/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ └── test_tutorial003.py
│ ├── test_cookie_param_models/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ └── test_tutorial002.py
│ ├── test_cookie_params/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_cors/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_custom_docs_ui/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ └── test_tutorial002.py
│ ├── test_custom_request_and_route/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ └── test_tutorial003.py
│ ├── test_custom_response/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial001b.py
│ │ ├── test_tutorial002_tutorial003_tutorial004.py
│ │ ├── test_tutorial005.py
│ │ ├── test_tutorial006.py
│ │ ├── test_tutorial006b.py
│ │ ├── test_tutorial006c.py
│ │ ├── test_tutorial007.py
│ │ ├── test_tutorial008.py
│ │ ├── test_tutorial009.py
│ │ ├── test_tutorial009b.py
│ │ ├── test_tutorial009c.py
│ │ └── test_tutorial010.py
│ ├── test_dataclasses/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ └── test_tutorial003.py
│ ├── test_debugging/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_dependencies/
│ │ ├── __init__.py
│ │ ├── test_tutorial001_tutorial001_02.py
│ │ ├── test_tutorial002_tutorial003_tutorial004.py
│ │ ├── test_tutorial005.py
│ │ ├── test_tutorial006.py
│ │ ├── test_tutorial007.py
│ │ ├── test_tutorial008.py
│ │ ├── test_tutorial008b.py
│ │ ├── test_tutorial008c.py
│ │ ├── test_tutorial008d.py
│ │ ├── test_tutorial008e.py
│ │ ├── test_tutorial010.py
│ │ ├── test_tutorial011.py
│ │ └── test_tutorial012.py
│ ├── test_encoder/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_events/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ └── test_tutorial003.py
│ ├── test_extending_openapi/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_extra_data_types/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_extra_models/
│ │ ├── __init__.py
│ │ ├── test_tutorial001_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ ├── test_tutorial004.py
│ │ └── test_tutorial005.py
│ ├── test_first_steps/
│ │ ├── __init__.py
│ │ └── test_tutorial001_tutorial002_tutorial003.py
│ ├── test_generate_clients/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ └── test_tutorial004.py
│ ├── test_graphql/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_handling_errors/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ ├── test_tutorial004.py
│ │ ├── test_tutorial005.py
│ │ └── test_tutorial006.py
│ ├── test_header_param_models/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ └── test_tutorial003.py
│ ├── test_header_params/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ └── test_tutorial003.py
│ ├── test_json_base64_bytes/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_metadata/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial001_1.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ └── test_tutorial004.py
│ ├── test_middleware/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_openapi_callbacks/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_openapi_webhooks/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_path_operation_advanced_configurations/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ ├── test_tutorial004.py
│ │ ├── test_tutorial005.py
│ │ ├── test_tutorial006.py
│ │ └── test_tutorial007.py
│ ├── test_path_operation_configurations/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial002b.py
│ │ ├── test_tutorial003_tutorial004.py
│ │ ├── test_tutorial005.py
│ │ └── test_tutorial006.py
│ ├── test_path_params/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ ├── test_tutorial003b.py
│ │ ├── test_tutorial004.py
│ │ └── test_tutorial005.py
│ ├── test_path_params_numeric_validations/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002_tutorial003.py
│ │ ├── test_tutorial004.py
│ │ ├── test_tutorial005.py
│ │ └── test_tutorial006.py
│ ├── test_python_types/
│ │ ├── __init__.py
│ │ ├── test_tutorial001_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ ├── test_tutorial004.py
│ │ ├── test_tutorial005.py
│ │ ├── test_tutorial006.py
│ │ ├── test_tutorial007.py
│ │ ├── test_tutorial008.py
│ │ ├── test_tutorial008b.py
│ │ ├── test_tutorial009_tutorial009b.py
│ │ ├── test_tutorial010.py
│ │ ├── test_tutorial011.py
│ │ └── test_tutorial013.py
│ ├── test_query_param_models/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ └── test_tutorial002.py
│ ├── test_query_params/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ ├── test_tutorial004.py
│ │ ├── test_tutorial005.py
│ │ └── test_tutorial006.py
│ ├── test_query_params_str_validations/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ ├── test_tutorial004.py
│ │ ├── test_tutorial005.py
│ │ ├── test_tutorial006.py
│ │ ├── test_tutorial006c.py
│ │ ├── test_tutorial007.py
│ │ ├── test_tutorial008.py
│ │ ├── test_tutorial009.py
│ │ ├── test_tutorial010.py
│ │ ├── test_tutorial011.py
│ │ ├── test_tutorial012.py
│ │ ├── test_tutorial013.py
│ │ ├── test_tutorial014.py
│ │ └── test_tutorial015.py
│ ├── test_request_files/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial001_02.py
│ │ ├── test_tutorial001_03.py
│ │ ├── test_tutorial002.py
│ │ └── test_tutorial003.py
│ ├── test_request_form_models/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ └── test_tutorial002.py
│ ├── test_request_forms/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_request_forms_and_files/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_response_change_status_code/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_response_cookies/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ └── test_tutorial002.py
│ ├── test_response_directly/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ └── test_tutorial002.py
│ ├── test_response_headers/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ └── test_tutorial002.py
│ ├── test_response_model/
│ │ ├── __init__.py
│ │ ├── test_tutorial001_tutorial001_01.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ ├── test_tutorial003_01.py
│ │ ├── test_tutorial003_02.py
│ │ ├── test_tutorial003_03.py
│ │ ├── test_tutorial003_04.py
│ │ ├── test_tutorial003_05.py
│ │ ├── test_tutorial004.py
│ │ ├── test_tutorial005.py
│ │ └── test_tutorial006.py
│ ├── test_response_status_code/
│ │ ├── __init__.py
│ │ └── test_tutorial001_tutorial002.py
│ ├── test_schema_extra_example/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ ├── test_tutorial004.py
│ │ └── test_tutorial005.py
│ ├── test_security/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ ├── test_tutorial004.py
│ │ ├── test_tutorial005.py
│ │ ├── test_tutorial006.py
│ │ └── test_tutorial007.py
│ ├── test_separate_openapi_schemas/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ └── test_tutorial002.py
│ ├── test_server_sent_events/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ ├── test_tutorial004.py
│ │ └── test_tutorial005.py
│ ├── test_settings/
│ │ ├── __init__.py
│ │ ├── test_app01.py
│ │ ├── test_app02.py
│ │ ├── test_app03.py
│ │ └── test_tutorial001.py
│ ├── test_sql_databases/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ └── test_tutorial002.py
│ ├── test_static_files/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_stream_data/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ └── test_tutorial002.py
│ ├── test_stream_json_lines/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_strict_content_type/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_sub_applications/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_templates/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_testing/
│ │ ├── __init__.py
│ │ ├── test_main_a.py
│ │ ├── test_main_b.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ └── test_tutorial004.py
│ ├── test_testing_dependencies/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_using_request_directly/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_websockets/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ └── test_tutorial003.py
│ └── test_wsgi/
│ ├── __init__.py
│ └── test_tutorial001.py
├── test_typing_python39.py
├── test_union_body.py
├── test_union_body_discriminator.py
├── test_union_body_discriminator_annotated.py
├── test_union_forms.py
├── test_union_inherited_body.py
├── test_validate_response.py
├── test_validate_response_dataclass.py
├── test_validate_response_recursive/
│ ├── __init__.py
│ ├── app.py
│ └── test_validate_response_recursive.py
├── test_validation_error_context.py
├── test_webhooks_security.py
├── test_wrapped_method_forward_reference.py
├── test_ws_dependencies.py
├── test_ws_router.py
└── utils.py
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/DISCUSSION_TEMPLATE/questions.yml
================================================
labels: [question]
body:
- type: markdown
attributes:
value: |
Thanks for your interest in FastAPI! 🚀
Please follow these instructions, fill every question, and do every step. 🙏
I'm asking this because answering questions and solving problems in GitHub is what consumes most of the time.
I end up not being able to add new features, fix bugs, review pull requests, etc. as fast as I wish because I have to spend too much time handling questions.
All that, on top of all the incredible help provided by a bunch of community members, the [FastAPI Experts](https://fastapi.tiangolo.com/fastapi-people/#experts), that give a lot of their time to come here and help others.
That's a lot of work they are doing, but if more FastAPI users came to help others like them just a little bit more, it would be much less effort for them (and you and me 😅).
By asking questions in a structured way (following this) it will be much easier to help you.
And there's a high chance that you will find the solution along the way and you won't even have to submit it and wait for an answer. 😎
As there are too many questions, I'll have to discard and close the incomplete ones. That will allow me (and others) to focus on helping people like you that follow the whole process and help us help you. 🤓
- type: checkboxes
id: checks
attributes:
label: First Check
description: Please confirm and check all the following options.
options:
- label: I added a very descriptive title here.
required: true
- label: I used the GitHub search to find a similar question and didn't find it.
required: true
- label: I searched the FastAPI documentation, with the integrated search.
required: true
- label: I already searched in Google "How to X in FastAPI" and didn't find any information.
required: true
- label: I already read and followed all the tutorial in the docs and didn't find an answer.
required: true
- label: I already checked if it is not related to FastAPI but to [Pydantic](https://github.com/pydantic/pydantic).
required: true
- label: I already checked if it is not related to FastAPI but to [Swagger UI](https://github.com/swagger-api/swagger-ui).
required: true
- label: I already checked if it is not related to FastAPI but to [ReDoc](https://github.com/Redocly/redoc).
required: true
- type: checkboxes
id: help
attributes:
label: Commit to Help
description: |
After submitting this, I commit to one of:
* Read open questions until I find 2 where I can help someone and add a comment to help there.
* I already hit the "watch" button in this repository to receive notifications and I commit to help at least 2 people that ask questions in the future.
* Review one Pull Request by downloading the code and following [all the review process](https://fastapi.tiangolo.com/help-fastapi/#review-pull-requests).
options:
- label: I commit to help with one of those options 👆
required: true
- type: textarea
id: example
attributes:
label: Example Code
description: |
Please add a self-contained, [minimal, reproducible, example](https://stackoverflow.com/help/minimal-reproducible-example) with your use case.
If I (or someone) can copy it, run it, and see it right away, there's a much higher chance I (or someone) will be able to help you.
placeholder: |
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
def read_root():
return {"Hello": "World"}
render: python
validations:
required: true
- type: textarea
id: description
attributes:
label: Description
description: |
What is the problem, question, or error?
Write a short description telling me what you are doing, what you expect to happen, and what is currently happening.
placeholder: |
* Open the browser and call the endpoint `/`.
* It returns a JSON with `{"Hello": "World"}`.
* But I expected it to return `{"Hello": "Sara"}`.
validations:
required: true
- type: dropdown
id: os
attributes:
label: Operating System
description: What operating system are you on?
multiple: true
options:
- Linux
- Windows
- macOS
- Other
validations:
required: true
- type: textarea
id: os-details
attributes:
label: Operating System Details
description: You can add more details about your operating system here, in particular if you chose "Other".
- type: input
id: fastapi-version
attributes:
label: FastAPI Version
description: |
What FastAPI version are you using?
You can find the FastAPI version with:
```bash
python -c "import fastapi; print(fastapi.__version__)"
```
validations:
required: true
- type: input
id: pydantic-version
attributes:
label: Pydantic Version
description: |
What Pydantic version are you using?
You can find the Pydantic version with:
```bash
python -c "import pydantic; print(pydantic.version.VERSION)"
```
validations:
required: true
- type: input
id: python-version
attributes:
label: Python Version
description: |
What Python version are you using?
You can find the Python version with:
```bash
python --version
```
validations:
required: true
- type: textarea
id: context
attributes:
label: Additional Context
description: Add any additional context information or screenshots you think are useful.
================================================
FILE: .github/DISCUSSION_TEMPLATE/translations.yml
================================================
labels: [lang-all]
body:
- type: markdown
attributes:
value: |
Thanks for your interest in helping translate the FastAPI docs! 🌍
Please follow these instructions carefully to propose a new language translation. 🙏
This structured process helps ensure translations can be properly maintained long-term.
- type: checkboxes
id: checks
attributes:
label: Initial Checks
description: Please confirm and check all the following options.
options:
- label: I checked that this language is not already being translated in FastAPI docs.
required: true
- label: I searched existing discussions to ensure no one else proposed this language.
required: true
- label: I am a native speaker of the language I want to help translate.
required: true
- type: input
id: language
attributes:
label: Target Language
description: What language do you want to translate the FastAPI docs into?
placeholder: e.g. Latin
validations:
required: true
- type: textarea
id: additional_info
attributes:
label: Additional Information
description: Any other relevant information about your translation proposal
- type: markdown
attributes:
value: |
Translations are automatized with AI and then reviewed by native speakers. 🤖 🙋
This allows us to keep them consistent and up-to-date.
If there are several native speakers commenting on this discussion and
committing to help review new translations, the FastAPI team will review it
and potentially make it an official translation. 😎
================================================
FILE: .github/FUNDING.yml
================================================
github: [tiangolo]
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false
contact_links:
- name: Security Contact
about: Please report security vulnerabilities to security@tiangolo.com
- name: Question or Problem
about: Ask a question or ask about a problem in GitHub Discussions.
url: https://github.com/fastapi/fastapi/discussions/categories/questions
- name: Feature Request
about: To suggest an idea or ask about a feature, please start with a question saying what you would like to achieve. There might be a way to do it already.
url: https://github.com/fastapi/fastapi/discussions/categories/questions
- name: Show and tell
about: Show what you built with FastAPI or to be used with FastAPI.
url: https://github.com/fastapi/fastapi/discussions/categories/show-and-tell
- name: Translations
about: Coordinate translations in GitHub Discussions.
url: https://github.com/fastapi/fastapi/discussions/categories/translations
================================================
FILE: .github/ISSUE_TEMPLATE/privileged.yml
================================================
name: Privileged
description: You are @tiangolo or he asked you directly to create an issue here. If not, check the other options. 👇
body:
- type: markdown
attributes:
value: |
Thanks for your interest in FastAPI! 🚀
If you are not @tiangolo or he didn't ask you directly to create an issue here, please start the conversation in a [Question in GitHub Discussions](https://github.com/fastapi/fastapi/discussions/categories/questions) instead.
- type: checkboxes
id: privileged
attributes:
label: Privileged issue
description: Confirm that you are allowed to create an issue here.
options:
- label: I'm @tiangolo or he asked me directly to create an issue here.
required: true
- type: textarea
id: content
attributes:
label: Issue Content
description: Add the content of the issue here.
================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
# GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
cooldown:
default-days: 7
commit-message:
prefix: ⬆
# Python
- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "daily"
cooldown:
default-days: 7
commit-message:
prefix: ⬆
# pre-commit
- package-ecosystem: "pre-commit"
directory: "/"
schedule:
interval: "daily"
cooldown:
default-days: 7
commit-message:
prefix: ⬆
================================================
FILE: .github/labeler.yml
================================================
docs:
- all:
- changed-files:
- any-glob-to-any-file:
- docs/en/docs/**
- docs_src/**
- all-globs-to-all-files:
- '!fastapi/**'
- '!pyproject.toml'
- '!docs/en/data/sponsors.yml'
- '!docs/en/overrides/main.html'
lang-all:
- all:
- changed-files:
- any-glob-to-any-file:
- docs/*/docs/**
- all-globs-to-all-files:
- '!docs/en/docs/**'
- '!docs/*/**/_*.md'
- '!fastapi/**'
- '!pyproject.toml'
internal:
- all:
- changed-files:
- any-glob-to-any-file:
- .github/**
- scripts/**
- .gitignore
- .pre-commit-config.yaml
- uv.lock
- docs/en/data/sponsors.yml
- docs/en/overrides/main.html
- all-globs-to-all-files:
- '!docs/*/docs/**'
- '!fastapi/**'
- '!pyproject.toml'
================================================
FILE: .github/workflows/add-to-project.yml
================================================
name: Add to Project
on:
pull_request_target: # zizmor: ignore[dangerous-triggers]
issues:
types:
- opened
- reopened
permissions: {}
jobs:
add-to-project:
name: Add to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@5afcf98fcd03f1c2f92c3c83f58ae24323cc57fd # v2.0.0
with:
project-url: https://github.com/orgs/fastapi/projects/2
github-token: ${{ secrets.PROJECTS_TOKEN }} # zizmor: ignore[secrets-outside-env]
================================================
FILE: .github/workflows/build-docs.yml
================================================
name: Build Docs
on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
permissions: {}
jobs:
changes:
runs-on: ubuntu-latest
# Required permissions
permissions:
pull-requests: read
# Set job outputs to values from filter step
outputs:
docs: ${{ steps.filter.outputs.docs }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
# For pull requests it's not necessary to checkout the code but for the main branch it is
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
id: filter
with:
filters: |
docs:
- README.md
- docs/**
- docs_src/**
- pyproject.toml
- uv.lock
- mkdocs.yml
- mkdocs.env.yml
- .github/workflows/build-docs.yml
- .github/workflows/deploy-docs.yml
- scripts/mkdocs_hooks.py
langs:
needs:
- changes
runs-on: ubuntu-latest
outputs:
langs: ${{ steps.show-langs.outputs.langs }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: "0.11.4"
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install docs extras
run: uv sync --locked --no-dev --group docs
- name: Export Language Codes
id: show-langs
run: |
echo "langs=$(uv run ./scripts/docs.py langs-json)" >> $GITHUB_OUTPUT
build-docs:
needs:
- changes
- langs
if: ${{ needs.changes.outputs.docs == 'true' }}
runs-on: ubuntu-latest
strategy:
matrix:
lang: ${{ fromJson(needs.langs.outputs.langs) }}
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: "0.11.4"
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install docs extras
run: uv sync --locked --no-dev --group docs
- name: Update Languages
run: uv run ./scripts/docs.py update-languages
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
key: mkdocs-cards-${{ matrix.lang }}-${{ github.ref }}
path: docs/${{ matrix.lang }}/.cache
- name: Build Docs
run: | # zizmor: ignore[template-injection] - comes from trusted source
uv run ./scripts/docs.py build-lang ${{ matrix.lang }}
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: docs-site-${{ matrix.lang }}
path: ./site/**
include-hidden-files: true
# https://github.com/marketplace/actions/alls-green#why
docs-all-green: # This job does nothing and is only used for the branch protection
if: always()
needs:
- build-docs
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
jobs: ${{ toJSON(needs) }}
allowed-skips: build-docs
================================================
FILE: .github/workflows/contributors.yml
================================================
name: FastAPI People Contributors
on:
schedule:
- cron: "0 3 1 * *"
workflow_dispatch:
inputs:
debug_enabled:
description: "Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)"
required: false
default: "false"
permissions: {}
jobs:
job:
if: github.repository_owner == 'fastapi'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: true # Required for `git push` in `contributors.py`
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: "0.11.4"
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install Dependencies
run: uv sync --locked --no-dev --group github-actions
# Allow debugging with tmate
- name: Setup tmate session
uses: mxschmitt/action-tmate@c0afd6f790e3a5564914980036ebf83216678101 # v3.23
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
with:
limit-access-to-actor: true
env:
GITHUB_TOKEN: ${{ secrets.FASTAPI_PR_TOKEN }} # zizmor: ignore[secrets-outside-env]
- name: FastAPI People Contributors
run: uv run ./scripts/contributors.py
env:
GITHUB_TOKEN: ${{ secrets.FASTAPI_PR_TOKEN }} # zizmor: ignore[secrets-outside-env]
================================================
FILE: .github/workflows/deploy-docs.yml
================================================
name: Deploy Docs
on:
workflow_run: # zizmor: ignore[dangerous-triggers]
workflows:
- Build Docs
types:
- completed
permissions: {}
jobs:
deploy-docs:
runs-on: ubuntu-latest
permissions:
deployments: write
issues: write
pull-requests: write
statuses: write
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: "0.11.4"
enable-cache: false
- name: Install GitHub Actions dependencies
run: uv sync --locked --no-dev --group github-actions
- name: Deploy Docs Status Pending
run: uv run ./scripts/deploy_docs_status.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}
RUN_ID: ${{ github.run_id }}
STATE: "pending"
- name: Clean site
run: |
rm -rf ./site
mkdir ./site
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: ./site/
pattern: docs-site-*
merge-multiple: true
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
- name: Deploy to Cloudflare Pages
# hashFiles returns an empty string if there are no files
if: hashFiles('./site/*')
id: deploy
env:
PROJECT_NAME: fastapitiangolo
BRANCH: ${{ ( github.event.workflow_run.head_repository.full_name == github.repository && github.event.workflow_run.head_branch == 'master' && 'main' ) || ( github.event.workflow_run.head_sha ) }}
uses: cloudflare/wrangler-action@9acf94ace14e7dc412b076f2c5c20b8ce93c79cd # v3.15.0
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} # zizmor: ignore[secrets-outside-env]
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} # zizmor: ignore[secrets-outside-env]
command: pages deploy ./site --project-name=${{ env.PROJECT_NAME }} --branch=${{ env.BRANCH }}
- name: Deploy Docs Status Error
if: failure()
run: uv run ./scripts/deploy_docs_status.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}
RUN_ID: ${{ github.run_id }}
STATE: "error"
- name: Comment Deploy
run: uv run ./scripts/deploy_docs_status.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEPLOY_URL: ${{ steps.deploy.outputs.deployment-url }}
COMMIT_SHA: ${{ github.event.workflow_run.head_sha }}
RUN_ID: ${{ github.run_id }}
STATE: "success"
================================================
FILE: .github/workflows/detect-conflicts.yml
================================================
name: "Conflict detector"
on:
push:
pull_request_target: # zizmor: ignore[dangerous-triggers]
types: [synchronize]
permissions: {}
jobs:
main:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Check if PRs have merge conflicts
uses: eps1lon/actions-label-merge-conflict@1df065ebe6e3310545d4f4c4e862e43bdca146f0 # v3.0.3
with:
dirtyLabel: "conflicts"
repoToken: "${{ secrets.GITHUB_TOKEN }}"
commentOnDirty: "This pull request has a merge conflict that needs to be resolved."
================================================
FILE: .github/workflows/issue-manager.yml
================================================
name: Issue Manager
on:
schedule:
- cron: "13 22 * * *"
issue_comment:
types:
- created
issues:
types:
- labeled
pull_request_target: # zizmor: ignore[dangerous-triggers]
types:
- labeled
workflow_dispatch:
permissions: {}
jobs:
issue-manager:
if: github.repository_owner == 'fastapi'
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: tiangolo/issue-manager@2fb3484ec9279485df8659e8ec73de262431737d # 0.6.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
config: >
{
"answered": {
"delay": 864000,
"message": "Assuming the original need was handled, this will be automatically closed now. But feel free to add more comments or create new issues or PRs."
},
"waiting": {
"delay": 2628000,
"message": "As this PR has been waiting for the original user for a while but seems to be inactive, it's now going to be closed. But if there's anyone interested, feel free to create a new PR.",
"reminder": {
"before": "P3D",
"message": "Heads-up: this will be closed in 3 days unless there's new activity."
}
},
"invalid": {
"delay": 0,
"message": "This was marked as invalid and will be closed now. If this is an error, please provide additional details."
},
"maybe-ai": {
"delay": 0,
"message": "This was marked as potentially AI generated and will be closed now. If this is an error, please provide additional details, make sure to read the docs about contributing and AI."
}
}
================================================
FILE: .github/workflows/label-approved.yml
================================================
name: Label Approved
on:
schedule:
- cron: "0 12 * * *"
workflow_dispatch:
permissions: {}
jobs:
label-approved:
if: github.repository_owner == 'fastapi'
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: "0.11.4"
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install GitHub Actions dependencies
run: uv sync --locked --no-dev --group github-actions
- name: Label Approved
run: uv run ./scripts/label_approved.py
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONFIG: >
{
"approved-1":
{
"number": 1,
"await_label": "awaiting-review"
}
}
================================================
FILE: .github/workflows/labeler.yml
================================================
name: Labels
on:
pull_request_target: # zizmor: ignore[dangerous-triggers]
types:
- opened
- synchronize
- reopened
# For label-checker
- labeled
- unlabeled
permissions: {}
jobs:
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@f27b608878404679385c85cfa523b85ccb86e213 # v6.1.0
if: ${{ github.event.action != 'labeled' && github.event.action != 'unlabeled' }}
- run: echo "Done adding labels"
# Run this after labeler applied labels
check-labels:
needs:
- labeler
permissions:
pull-requests: read
runs-on: ubuntu-latest
steps:
- uses: agilepathway/label-checker@c3d16ad512e7cea5961df85ff2486bb774caf3c5 # v1.6.65
with:
one_of: breaking,security,feature,bug,refactor,upgrade,docs,lang-all,internal
repo_token: ${{ secrets.GITHUB_TOKEN }}
================================================
FILE: .github/workflows/latest-changes.yml
================================================
name: Latest Changes
on:
pull_request_target: # zizmor: ignore[dangerous-triggers]
branches:
- master
types:
- closed
workflow_dispatch:
inputs:
number:
description: PR number
required: true
debug_enabled:
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: 'false'
permissions: {}
jobs:
latest-changes:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
# To allow latest-changes to commit to the main branch
token: ${{ secrets.FASTAPI_LATEST_CHANGES }} # zizmor: ignore[secrets-outside-env]
persist-credentials: true # required by tiangolo/latest-changes
# Allow debugging with tmate
- name: Setup tmate session
uses: mxschmitt/action-tmate@c0afd6f790e3a5564914980036ebf83216678101 # v3.23
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
with:
limit-access-to-actor: true
- uses: tiangolo/latest-changes@c9d329cb147f0ddf4fb631214e3f838ff17ccbbd # 0.4.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
latest_changes_file: docs/en/docs/release-notes.md
latest_changes_header: '## Latest Changes'
end_regex: '^## '
debug_logs: true
label_header_prefix: '### '
================================================
FILE: .github/workflows/notify-translations.yml
================================================
name: Notify Translations
on:
pull_request_target: # zizmor: ignore[dangerous-triggers]
types:
- labeled
- closed
branches:
- master
workflow_dispatch:
inputs:
number:
description: PR number
required: true
debug_enabled:
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: 'false'
permissions: {}
jobs:
job:
runs-on: ubuntu-latest
permissions:
discussions: write
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: "0.11.4"
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install Dependencies
run: uv sync --locked --no-dev --group github-actions
# Allow debugging with tmate
- name: Setup tmate session
uses: mxschmitt/action-tmate@c0afd6f790e3a5564914980036ebf83216678101 # v3.23
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
with:
limit-access-to-actor: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Notify Translations
run: uv run ./scripts/notify_translations.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUMBER: ${{ github.event.inputs.number || null }}
DEBUG: ${{ github.event.inputs.debug_enabled || 'false' }}
================================================
FILE: .github/workflows/people.yml
================================================
name: FastAPI People
on:
schedule:
- cron: "0 14 1 * *"
workflow_dispatch:
inputs:
debug_enabled:
description: Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)
required: false
default: "false"
permissions: {}
jobs:
job:
if: github.repository_owner == 'fastapi'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: true # Required for `git push` in `people.py`
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: "0.11.4"
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install Dependencies
run: uv sync --locked --no-dev --group github-actions
# Allow debugging with tmate
- name: Setup tmate session
uses: mxschmitt/action-tmate@c0afd6f790e3a5564914980036ebf83216678101 # v3.23
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
with:
limit-access-to-actor: true
env:
GITHUB_TOKEN: ${{ secrets.FASTAPI_PEOPLE }} # zizmor: ignore[secrets-outside-env]
- name: FastAPI People Experts
run: uv run ./scripts/people.py
env:
GITHUB_TOKEN: ${{ secrets.FASTAPI_PEOPLE }} # zizmor: ignore[secrets-outside-env]
SLEEP_INTERVAL: ${{ vars.PEOPLE_SLEEP_INTERVAL }}
================================================
FILE: .github/workflows/pre-commit.yml
================================================
name: pre-commit
on:
pull_request:
types:
- opened
- synchronize
permissions: {}
env:
# Forks and Dependabot don't have access to secrets
HAS_SECRETS: ${{ secrets.PRE_COMMIT != '' }}
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
name: Checkout PR for own repo
if: env.HAS_SECRETS == 'true'
with:
# To be able to commit it needs to fetch the head of the branch, not the
# merge commit
ref: ${{ github.head_ref }}
# And it needs the full history to be able to compute diffs
fetch-depth: 0
# A token other than the default GITHUB_TOKEN is needed to be able to trigger CI
token: ${{ secrets.PRE_COMMIT }} # zizmor: ignore[secrets-outside-env]
persist-credentials: true # Required for `git push` command
# pre-commit lite ci needs the default checkout configs to work
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
name: Checkout PR for fork
if: env.HAS_SECRETS == 'false'
with:
# To be able to commit it needs the head branch of the PR, the remote one
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: "0.11.4"
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install Dependencies
run: uv sync --locked --extra all
- name: Run prek - pre-commit
id: precommit
run: uv run prek run --from-ref origin/${GITHUB_BASE_REF} --to-ref HEAD --show-diff-on-failure
continue-on-error: true
- name: Commit and push changes
if: env.HAS_SECRETS == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add -A
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "🎨 Auto format"
git push
fi
- uses: pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43 # v1.1.0
if: env.HAS_SECRETS == 'false'
with:
msg: 🎨 Auto format
- name: Error out on pre-commit errors
if: steps.precommit.outcome == 'failure'
run: exit 1
# https://github.com/marketplace/actions/alls-green#why
pre-commit-alls-green: # This job does nothing and is only used for the branch protection
if: always()
needs:
- pre-commit
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
jobs: ${{ toJSON(needs) }}
================================================
FILE: .github/workflows/publish.yml
================================================
name: Publish
on:
release:
types:
- created
permissions: {}
jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version-file: ".python-version"
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: "0.11.4"
- name: Build distribution
run: uv build
- name: Publish
run: uv publish
================================================
FILE: .github/workflows/smokeshow.yml
================================================
name: Smokeshow
on:
workflow_run: # zizmor: ignore[dangerous-triggers]
workflows: [Test]
types: [completed]
permissions: {}
jobs:
smokeshow:
runs-on: ubuntu-latest
permissions:
statuses: write
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: "0.11.4"
cache-dependency-glob: |
pyproject.toml
uv.lock
- run: uv sync --locked --no-dev --group github-actions
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: coverage-html
path: htmlcov
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
# Try 5 times to upload coverage to smokeshow
- name: Upload coverage to Smokeshow
run: |
for i in 1 2 3 4 5; do
if uv run smokeshow upload htmlcov; then
echo "Smokeshow upload success!"
break
fi
echo "Smokeshow upload error, sleep 1 sec and try again."
sleep 1
done
env:
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage}
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 100
SMOKESHOW_GITHUB_CONTEXT: coverage
SMOKESHOW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SMOKESHOW_GITHUB_PR_HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
SMOKESHOW_AUTH_KEY: ${{ secrets.SMOKESHOW_AUTH_KEY }} # zizmor: ignore[secrets-outside-env]
================================================
FILE: .github/workflows/sponsors.yml
================================================
name: FastAPI People Sponsors
on:
schedule:
- cron: "0 6 1 * *"
workflow_dispatch:
inputs:
debug_enabled:
description: "Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)"
required: false
default: "false"
permissions: {}
jobs:
job:
if: github.repository_owner == 'fastapi'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: true # Required for `git push` in `sponsors.py`
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: "0.11.4"
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install Dependencies
run: uv sync --locked --no-dev --group github-actions
# Allow debugging with tmate
- name: Setup tmate session
uses: mxschmitt/action-tmate@c0afd6f790e3a5564914980036ebf83216678101 # v3.23
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
with:
limit-access-to-actor: true
- name: FastAPI People Sponsors
run: uv run ./scripts/sponsors.py
env:
SPONSORS_TOKEN: ${{ secrets.SPONSORS_TOKEN }} # zizmor: ignore[secrets-outside-env]
PR_TOKEN: ${{ secrets.FASTAPI_PR_TOKEN }} # zizmor: ignore[secrets-outside-env]
================================================
FILE: .github/workflows/test-redistribute.yml
================================================
name: Test Redistribute
on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
permissions: {}
jobs:
test-redistribute:
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version-file: ".python-version"
- name: Install build dependencies
run: pip install build
- name: Build source distribution
run: python -m build --sdist
- name: Decompress source distribution
run: |
cd dist
tar xvf fastapi*.tar.gz
- name: Install test dependencies
run: |
cd dist/fastapi*/
pip install --group tests --editable .[all]
- name: Run source distribution tests
run: |
cd dist/fastapi*/
bash scripts/test.sh
- name: Build wheel distribution
run: |
cd dist
pip wheel --no-deps fastapi*.tar.gz
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
# https://github.com/marketplace/actions/alls-green#why
test-redistribute-alls-green: # This job does nothing and is only used for the branch protection
if: always()
needs:
- test-redistribute
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
jobs: ${{ toJSON(needs) }}
================================================
FILE: .github/workflows/test.yml
================================================
name: Test
on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
schedule:
# cron every week on monday
- cron: "0 0 * * 1"
permissions: {}
env:
UV_NO_SYNC: true
INLINE_SNAPSHOT_DEFAULT_FLAGS: review
jobs:
changes:
runs-on: ubuntu-latest
# Required permissions
permissions:
pull-requests: read
# Set job outputs to values from filter step
outputs:
src: ${{ steps.filter.outputs.src }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
# For pull requests it's not necessary to checkout the code but for the main branch it is
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
id: filter
with:
filters: |
src:
- .github/workflows/test.yml
- docs_src/**
- fastapi/**
- scripts/**
- tests/**
- .python-version
- pyproject.toml
- uv.lock
test:
needs:
- changes
if: needs.changes.outputs.src == 'true' || github.ref == 'refs/heads/master'
strategy:
matrix:
os: [ windows-latest, macos-latest ]
python-version: [ "3.14", "3.14t" ]
deprecated-tests: [ "no-deprecation" ]
uv-resolution:
- highest
starlette-src:
- starlette-pypi
- starlette-git
include:
- os: macos-latest
python-version: "3.10"
coverage: coverage
uv-resolution: lowest-direct
deprecated-tests: "no-deprecation"
- os: windows-latest
python-version: "3.12"
coverage: coverage
uv-resolution: lowest-direct
deprecated-tests: "no-deprecation"
- os: ubuntu-latest
python-version: "3.13"
coverage: coverage
uv-resolution: highest
deprecated-tests: "no-deprecation"
- os: ubuntu-latest
python-version: "3.13"
uv-resolution: highest
codspeed: codspeed
deprecated-tests: "no-deprecation"
- os: ubuntu-latest
python-version: "3.14"
coverage: coverage
uv-resolution: highest
starlette-src: starlette-git
deprecated-tests: "test-deprecation"
- os: ubuntu-latest
python-version: "3.14t"
coverage: coverage
uv-resolution: highest
deprecated-tests: "no-deprecation"
fail-fast: false
runs-on: ${{ matrix.os }}
env:
UV_PYTHON: ${{ matrix.python-version }}
UV_RESOLUTION: ${{ matrix.uv-resolution }}
STARLETTE_SRC: ${{ matrix.starlette-src }}
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Setup uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: "0.11.4"
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install Dependencies
run: uv sync --no-dev --group tests --extra all
- name: Ensure that we have the lowest supported Pydantic version
if: matrix.uv-resolution == 'lowest-direct'
run: uv pip install "pydantic==2.9.0"
- name: Install Starlette from source
if: matrix.starlette-src == 'starlette-git'
run: uv pip install "git+https://github.com/Kludex/starlette@main"
- name: Install deprecated libraries just for testing
if: matrix.deprecated-tests == 'test-deprecation'
run: uv pip install orjson ujson
- name: Reinstall SQLAlchemy without Cython extensions
if: matrix.python-version == '3.14t' && matrix.os == 'ubuntu-latest'
run: "DISABLE_SQLALCHEMY_CEXT=1 uv pip install --force-reinstall --no-binary :all: sqlalchemy"
- run: mkdir coverage
- name: Test
run: uv run --no-sync bash scripts/test-cov.sh
env:
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.deprecated-tests}}
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.deprecated-tests}}
# Do not store coverage for all possible combinations to avoid file size max errors in Smokeshow
- name: Store coverage files
if: matrix.coverage == 'coverage'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: coverage-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.deprecated-tests}}-${{ hashFiles('**/coverage/.coverage.*') }}
path: coverage
include-hidden-files: true
benchmark:
needs:
- changes
if: needs.changes.outputs.src == 'true' || github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
env:
UV_PYTHON: "3.13"
UV_RESOLUTION: highest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.13"
- name: Setup uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: "0.11.4"
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install Dependencies
run: uv sync --no-dev --group tests --extra all
- name: CodSpeed benchmarks
uses: CodSpeedHQ/action@658a901452bb54c799643e060733b7afe9121b8d # v4.14.0
with:
mode: simulation
run: uv run --no-sync pytest tests/benchmarks --codspeed
coverage-combine:
needs:
- test
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: "0.11.4"
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install Dependencies
run: uv sync --locked --no-dev --group tests --extra all
- name: Get coverage files
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: coverage-*
path: coverage
merge-multiple: true
- run: ls -la coverage
- run: uv run coverage combine coverage
- run: uv run coverage html --title "Coverage for ${{ github.sha }}"
- name: Store coverage HTML
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: coverage-html
path: htmlcov
include-hidden-files: true
- run: uv run coverage report --fail-under=100
# https://github.com/marketplace/actions/alls-green#why
check: # This job does nothing and is only used for the branch protection
if: always()
needs:
- coverage-combine
- benchmark
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
jobs: ${{ toJSON(needs) }}
allowed-skips: coverage-combine,test,benchmark
================================================
FILE: .github/workflows/topic-repos.yml
================================================
name: Update Topic Repos
on:
schedule:
- cron: "0 12 1 * *"
workflow_dispatch:
permissions: {}
jobs:
topic-repos:
if: github.repository_owner == 'fastapi'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: true # Required for `git push` in `topic_repos.py`
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: "0.11.4"
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install GitHub Actions dependencies
run: uv sync --locked --no-dev --group github-actions
- name: Update Topic Repos
run: uv run ./scripts/topic_repos.py
env:
GITHUB_TOKEN: ${{ secrets.FASTAPI_PR_TOKEN }} # zizmor: ignore[secrets-outside-env]
================================================
FILE: .github/workflows/translate.yml
================================================
name: Translate
on:
schedule:
- cron: "0 5 1,15 * *" # Run at 05:00 on the 1st and 15th of every month
workflow_dispatch:
inputs:
debug_enabled:
description: Run with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)
required: false
default: "false"
command:
description: Command to run
type: choice
options:
- translate-page
- translate-lang
- update-outdated
- add-missing
- update-and-add
- remove-removable
language:
description: Language to translate to as a letter code (e.g. "es" for Spanish)
type: string
required: false
default: ""
en_path:
description: File path in English to translate (e.g. docs/en/docs/index.md)
type: string
required: false
default: ""
commit_in_place:
description: Commit changes directly instead of making a PR
type: boolean
required: false
default: false
max:
description: Maximum number of items to translate (e.g. 10)
type: number
required: false
default: 10
permissions: {}
jobs:
langs:
runs-on: ubuntu-latest
outputs:
langs: ${{ steps.show-langs.outputs.langs }}
commands: ${{ steps.show-langs.outputs.commands }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: "0.11.4"
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install Dependencies
run: uv sync --locked --no-dev --group github-actions --group translations
- name: Export Language Codes
id: show-langs
run: |
echo "langs=$(uv run ./scripts/translate.py llm-translatable-json)" >> $GITHUB_OUTPUT
echo "commands=$(uv run ./scripts/translate.py commands-json)" >> $GITHUB_OUTPUT
env:
LANGUAGE: ${{ github.event.inputs.language }}
COMMAND: ${{ github.event.inputs.command }}
translate:
if: github.repository_owner == 'fastapi'
needs: langs
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
matrix:
lang: ${{ fromJson(needs.langs.outputs.langs) }}
command: ${{ fromJson(needs.langs.outputs.commands) }}
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: true # Required for `git push` in `translate.py`
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version-file: ".python-version"
- name: Setup uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: "0.11.4"
cache-dependency-glob: |
pyproject.toml
uv.lock
- name: Install Dependencies
run: uv sync --locked --no-dev --group github-actions --group translations
# Allow debugging with tmate
- name: Setup tmate session
uses: mxschmitt/action-tmate@c0afd6f790e3a5564914980036ebf83216678101 # v3.23
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
with:
limit-access-to-actor: true
env:
GITHUB_TOKEN: ${{ secrets.FASTAPI_TRANSLATIONS }} # zizmor: ignore[secrets-outside-env]
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} # zizmor: ignore[secrets-outside-env]
- name: FastAPI Translate
run: |
uv run ./scripts/translate.py "$COMMAND"
uv run ./scripts/translate.py make-pr
env:
GITHUB_TOKEN: ${{ secrets.FASTAPI_TRANSLATIONS }} # zizmor: ignore[secrets-outside-env]
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} # zizmor: ignore[secrets-outside-env]
LANGUAGE: ${{ matrix.lang }}
EN_PATH: ${{ github.event.inputs.en_path }}
COMMAND: ${{ matrix.command }}
COMMIT_IN_PLACE: ${{ github.event.inputs.commit_in_place == 'true' && 'true' || '' }}
MAX: ${{ github.event.inputs.max }}
================================================
FILE: .gitignore
================================================
.idea
.ipynb_checkpoints
.mypy_cache
.vscode
__pycache__
.pytest_cache
htmlcov
dist
site
.coverage*
coverage.xml
.netlify
test.db
log.txt
Pipfile.lock
env3.*
env
docs_build
site_build
venv
docs.zip
archive.zip
# vim temporary files
*~
.*.sw?
.cache
# macOS
.DS_Store
.codspeed
================================================
FILE: .pre-commit-config.yaml
================================================
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # v6.0.0
hooks:
- id: check-added-large-files
args: ['--maxkb=750']
exclude: ^uv.lock$
- id: check-toml
- id: check-yaml
args:
- --unsafe
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/crate-ci/typos
rev: bbaefadf97b0ec5fdc942684b647f1a6ab250274 # v1.46.0
hooks:
- id: typos
args: [--force-exclude]
- repo: local
hooks:
- id: local-ruff-check
name: ruff check
entry: uv run ruff check --force-exclude --fix --exit-non-zero-on-fix
require_serial: true
language: unsupported
types: [python]
- id: local-ruff-format
name: ruff format
entry: uv run ruff format --force-exclude --exit-non-zero-on-format
require_serial: true
language: unsupported
types: [python]
- id: local-mypy
name: mypy check
entry: uv run mypy fastapi
require_serial: true
language: unsupported
pass_filenames: false
- id: local-ty
name: ty check
entry: uv run ty check fastapi
require_serial: true
language: unsupported
pass_filenames: false
- id: add-permalinks-pages
language: unsupported
name: add-permalinks-pages
entry: uv run ./scripts/docs.py add-permalinks-pages
args:
- --update-existing
files: ^docs/en/docs/.*\.md$
- id: generate-readme
language: unsupported
name: generate README.md from index.md
entry: uv run ./scripts/docs.py generate-readme
files: ^docs/en/docs/index\.md|docs/en/data/sponsors\.yml|scripts/docs\.py$
pass_filenames: false
- id: update-languages
language: unsupported
name: update languages
entry: uv run ./scripts/docs.py update-languages
files: ^docs/.*|scripts/docs\.py$
pass_filenames: false
- id: ensure-non-translated
language: unsupported
name: ensure non-translated files are not modified
entry: uv run ./scripts/docs.py ensure-non-translated
files: ^docs/(?!en/).*|^scripts/docs\.py$
pass_filenames: false
- id: fix-translations
language: unsupported
name: fix translations
entry: uv run ./scripts/translation_fixer.py fix-pages
files: ^docs/(?!en/).*/docs/.*\.md$
- id: add-release-date
language: unsupported
name: add date to latest release header
entry: uv run python scripts/add_latest_release_date.py
files: ^docs/en/docs/release-notes\.md$
pass_filenames: false
- id: zizmor
name: zizmor
language: python
entry: uv run zizmor .
files: ^\.github\/workflows\/
require_serial: true
pass_filenames: false
================================================
FILE: .python-version
================================================
3.11
================================================
FILE: CITATION.cff
================================================
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: FastAPI
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Sebastián
family-names: Ramírez
email: tiangolo@gmail.com
identifiers:
repository-code: 'https://github.com/fastapi/fastapi'
url: 'https://fastapi.tiangolo.com'
abstract: >-
FastAPI framework, high performance, easy to learn, fast to code,
ready for production
keywords:
- fastapi
- pydantic
- starlette
license: MIT
================================================
FILE: CONTRIBUTING.md
================================================
Please read the [Development - Contributing](https://fastapi.tiangolo.com/contributing/) guidelines in the documentation site.
================================================
FILE: LICENSE
================================================
The MIT License (MIT)
Copyright (c) 2018 Sebastián Ramírez
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
================================================
FILE: README.md
================================================
<p align="center">
<a href="https://fastapi.tiangolo.com"><img src="https://fastapi.tiangolo.com/img/logo-margin/logo-teal.png" alt="FastAPI"></a>
</p>
<p align="center">
<em>FastAPI framework, high performance, easy to learn, fast to code, ready for production</em>
</p>
<p align="center">
<a href="https://github.com/fastapi/fastapi/actions?query=workflow%3ATest+event%3Apush+branch%3Amaster">
<img src="https://github.com/fastapi/fastapi/actions/workflows/test.yml/badge.svg?event=push&branch=master" alt="Test">
</a>
<a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/fastapi">
<img src="https://coverage-badge.samuelcolvin.workers.dev/fastapi/fastapi.svg" alt="Coverage">
</a>
<a href="https://pypi.org/project/fastapi">
<img src="https://img.shields.io/pypi/v/fastapi?color=%2334D058&label=pypi%20package" alt="Package version">
</a>
<a href="https://pypi.org/project/fastapi">
<img src="https://img.shields.io/pypi/pyversions/fastapi.svg?color=%2334D058" alt="Supported Python versions">
</a>
</p>
---
**Documentation**: [https://fastapi.tiangolo.com](https://fastapi.tiangolo.com)
**Source Code**: [https://github.com/fastapi/fastapi](https://github.com/fastapi/fastapi)
---
FastAPI is a modern, fast (high-performance), web framework for building APIs with Python based on standard Python type hints.
The key features are:
* **Fast**: Very high performance, on par with **NodeJS** and **Go** (thanks to Starlette and Pydantic). [One of the fastest Python frameworks available](#performance).
* **Fast to code**: Increase the speed to develop features by about 200% to 300%. *
* **Fewer bugs**: Reduce about 40% of human (developer) induced errors. *
* **Intuitive**: Great editor support. <dfn title="also known as auto-complete, autocompletion, IntelliSense">Completion</dfn> everywhere. Less time debugging.
* **Easy**: Designed to be easy to use and learn. Less time reading docs.
* **Short**: Minimize code duplication. Multiple features from each parameter declaration. Fewer bugs.
* **Robust**: Get production-ready code. With automatic interactive documentation.
* **Standards-based**: Based on (and fully compatible with) the open standards for APIs: [OpenAPI](https://github.com/OAI/OpenAPI-Specification) (previously known as Swagger) and [JSON Schema](https://json-schema.org/).
<small>* estimation based on tests conducted by an internal development team, building production applications.</small>
## Sponsors
<!-- sponsors -->
### Keystone Sponsor
<a href="https://fastapicloud.com" target="_blank" title="FastAPI Cloud. By the same team behind FastAPI. You code. We Cloud."><img src="https://fastapi.tiangolo.com/img/sponsors/fastapicloud.png"></a>
### Gold Sponsors
<a href="https://blockbee.io?ref=fastapi" target="_blank" title="BlockBee Cryptocurrency Payment Gateway"><img src="https://fastapi.tiangolo.com/img/sponsors/blockbee.png"></a>
<a href="https://github.com/scalar/scalar/?utm_source=fastapi&utm_medium=website&utm_campaign=main-badge" target="_blank" title="Scalar: Beautiful Open-Source API References from Swagger/OpenAPI files"><img src="https://fastapi.tiangolo.com/img/sponsors/scalar.svg"></a>
<a href="https://www.propelauth.com/?utm_source=fastapi&utm_campaign=1223&utm_medium=mainbadge" target="_blank" title="Auth, user management and more for your B2B product"><img src="https://fastapi.tiangolo.com/img/sponsors/propelauth.png"></a>
<a href="https://liblab.com?utm_source=fastapi" target="_blank" title="liblab - Generate SDKs from FastAPI"><img src="https://fastapi.tiangolo.com/img/sponsors/liblab.png"></a>
<a href="https://docs.render.com/deploy-fastapi?utm_source=deploydoc&utm_medium=referral&utm_campaign=fastapi" target="_blank" title="Deploy & scale any full-stack web app on Render. Focus on building apps, not infra."><img src="https://fastapi.tiangolo.com/img/sponsors/render.svg"></a>
<a href="https://www.coderabbit.ai/?utm_source=fastapi&utm_medium=badge&utm_campaign=fastapi" target="_blank" title="Cut Code Review Time & Bugs in Half with CodeRabbit"><img src="https://fastapi.tiangolo.com/img/sponsors/coderabbit.png"></a>
<a href="https://subtotal.com/?utm_source=fastapi&utm_medium=sponsorship&utm_campaign=open-source" target="_blank" title="The Gold Standard in Retail Account Linking"><img src="https://fastapi.tiangolo.com/img/sponsors/subtotal.svg"></a>
<a href="https://docs.railway.com/guides/fastapi?utm_medium=integration&utm_source=docs&utm_campaign=fastapi" target="_blank" title="Deploy enterprise applications at startup speed"><img src="https://fastapi.tiangolo.com/img/sponsors/railway.png"></a>
<a href="https://serpapi.com/?utm_source=fastapi_website" target="_blank" title="SerpApi: Web Search API"><img src="https://fastapi.tiangolo.com/img/sponsors/serpapi.png"></a>
<a href="https://www.greptile.com/?utm_source=fastapi&utm_medium=sponsorship&utm_campaign=fastapi_sponsor_page" target="_blank" title="Greptile: The AI Code Reviewer"><img src="https://fastapi.tiangolo.com/img/sponsors/greptile.png"></a>
### Silver Sponsors
<a href="https://databento.com/?utm_source=fastapi&utm_medium=sponsor&utm_content=display" target="_blank" title="Pay as you go for market data"><img src="https://fastapi.tiangolo.com/img/sponsors/databento.svg"></a>
<a href="https://www.svix.com/" target="_blank" title="Svix - Webhooks as a service"><img src="https://fastapi.tiangolo.com/img/sponsors/svix.svg"></a>
<a href="https://www.stainlessapi.com/?utm_source=fastapi&utm_medium=referral" target="_blank" title="Stainless | Generate best-in-class SDKs"><img src="https://fastapi.tiangolo.com/img/sponsors/stainless.png"></a>
<a href="https://www.permit.io/blog/implement-authorization-in-fastapi?utm_source=github&utm_medium=referral&utm_campaign=fastapi" target="_blank" title="Fine-Grained Authorization for FastAPI"><img src="https://fastapi.tiangolo.com/img/sponsors/permit.png"></a>
<a href="https://www.interviewpal.com/?utm_source=fastapi&utm_medium=open-source&utm_campaign=dev-hiring" target="_blank" title="InterviewPal - AI Interview Coach for Engineers and Devs"><img src="https://fastapi.tiangolo.com/img/sponsors/interviewpal.png"></a>
<a href="https://dribia.com/en/" target="_blank" title="Dribia - Data Science within your reach"><img src="https://fastapi.tiangolo.com/img/sponsors/dribia.png"></a>
<a href="https://talordata.com/?campaignid=oh5dVZ3Zc3YGiAI2&utm_source=fastapi&utm_term=fastapi" target="_blank" title="TalorData SERP API - Multi-Engine Search Results Data"><img src="https://fastapi.tiangolo.com/img/sponsors/talordata.png"></a>
<!-- /sponsors -->
[Other sponsors](https://fastapi.tiangolo.com/fastapi-people/#sponsors)
## Opinions
<div class="only-github" markdown="1">
"_[...] I'm using **FastAPI** a ton these days. [...] I'm actually planning to use it for all of my team's **ML services at Microsoft**. Some of them are getting integrated into the core **Windows** product and some **Office** products._"
<div style="text-align: right; margin-right: 10%;">Kabir Khan - <strong>Microsoft</strong> <a href="https://github.com/fastapi/fastapi/pull/26"><small>(ref)</small></a></div>
---
"_We adopted the **FastAPI** library to spawn a **REST** server that can be queried to obtain **predictions**. [for Ludwig]_"
<div style="text-align: right; margin-right: 10%;">Piero Molino, Yaroslav Dudin, and Sai Sumanth Miryala - <strong>Uber</strong> <a href="https://eng.uber.com/ludwig-v0-2/"><small>(ref)</small></a></div>
---
"_**Netflix** is pleased to announce the open-source release of our **crisis management** orchestration framework: **Dispatch**! [built with **FastAPI**]_"
<div style="text-align: right; margin-right: 10%;">Kevin Glisson, Marc Vilanova, Forest Monsen - <strong>Netflix</strong> <a href="https://netflixtechblog.com/introducing-dispatch-da4b8a2a8072"><small>(ref)</small></a></div>
---
"_If anyone is looking to build a production Python API, I would highly recommend **FastAPI**. It is **beautifully designed**, **simple to use** and **highly scalable**, it has become a **key component** in our API first development strategy and is driving many automations and services such as our Virtual TAC Engineer._"
<div style="text-align: right; margin-right: 10%;">Deon Pillsbury - <strong>Cisco</strong> <a href="https://www.linkedin.com/posts/deonpillsbury_cisco-cx-python-activity-6963242628536487936-trAp/"><small>(ref)</small></a></div>
---
</div>
## FastAPI Conf
[**FastAPI Conf '26**](https://fastapiconf.com) is happening on **October 28, 2026** in **Amsterdam, NL**. All about FastAPI, right from the source. 🎤
<a class="fastapi-feature-banner" href="https://fastapiconf.com"><img src="https://fastapi.tiangolo.com/img/fastapi-conf.jpeg" alt="FastAPI Conf '26 - October 28, 2026 - Amsterdam, NL"></a>
## FastAPI mini documentary
There's a [FastAPI mini documentary](https://www.youtube.com/watch?v=mpR8ngthqiE) released at the end of 2025, you can watch it online:
<a class="fastapi-feature-banner" href="https://www.youtube.com/watch?v=mpR8ngthqiE"><img src="https://fastapi.tiangolo.com/img/fastapi-documentary.jpg" alt="FastAPI Mini Documentary"></a>
## **Typer**, the FastAPI of CLIs
<a href="https://typer.tiangolo.com"><img src="https://typer.tiangolo.com/img/logo-margin/logo-margin-vector.svg" style="width: 20%;"></a>
If you are building a <abbr title="Command Line Interface">CLI</abbr> app to be used in the terminal instead of a web API, check out [**Typer**](https://typer.tiangolo.com/).
**Typer** is FastAPI's little sibling. And it's intended to be the **FastAPI of CLIs**. ⌨️ 🚀
## Requirements
FastAPI stands on the shoulders of giants:
* [Starlette](https://www.starlette.dev/) for the web parts.
* [Pydantic](https://docs.pydantic.dev/) for the data parts.
## Installation
Create and activate a [virtual environment](https://fastapi.tiangolo.com/virtual-environments/) and then install FastAPI:
<div class="termy">
```console
$ pip install "fastapi[standard]"
---> 100%
```
</div>
**Note**: Make sure you put `"fastapi[standard]"` in quotes to ensure it works in all terminals.
## Example
### Create it
Create a file `main.py` with:
```Python
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
def read_root():
return {"Hello": "World"}
@app.get("/items/{item_id}")
def read_item(item_id: int, q: str | None = None):
return {"item_id": item_id, "q": q}
```
<details markdown="1">
<summary>Or use <code>async def</code>...</summary>
If your code uses `async` / `await`, use `async def`:
```Python hl_lines="7 12"
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
async def read_root():
return {"Hello": "World"}
@app.get("/items/{item_id}")
async def read_item(item_id: int, q: str | None = None):
return {"item_id": item_id, "q": q}
```
**Note**:
If you don't know, check the _"In a hurry?"_ section about [`async` and `await` in the docs](https://fastapi.tiangolo.com/async/#in-a-hurry).
</details>
### Run it
Run the server with:
<div class="termy">
```console
$ fastapi dev
╭────────── FastAPI CLI - Development mode ───────────╮
│ │
│ Serving at: http://127.0.0.1:8000 │
│ │
│ API docs: http://127.0.0.1:8000/docs │
│ │
│ Running in development mode, for production use: │
│ │
│ fastapi run │
│ │
╰─────────────────────────────────────────────────────╯
INFO: Will watch for changes in these directories: ['/home/user/code/awesomeapp']
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: Started reloader process [2248755] using WatchFiles
INFO: Started server process [2248757]
INFO: Waiting for application startup.
INFO: Application startup complete.
```
</div>
<details markdown="1">
<summary>About the command <code>fastapi dev</code>...</summary>
The command `fastapi dev` reads your `main.py` file automatically, detects the **FastAPI** app in it, and starts a server using [Uvicorn](https://www.uvicorn.dev).
By default, `fastapi dev` will start with auto-reload enabled for local development.
You can read more about it in the [FastAPI CLI docs](https://fastapi.tiangolo.com/fastapi-cli/).
</details>
### Check it
Open your browser at [http://127.0.0.1:8000/items/5?q=somequery](http://127.0.0.1:8000/items/5?q=somequery).
You will see the JSON response as:
```JSON
{"item_id": 5, "q": "somequery"}
```
You already created an API that:
* Receives HTTP requests in the _paths_ `/` and `/items/{item_id}`.
* Both _paths_ take `GET` <em>operations</em> (also known as HTTP _methods_).
* The _path_ `/items/{item_id}` has a _path parameter_ `item_id` that should be an `int`.
* The _path_ `/items/{item_id}` has an optional `str` _query parameter_ `q`.
### Interactive API docs
Now go to [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs).
You will see the automatic interactive API documentation (provided by [Swagger UI](https://github.com/swagger-api/swagger-ui)):

### Alternative API docs
And now, go to [http://127.0.0.1:8000/redoc](http://127.0.0.1:8000/redoc).
You will see the alternative automatic documentation (provided by [ReDoc](https://github.com/Rebilly/ReDoc)):

## Example upgrade
Now modify the file `main.py` to receive a body from a `PUT` request.
Declare the body using standard Python types, thanks to Pydantic.
```Python hl_lines="2 7-10 23-25"
from fastapi import FastAPI
from pydantic import BaseModel
app = FastAPI()
class Item(BaseModel):
name: str
price: float
is_offer: bool | None = None
@app.get("/")
def read_root():
return {"Hello": "World"}
@app.get("/items/{item_id}")
def read_item(item_id: int, q: str | None = None):
return {"item_id": item_id, "q": q}
@app.put("/items/{item_id}")
def update_item(item_id: int, item: Item):
return {"item_name": item.name, "item_id": item_id}
```
The `fastapi dev` server should reload automatically.
### Interactive API docs upgrade
Now go to [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs).
* The interactive API documentation will be automatically updated, including the new body:

* Click on the button "Try it out", it allows you to fill the parameters and directly interact with the API:

* Then click on the "Execute" button, the user interface will communicate with your API, send the parameters, get the results and show them on the screen:

### Alternative API docs upgrade
And now, go to [http://127.0.0.1:8000/redoc](http://127.0.0.1:8000/redoc).
* The alternative documentation will also reflect the new query parameter and body:

### Recap
In summary, you declare **once** the types of parameters, body, etc. as function parameters.
You do that with standard modern Python types.
You don't have to learn a new syntax, the methods or classes of a specific library, etc.
Just standard **Python**.
For example, for an `int`:
```Python
item_id: int
```
or for a more complex `Item` model:
```Python
item: Item
```
...and with that single declaration you get:
* Editor support, including:
* Completion.
* Type checks.
* Validation of data:
* Automatic and clear errors when the data is invalid.
* Validation even for deeply nested JSON objects.
* <dfn title="also known as: serialization, parsing, marshalling">Conversion</dfn> of input data: coming from the network to Python data and types. Reading from:
* JSON.
* Path parameters.
* Query parameters.
* Cookies.
* Headers.
* Forms.
* Files.
* <dfn title="also known as: serialization, parsing, marshalling">Conversion</dfn> of output data: converting from Python data and types to network data (as JSON):
* Convert Python types (`str`, `int`, `float`, `bool`, `list`, etc).
* `datetime` objects.
* `UUID` objects.
* Database models.
* ...and many more.
* Automatic interactive API documentation, including 2 alternative user interfaces:
* Swagger UI.
* ReDoc.
---
Coming back to the previous code example, **FastAPI** will:
* Validate that there is an `item_id` in the path for `GET` and `PUT` requests.
* Validate that the `item_id` is of type `int` for `GET` and `PUT` requests.
* If it is not, the client will see a useful, clear error.
* Check if there is an optional query parameter named `q` (as in `http://127.0.0.1:8000/items/foo?q=somequery`) for `GET` requests.
* As the `q` parameter is declared with `= None`, it is optional.
* Without the `None` it would be required (as is the body in the case with `PUT`).
* For `PUT` requests to `/items/{item_id}`, read the body as JSON:
* Check that it has a required attribute `name` that should be a `str`.
* Check that it has a required attribute `price` that has to be a `float`.
* Check that it has an optional attribute `is_offer`, that should be a `bool`, if present.
* All this would also work for deeply nested JSON objects.
* Convert from and to JSON automatically.
* Document everything with OpenAPI, that can be used by:
* Interactive documentation systems.
* Automatic client code generation systems, for many languages.
* Provide 2 interactive documentation web interfaces directly.
---
We just scratched the surface, but you already get the idea of how it all works.
Try changing the line with:
```Python
return {"item_name": item.name, "item_id": item_id}
```
...from:
```Python
... "item_name": item.name ...
```
...to:
```Python
... "item_price": item.price ...
```
...and see how your editor will auto-complete the attributes and know their types:

For a more complete example including more features, see the <a href="https://fastapi.tiangolo.com/tutorial/">Tutorial - User Guide</a>.
**Spoiler alert**: the tutorial - user guide includes:
* Declaration of **parameters** from other different places as: **headers**, **cookies**, **form fields** and **files**.
* How to set **validation constraints** as `maximum_length` or `regex`.
* A very powerful and easy to use **<dfn title="also known as components, resources, providers, services, injectables">Dependency Injection</dfn>** system.
* Security and authentication, including support for **OAuth2** with **JWT tokens** and **HTTP Basic** auth.
* More advanced (but equally easy) techniques for declaring **deeply nested JSON models** (thanks to Pydantic).
* **GraphQL** integration with [Strawberry](https://strawberry.rocks) and other libraries.
* Many extra features (thanks to Starlette) as:
* **WebSockets**
* extremely easy tests based on HTTPX and `pytest`
* **CORS**
* **Cookie Sessions**
* ...and more.
### Deploy your app (optional)
You can optionally deploy your FastAPI app to [FastAPI Cloud](https://fastapicloud.com), go and join the waiting list if you haven't. 🚀
If you already have a **FastAPI Cloud** account (we invited you from the waiting list 😉), you can deploy your application with one command.
<div class="termy">
```console
$ fastapi deploy
Deploying to FastAPI Cloud...
✅ Deployment successful!
🐔 Ready the chicken! Your app is ready at https://myapp.fastapicloud.dev
```
</div>
That's it! Now you can access your app at that URL. ✨
#### About FastAPI Cloud
**[FastAPI Cloud](https://fastapicloud.com)** is built by the same author and team behind **FastAPI**.
It streamlines the process of **building**, **deploying**, and **accessing** an API with minimal effort.
It brings the same **developer experience** of building apps with FastAPI to **deploying** them to the cloud. 🎉
FastAPI Cloud is the primary sponsor and funding provider for the *FastAPI and friends* open source projects. ✨
#### Deploy to other cloud providers
FastAPI is open source and based on standards. You can deploy FastAPI apps to any cloud provider you choose.
Follow your cloud provider's guides to deploy FastAPI apps with them. 🤓
## Performance
Independent TechEmpower benchmarks show **FastAPI** applications running under Uvicorn as [one of the fastest Python frameworks available](https://www.techempower.com/benchmarks/#section=test&runid=7464e520-0dc2-473d-bd34-dbdfd7e85911&hw=ph&test=query&l=zijzen-7), only below Starlette and Uvicorn themselves (used internally by FastAPI). (*)
To understand more about it, see the section [Benchmarks](https://fastapi.tiangolo.com/benchmarks/).
## Dependencies
FastAPI depends on Pydantic and Starlette.
### `standard` Dependencies
When you install FastAPI with `pip install "fastapi[standard]"` it comes with the `standard` group of optional dependencies:
Used by Pydantic:
* [`email-validator`](https://github.com/JoshData/python-email-validator) - for email validation.
Used by Starlette:
* [`httpx`](https://www.python-httpx.org) - Required if you want to use the `TestClient`.
* [`jinja2`](https://jinja.palletsprojects.com) - Required if you want to use the default template configuration.
* [`python-multipart`](https://github.com/Kludex/python-multipart) - Required if you want to support form <dfn title="converting the string that comes from an HTTP request into Python data">"parsing"</dfn>, with `request.form()`.
Used by FastAPI:
* [`uvicorn`](https://www.uvicorn.dev) - for the server that loads and serves your application. This includes `uvicorn[standard]`, which includes some dependencies (e.g. `uvloop`) needed for high performance serving.
* `fastapi-cli[standard]` - to provide the `fastapi` command.
* This includes `fastapi-cloud-cli`, which allows you to deploy your FastAPI application to [FastAPI Cloud](https://fastapicloud.com).
### Without `standard` Dependencies
If you don't want to include the `standard` optional dependencies, you can install with `pip install fastapi` instead of `pip install "fastapi[standard]"`.
### Without `fastapi-cloud-cli`
If you want to install FastAPI with the standard dependencies but without the `fastapi-cloud-cli`, you can install with `pip install "fastapi[standard-no-fastapi-cloud-cli]"`.
### Additional Optional Dependencies
There are some additional dependencies you might want to install.
Additional optional Pydantic dependencies:
* [`pydantic-settings`](https://docs.pydantic.dev/latest/usage/pydantic_settings/) - for settings management.
* [`pydantic-extra-types`](https://docs.pydantic.dev/latest/usage/types/extra_types/extra_types/) - for extra types to be used with Pydantic.
Additional optional FastAPI dependencies:
* [`orjson`](https://github.com/ijl/orjson) - Required if you want to use `ORJSONResponse`.
* [`ujson`](https://github.com/esnme/ultrajson) - Required if you want to use `UJSONResponse`.
## License
This project is licensed under the terms of the MIT license.
================================================
FILE: SECURITY.md
================================================
# Security Policy
Security is very important for FastAPI and its community. 🔒
Learn more about it below. 👇
## Versions
The latest version of FastAPI is supported.
You are encouraged to [write tests](https://fastapi.tiangolo.com/tutorial/testing/) for your application and update your FastAPI version frequently after ensuring that your tests are passing. This way you will benefit from the latest features, bug fixes, and **security fixes**.
You can learn more about [FastAPI versions and how to pin and upgrade them](https://fastapi.tiangolo.com/deployment/versions/) for your project in the docs.
## Reporting a Vulnerability
If you think you found a vulnerability, and even if you are not sure about it, please report it right away by sending an email to: security@tiangolo.com. Please try to be as explicit as possible, describing all the steps and example code to reproduce the security issue.
I (the author, [@tiangolo](https://x.com/tiangolo)) will review it thoroughly and get back to you.
## Public Discussions
Please restrain from publicly discussing a potential security vulnerability. 🙊
It's better to discuss privately and try to find a solution first, to limit the potential impact as much as possible.
---
Thanks for your help!
The FastAPI community and I thank you for that. 🙇
================================================
FILE: docs/de/docs/_llm-test.md
================================================
# LLM-Testdatei { #llm-test-file }
Dieses Dokument testet, ob das <abbr title="Large Language Model – Großes Sprachmodell">LLM</abbr>, das die Dokumentation übersetzt, den <abbr title="General Prompt – Allgemeiner Prompt">`general_prompt`</abbr> in `scripts/translate.py` und den sprachspezifischen Prompt in `docs/{language code}/llm-prompt.md` versteht. Der sprachsspezifische Prompt wird an `general_prompt` angehängt.
Hier hinzugefügte Tests werden von allen Erstellern sprachsspezifischer Prompts gesehen.
So verwenden:
* Einen sprachsspezifischen Prompt haben – `docs/{language code}/llm-prompt.md`.
* Eine frische Übersetzung dieses Dokuments in die gewünschte Zielsprache durchführen (siehe z. B. das Kommando `translate-page` der `translate.py`). Dadurch wird die Übersetzung unter `docs/{language code}/docs/_llm-test.md` erstellt.
* Prüfen Sie, ob in der Übersetzung alles in Ordnung ist.
* Verbessern Sie bei Bedarf Ihren sprachsspezifischen Prompt, den allgemeinen Prompt oder das englische Dokument.
* Beheben Sie anschließend manuell die verbleibenden Probleme in der Übersetzung, sodass es eine gute Übersetzung ist.
* Übersetzen Sie erneut, nachdem die gute Übersetzung vorliegt. Das ideale Ergebnis wäre, dass das LLM an der Übersetzung keine Änderungen mehr vornimmt. Das bedeutet, dass der allgemeine Prompt und Ihr sprachsspezifischer Prompt so gut sind, wie sie sein können (Es wird manchmal ein paar scheinbar zufällige Änderungen machen, der Grund ist, dass [LLMs keine deterministischen Algorithmen sind](https://doublespeak.chat/#/handbook#deterministic-output)).
Die Tests:
## Codeschnipsel { #code-snippets }
//// tab | Test
Dies ist ein Codeschnipsel: `foo`. Und dies ist ein weiteres Codeschnipsel: `bar`. Und noch eins: `baz quux`.
////
//// tab | Info
Der Inhalt von Codeschnipseln sollte unverändert bleiben.
Siehe Abschnitt `### Content of code snippets` im allgemeinen Prompt in `scripts/translate.py`.
////
## Anführungszeichen { #quotes }
//// tab | Test
Gestern schrieb mein Freund: „Wenn man ‚incorrectly‘ korrekt schreibt, hat man es falsch geschrieben“. Worauf ich antwortete: „Korrekt, aber ‚incorrectly‘ ist inkorrekterweise nicht ‚„incorrectly“‘“.
/// note | Hinweis
Das LLM wird dies wahrscheinlich falsch übersetzen. Interessant ist nur, ob es die korrigierte Übersetzung bei einer erneuten Übersetzung beibehält.
///
////
//// tab | Info
Der Promptdesigner kann entscheiden, ob neutrale Anführungszeichen in typografische Anführungszeichen umgewandelt werden sollen. Es ist in Ordnung, sie unverändert zu lassen.
Siehe zum Beispiel den Abschnitt `### Quotes` in `docs/de/llm-prompt.md`.
////
## Anführungszeichen in Codeschnipseln { #quotes-in-code-snippets }
//// tab | Test
`pip install "foo[bar]"`
Beispiele für Stringliterale in Codeschnipseln: `"this"`, `'that'`.
Ein schwieriges Beispiel für Stringliterale in Codeschnipseln: `f"I like {'oranges' if orange else "apples"}"`
Hardcore: `Yesterday, my friend wrote: "If you spell incorrectly correctly, you have spelled it incorrectly". To which I answered: "Correct, but 'incorrectly' is incorrectly not '"incorrectly"'"`
////
//// tab | Info
... Allerdings müssen Anführungszeichen in Codeschnipseln unverändert bleiben.
////
## Codeblöcke { #code-blocks }
//// tab | Test
Ein Bash-Codebeispiel ...
```bash
# Eine Begrüßung an das Universum ausgeben
echo "Hello universe"
```
... und ein Konsolen-Codebeispiel ...
```console
$ <font color="#4E9A06">fastapi</font> run <u style="text-decoration-style:solid">main.py</u>
<span style="background-color:#009485"><font color="#D3D7CF"> FastAPI </font></span> Starting server
Searching for package file structure
```
... und noch ein Konsolen-Codebeispiel ...
```console
// Create a directory "Code"
$ mkdir code
// In dieses Verzeichnis wechseln
$ cd code
```
... und ein Python-Codebeispiel ...
```Python
wont_work() # Das wird nicht funktionieren 😱
works(foo="bar") # Das funktioniert 🎉
```
... und das war's.
////
//// tab | Info
Code in Codeblöcken sollte nicht verändert werden, mit Ausnahme von Kommentaren.
Siehe Abschnitt `### Content of code blocks` im allgemeinen Prompt in `scripts/translate.py`.
////
## Tabs und farbige Boxen { #tabs-and-colored-boxes }
//// tab | Test
/// info | Info
Etwas Text
///
/// note | Hinweis
Etwas Text
///
/// note | Technische Details
Etwas Text
///
/// check | Testen
Etwas Text
///
/// tip | Tipp
Etwas Text
///
/// warning | Achtung
Etwas Text
///
/// danger | Gefahr
Etwas Text
///
////
//// tab | Info
Tabs und `Info`/`Note`/`Warning`/usw. Blöcke sollten die Übersetzung ihres Titels nach einem vertikalen Strich (`|`) erhalten.
Siehe die Abschnitte `### Special blocks` und `### Tab blocks` im allgemeinen Prompt in `scripts/translate.py`.
////
## Web- und interne Links { #web-and-internal-links }
//// tab | Test
Der Linktext sollte übersetzt werden, die Linkadresse sollte unverändert bleiben:
* [Link zur Überschrift oben](#code-snippets)
* [Interner Link](index.md#installation)
* [Externer Link](https://sqlmodel.tiangolo.com/)
* [Link zu einem Stil](https://fastapi.tiangolo.com/css/styles.css)
* [Link zu einem Skript](https://fastapi.tiangolo.com/js/logic.js)
* [Link zu einem Bild](https://fastapi.tiangolo.com/img/foo.jpg)
Der Linktext sollte übersetzt werden, die Linkadresse sollte auf die Übersetzung zeigen:
* [FastAPI-Link](https://fastapi.tiangolo.com/de/)
////
//// tab | Info
Links sollten übersetzt werden, aber ihre Adresse soll unverändert bleiben. Eine Ausnahme sind absolute Links zu Seiten der FastAPI-Dokumentation. In diesem Fall sollte auf die Übersetzung verlinkt werden.
Siehe Abschnitt `### Links` im allgemeinen Prompt in `scripts/translate.py`.
////
## HTML-„abbr“-Elemente { #html-abbr-elements }
//// tab | Test
Hier einige Dinge, die in HTML-„abbr“-Elemente gepackt sind (einige sind erfunden):
### Das abbr gibt eine vollständige Phrase { #the-abbr-gives-a-full-phrase }
* <abbr title="Getting Things Done – Dinge erledigt bekommen">GTD</abbr>
* <abbr title="less than – kleiner als"><code>lt</code></abbr>
* <abbr title="XML Web Token">XWT</abbr>
* <abbr title="Paralleles Server-Gateway-Interface">PSGI</abbr>
### Das abbr gibt eine vollständige Phrase und eine Erklärung { #the-abbr-gives-a-full-phrase-and-an-explanation }
* <abbr title="Mozilla Developer Network – Mozilla-Entwicklernetzwerk: Dokumentation für Entwickler, geschrieben von den Firefox-Leuten">MDN</abbr>
* <abbr title="Input/Output – Eingabe/Ausgabe: Lesen oder Schreiben auf der Festplatte, Netzwerkkommunikation.">I/O</abbr>.
////
//// tab | Info
„title“-Attribute von „abbr“-Elementen werden nach bestimmten Anweisungen übersetzt.
Übersetzungen können eigene „abbr“-Elemente hinzufügen, die das LLM nicht entfernen soll. Z. B. um englische Wörter zu erklären.
Siehe Abschnitt `### HTML abbr elements` im allgemeinen Prompt in `scripts/translate.py`.
////
## HTML „dfn“-Elemente { #html-dfn-elements }
* <dfn title="Eine Gruppe von Maschinen, die so konfiguriert sind, dass sie verbunden sind und in irgendeiner Weise zusammenarbeiten.">Cluster</dfn>
* <dfn title="Eine Methode des Machine Learning, die künstliche neuronale Netze mit zahlreichen versteckten Schichten zwischen Eingabe- und Ausgabeschicht verwendet und so eine umfassende interne Struktur entwickelt">Deep Learning</dfn>
## Überschriften { #headings }
//// tab | Test
### Eine Webapp entwickeln – ein Tutorial { #develop-a-webapp-a-tutorial }
Hallo.
### Typhinweise und -annotationen { #type-hints-and-annotations }
Hallo wieder.
### Super- und Subklassen { #super-and-subclasses }
Hallo wieder.
////
//// tab | Info
Die einzige strenge Regel für Überschriften ist, dass das LLM den Hash-Teil in geschweiften Klammern unverändert lässt, damit Links nicht kaputtgehen.
Siehe Abschnitt `### Headings` im allgemeinen Prompt in `scripts/translate.py`.
Für einige sprachsspezifische Anweisungen, siehe z. B. den Abschnitt `### Headings` in `docs/de/llm-prompt.md`.
////
## In der Dokumentation verwendete Begriffe { #terms-used-in-the-docs }
//// tab | Test
* Sie
* Ihr
* z. B.
* usw.
* `foo` vom Typ `int`
* `bar` vom Typ `str`
* `baz` vom Typ `list`
* das Tutorial – Benutzerhandbuch
* das Handbuch für fortgeschrittene Benutzer
* die SQLModel-Dokumentation
* die API-Dokumentation
* die automatische Dokumentation
* Data Science
* Deep Learning
* Machine Learning
* Dependency Injection
* HTTP Basic-Authentifizierung
* HTTP Digest
* ISO-Format
* der JSON-Schema-Standard
* das JSON-Schema
* die Schema-Definition
* Password Flow
* Mobile
* deprecatet
* designt
* ungültig
* on the fly
* Standard
* Default
* Groß-/Kleinschreibung ist relevant
* Groß-/Kleinschreibung ist nicht relevant
* die Anwendung bereitstellen
* die Seite ausliefern
* die App
* die Anwendung
* der Request
* die Response
* die Error-Response
* die Pfadoperation
* der Pfadoperation-Dekorator
* die Pfadoperation-Funktion
* der Body
* der Requestbody
* der Responsebody
* der JSON-Body
* der Formularbody
* der Dateibody
* der Funktionskörper
* der Parameter
* der Body-Parameter
* der Pfad-Parameter
* der Query-Parameter
* der Cookie-Parameter
* der Header-Parameter
* der Formular-Parameter
* der Funktionsparameter
* das Event
* das Startup-Event
* das Hochfahren des Servers
* das Shutdown-Event
* das Lifespan-Event
* der Handler
* der Eventhandler
* der Exceptionhandler
* handhaben
* das Modell
* das Pydantic-Modell
* das Datenmodell
* das Datenbankmodell
* das Formularmodell
* das Modellobjekt
* die Klasse
* die Basisklasse
* die Elternklasse
* die Subklasse
* die Kindklasse
* die Geschwisterklasse
* die Klassenmethode
* der Header
* die Header
* der Autorisierungsheader
* der `Authorization`-Header
* der Forwarded-Header
* das Dependency-Injection-System
* die Dependency
* das Dependable
* der Dependant
* I/O-lastig
* CPU-lastig
* Nebenläufigkeit
* Parallelität
* Multiprocessing
* die Umgebungsvariable
* die Umgebungsvariable
* der `PATH`
* die `PATH`-Umgebungsvariable
* die Authentifizierung
* der Authentifizierungsanbieter
* die Autorisierung
* das Anmeldeformular
* der Autorisierungsanbieter
* der Benutzer authentisiert sich
* das System authentifiziert den Benutzer
* Das CLI
* Das Kommandozeileninterface
* der Server
* der Client
* der Cloudanbieter
* der Clouddienst
* die Entwicklung
* die Entwicklungsphasen
* das Dict
* das Dictionary
* die Enumeration
* das Enum
* das Enum-Member
* der Encoder
* der Decoder
* kodieren
* dekodieren
* die Exception
* werfen
* der Ausdruck
* die Anweisung
* das Frontend
* das Backend
* die GitHub-Diskussion
* das GitHub-Issue
* die Leistung
* die Leistungsoptimierung
* der Rückgabetyp
* der Rückgabewert
* die Sicherheit
* das Sicherheitsschema
* der Task
* der Hintergrundtask
* die Taskfunktion
* das Template
* die Template-Engine
* die Typannotation
* der Typhinweis
* der Serverworker
* der Uvicorn-Worker
* der Gunicorn-Worker
* der Workerprozess
* die Workerklasse
* die Workload
* das Deployment
* deployen
* das SDK
* das Software Development Kit
* der `APIRouter`
* die `requirements.txt`
* das Bearer-Token
* der Breaking Change
* der Bug
* der Button
* das Callable
* der Code
* der Commit
* der Contextmanager
* die Coroutine
* die Datenbanksession
* die Festplatte
* die Domain
* die Engine
* das Fake-X
* die HTTP-GET-Methode
* das Item
* die Bibliothek
* der Lifespan
* der Lock
* die Middleware
* die Mobile-Anwendung
* das Modul
* das Mounten
* das Netzwerk
* das Origin
* Die Überschreibung
* die Payload
* der Prozessor
* die Property
* der Proxy
* der Pull Request
* die Query
* der RAM
* der entfernte Rechner
* der Statuscode
* der String
* der Tag
* das Webframework
* die Wildcard
* zurückgeben
* validieren
////
//// tab | Info
Dies ist eine nicht vollständige und nicht normative Liste von (meist) technischen Begriffen, die in der Dokumentation vorkommen. Sie kann dem Promptdesigner helfen herauszufinden, bei welchen Begriffen das LLM Unterstützung braucht. Zum Beispiel, wenn es eine gute Übersetzung immer wieder auf eine suboptimale Übersetzung zurücksetzt. Oder wenn es Probleme hat, einen Begriff in Ihrer Sprache zu konjugieren/deklinieren.
Siehe z. B. den Abschnitt `### List of English terms and their preferred German translations` in `docs/de/llm-prompt.md`.
////
================================================
FILE: docs/de/docs/about/index.md
================================================
# Über { #about }
Über FastAPI, sein Design, seine Inspiration und mehr. 🤓
================================================
FILE: docs/de/docs/advanced/additional-responses.md
================================================
# Zusätzliche Responses in OpenAPI { #additional-responses-in-openapi }
/// warning | Achtung
Dies ist ein eher fortgeschrittenes Thema.
Wenn Sie mit **FastAPI** beginnen, benötigen Sie dies möglicherweise nicht.
///
Sie können zusätzliche <abbr title="Response – Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Responses</abbr> mit zusätzlichen Statuscodes, Medientypen, Beschreibungen, usw. deklarieren.
Diese zusätzlichen Responses werden in das OpenAPI-Schema aufgenommen, sodass sie auch in der API-Dokumentation erscheinen.
Für diese zusätzlichen Responses müssen Sie jedoch sicherstellen, dass Sie eine `Response`, wie etwa `JSONResponse`, direkt zurückgeben, mit Ihrem Statuscode und Inhalt.
## Zusätzliche Response mit `model` { #additional-response-with-model }
Sie können Ihren *Pfadoperation-Dekoratoren* einen Parameter `responses` übergeben.
Der nimmt ein <abbr title="Dictionary – Zuordnungstabelle: In anderen Sprachen auch Hash, Map, Objekt, Assoziatives Array genannt">`dict`</abbr> entgegen, die Schlüssel sind Statuscodes für jede Response, wie etwa `200`, und die Werte sind andere `dict`s mit den Informationen für jede Response.
Jedes dieser Response-`dict`s kann einen Schlüssel `model` haben, welcher ein Pydantic-Modell enthält, genau wie `response_model`.
**FastAPI** nimmt dieses Modell, generiert dessen JSON-Schema und fügt es an der richtigen Stelle in OpenAPI ein.
Um beispielsweise eine weitere Response mit dem Statuscode `404` und einem Pydantic-Modell `Message` zu deklarieren, können Sie schreiben:
{* ../../docs_src/additional_responses/tutorial001_py310.py hl[18,22] *}
/// note | Hinweis
Beachten Sie, dass Sie die `JSONResponse` direkt zurückgeben müssen.
///
/// info | Info
Der `model`-Schlüssel ist nicht Teil von OpenAPI.
**FastAPI** nimmt das Pydantic-Modell von dort, generiert das JSON-Schema und fügt es an der richtigen Stelle ein.
Die richtige Stelle ist:
* Im Schlüssel `content`, der als Wert ein weiteres JSON-Objekt (`dict`) hat, welches Folgendes enthält:
* Ein Schlüssel mit dem Medientyp, z. B. `application/json`, der als Wert ein weiteres JSON-Objekt hat, welches Folgendes enthält:
* Ein Schlüssel `schema`, der als Wert das JSON-Schema aus dem Modell hat, hier ist die richtige Stelle.
* **FastAPI** fügt hier eine Referenz auf die globalen JSON-Schemas an einer anderen Stelle in Ihrer OpenAPI hinzu, anstatt es direkt einzubinden. Auf diese Weise können andere Anwendungen und Clients diese JSON-Schemas direkt verwenden, bessere Tools zur Codegenerierung bereitstellen, usw.
///
Die generierten Responses in der OpenAPI für diese *Pfadoperation* lauten:
```JSON hl_lines="3-12"
{
"responses": {
"404": {
"description": "Additional Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Message"
}
}
}
},
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Item"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
```
Die Schemas werden von einer anderen Stelle innerhalb des OpenAPI-Schemas referenziert:
```JSON hl_lines="4-16"
{
"components": {
"schemas": {
"Message": {
"title": "Message",
"required": [
"message"
],
"type": "object",
"properties": {
"message": {
"title": "Message",
"type": "string"
}
}
},
"Item": {
"title": "Item",
"required": [
"id",
"value"
],
"type": "object",
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"value": {
"title": "Value",
"type": "string"
}
}
},
"ValidationError": {
"title": "ValidationError",
"required": [
"loc",
"msg",
"type"
],
"type": "object",
"properties": {
"loc": {
"title": "Location",
"type": "array",
"items": {
"type": "string"
}
},
"msg": {
"title": "Message",
"type": "string"
},
"type": {
"title": "Error Type",
"type": "string"
}
}
},
"HTTPValidationError": {
"title": "HTTPValidationError",
"type": "object",
"properties": {
"detail": {
"title": "Detail",
"type": "array",
"items": {
"$ref": "#/components/schemas/ValidationError"
}
}
}
}
}
}
}
```
## Zusätzliche Medientypen für die Haupt-Response { #additional-media-types-for-the-main-response }
Sie können denselben `responses`-Parameter verwenden, um verschiedene Medientypen für dieselbe Haupt-Response hinzuzufügen.
Sie können beispielsweise einen zusätzlichen Medientyp `image/png` hinzufügen und damit deklarieren, dass Ihre *Pfadoperation* ein JSON-Objekt (mit dem Medientyp `application/json`) oder ein PNG-Bild zurückgeben kann:
{* ../../docs_src/additional_responses/tutorial002_py310.py hl[17:22,26] *}
/// note | Hinweis
Beachten Sie, dass Sie das Bild direkt mit einer `FileResponse` zurückgeben müssen.
///
/// info | Info
Sofern Sie in Ihrem Parameter `responses` nicht explizit einen anderen Medientyp angeben, geht FastAPI davon aus, dass die Response denselben Medientyp wie die Haupt-Response-Klasse hat (Standardmäßig `application/json`).
Wenn Sie jedoch eine benutzerdefinierte Response-Klasse mit `None` als Medientyp angegeben haben, verwendet FastAPI `application/json` für jede zusätzliche Response, die über ein zugehöriges Modell verfügt.
///
## Informationen kombinieren { #combining-information }
Sie können auch Response-Informationen von mehreren Stellen kombinieren, einschließlich der Parameter `response_model`, `status_code` und `responses`.
Sie können ein `response_model` deklarieren, indem Sie den Standardstatuscode `200` (oder bei Bedarf einen benutzerdefinierten) verwenden und dann zusätzliche Informationen für dieselbe Response in `responses` direkt im OpenAPI-Schema deklarieren.
**FastAPI** behält die zusätzlichen Informationen aus `responses` und kombiniert sie mit dem JSON-Schema aus Ihrem Modell.
Sie können beispielsweise eine Response mit dem Statuscode `404` deklarieren, die ein Pydantic-Modell verwendet und über eine benutzerdefinierte Beschreibung (`description`) verfügt.
Und eine Response mit dem Statuscode `200`, die Ihr `response_model` verwendet, aber ein benutzerdefiniertes Beispiel (`example`) enthält:
{* ../../docs_src/additional_responses/tutorial003_py310.py hl[20:31] *}
Es wird alles kombiniert und in Ihre OpenAPI eingebunden und in der API-Dokumentation angezeigt:
<img src="/img/tutorial/additional-responses/image01.png">
## Vordefinierte und benutzerdefinierte Responses kombinieren { #combine-predefined-responses-and-custom-ones }
Möglicherweise möchten Sie einige vordefinierte Responses haben, die für viele *Pfadoperationen* gelten, Sie möchten diese jedoch mit benutzerdefinierten Responses kombinieren, die für jede *Pfadoperation* erforderlich sind.
In diesen Fällen können Sie die Python-Technik zum „Entpacken“ eines `dict`s mit `**dict_to_unpack` verwenden:
```Python
old_dict = {
"old key": "old value",
"second old key": "second old value",
}
new_dict = {**old_dict, "new key": "new value"}
```
Hier wird `new_dict` alle Schlüssel-Wert-Paare von `old_dict` plus das neue Schlüssel-Wert-Paar enthalten:
```Python
{
"old key": "old value",
"second old key": "second old value",
"new key": "new value",
}
```
Mit dieser Technik können Sie einige vordefinierte Responses in Ihren *Pfadoperationen* wiederverwenden und sie mit zusätzlichen benutzerdefinierten Responses kombinieren.
Zum Beispiel:
{* ../../docs_src/additional_responses/tutorial004_py310.py hl[11:15,24] *}
## Weitere Informationen zu OpenAPI-Responses { #more-information-about-openapi-responses }
Um zu sehen, was genau Sie in die Responses aufnehmen können, können Sie die folgenden Abschnitte in der OpenAPI-Spezifikation überprüfen:
* [OpenAPI Responses Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#responses-object), enthält das `Response Object`.
* [OpenAPI Response Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#response-object), Sie können alles davon direkt in jede Response innerhalb Ihres `responses`-Parameter einfügen. Einschließlich `description`, `headers`, `content` (darin deklarieren Sie verschiedene Medientypen und JSON-Schemas) und `links`.
================================================
FILE: docs/de/docs/advanced/additional-status-codes.md
================================================
# Zusätzliche Statuscodes { #additional-status-codes }
Standardmäßig liefert **FastAPI** die <abbr title="Response – Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Responses</abbr> als `JSONResponse` zurück und fügt den Inhalt, den Sie aus Ihrer *Pfadoperation* zurückgeben, in diese `JSONResponse` ein.
Es wird der Default-Statuscode oder derjenige verwendet, den Sie in Ihrer *Pfadoperation* festgelegt haben.
## Zusätzliche Statuscodes { #additional-status-codes_1 }
Wenn Sie neben dem Hauptstatuscode weitere Statuscodes zurückgeben möchten, können Sie dies tun, indem Sie direkt eine `Response` zurückgeben, wie etwa eine `JSONResponse`, und den zusätzlichen Statuscode direkt festlegen.
Angenommen, Sie möchten eine *Pfadoperation* haben, die das Aktualisieren von Artikeln ermöglicht und bei Erfolg den HTTP-Statuscode 200 „OK“ zurückgibt.
Sie möchten aber auch, dass sie neue Artikel akzeptiert. Und wenn die Artikel vorher nicht vorhanden waren, werden diese Artikel erstellt und der HTTP-Statuscode 201 „Created“ zurückgegeben.
Um dies zu erreichen, importieren Sie `JSONResponse`, und geben Sie Ihren Inhalt direkt zurück, indem Sie den gewünschten `status_code` setzen:
{* ../../docs_src/additional_status_codes/tutorial001_an_py310.py hl[4,25] *}
/// warning | Achtung
Wenn Sie eine `Response` direkt zurückgeben, wie im obigen Beispiel, wird sie direkt zurückgegeben.
Sie wird nicht mit einem Modell usw. serialisiert.
Stellen Sie sicher, dass sie die gewünschten Daten enthält und dass die Werte gültiges JSON sind (wenn Sie `JSONResponse` verwenden).
///
/// note | Technische Details
Sie können auch `from starlette.responses import JSONResponse` verwenden.
**FastAPI** bietet dieselben `starlette.responses` auch via `fastapi.responses` an, als Annehmlichkeit für Sie, den Entwickler. Die meisten verfügbaren Responses kommen aber direkt von Starlette. Dasselbe gilt für `status`.
///
## OpenAPI- und API-Dokumentation { #openapi-and-api-docs }
Wenn Sie zusätzliche Statuscodes und Responses direkt zurückgeben, werden diese nicht in das OpenAPI-Schema (die API-Dokumentation) aufgenommen, da FastAPI keine Möglichkeit hat, im Voraus zu wissen, was Sie zurückgeben werden.
Sie können das jedoch in Ihrem Code dokumentieren, indem Sie Folgendes verwenden: [Zusätzliche Responses](additional-responses.md).
================================================
FILE: docs/de/docs/advanced/advanced-dependencies.md
================================================
# Fortgeschrittene Abhängigkeiten { #advanced-dependencies }
## Parametrisierte Abhängigkeiten { #parameterized-dependencies }
Alle Abhängigkeiten, die wir bisher gesehen haben, waren festgelegte Funktionen oder Klassen.
Es kann jedoch Fälle geben, in denen Sie Parameter für eine Abhängigkeit festlegen möchten, ohne viele verschiedene Funktionen oder Klassen zu deklarieren.
Stellen wir uns vor, wir möchten eine Abhängigkeit haben, die prüft, ob ein Query-Parameter `q` einen vordefinierten Inhalt hat.
Aber wir wollen diesen vordefinierten Inhalt per Parameter festlegen können.
## Eine „aufrufbare“ Instanz { #a-callable-instance }
In Python gibt es eine Möglichkeit, eine Instanz einer Klasse <abbr title="Englisch „callable“">„aufrufbar“</abbr> zu machen.
Nicht die Klasse selbst (die bereits aufrufbar ist), sondern eine Instanz dieser Klasse.
Dazu deklarieren wir eine Methode `__call__`:
{* ../../docs_src/dependencies/tutorial011_an_py310.py hl[12] *}
In diesem Fall ist dieses `__call__` das, was **FastAPI** verwendet, um nach zusätzlichen Parametern und Unterabhängigkeiten zu suchen, und das ist es auch, was später aufgerufen wird, um einen Wert an den Parameter in Ihrer *Pfadoperation-Funktion* zu übergeben.
## Die Instanz parametrisieren { #parameterize-the-instance }
Und jetzt können wir `__init__` verwenden, um die Parameter der Instanz zu deklarieren, die wir zum „Parametrisieren“ der Abhängigkeit verwenden können:
{* ../../docs_src/dependencies/tutorial011_an_py310.py hl[9] *}
In diesem Fall wird **FastAPI** `__init__` nie berühren oder sich darum kümmern, wir werden es direkt in unserem Code verwenden.
## Eine Instanz erstellen { #create-an-instance }
Wir könnten eine Instanz dieser Klasse erstellen mit:
{* ../../docs_src/dependencies/tutorial011_an_py310.py hl[18] *}
Und auf diese Weise können wir unsere Abhängigkeit „parametrisieren“, die jetzt `"bar"` enthält, als das Attribut `checker.fixed_content`.
## Die Instanz als Abhängigkeit verwenden { #use-the-instance-as-a-dependency }
Dann könnten wir diesen `checker` in einem `Depends(checker)` anstelle von `Depends(FixedContentQueryChecker)` verwenden, da die Abhängigkeit die Instanz `checker` und nicht die Klasse selbst ist.
Und beim Auflösen der Abhängigkeit ruft **FastAPI** diesen `checker` wie folgt auf:
```Python
checker(q="somequery")
```
... und übergibt, was immer das als Wert dieser Abhängigkeit in unserer *Pfadoperation-Funktion* zurückgibt, als den Parameter `fixed_content_included`:
{* ../../docs_src/dependencies/tutorial011_an_py310.py hl[22] *}
/// tip | Tipp
Das alles mag gekünstelt wirken. Und es ist möglicherweise noch nicht ganz klar, welchen Nutzen das hat.
Diese Beispiele sind bewusst einfach gehalten, zeigen aber, wie alles funktioniert.
In den Kapiteln zum Thema Sicherheit gibt es Hilfsfunktionen, die auf die gleiche Weise implementiert werden.
Wenn Sie das hier alles verstanden haben, wissen Sie bereits, wie diese Sicherheits-Hilfswerkzeuge unter der Haube funktionieren.
///
## Abhängigkeiten mit `yield`, `HTTPException`, `except` und Hintergrundtasks { #dependencies-with-yield-httpexception-except-and-background-tasks }
/// warning | Achtung
Sie benötigen diese technischen Details höchstwahrscheinlich nicht.
Diese Details sind hauptsächlich nützlich, wenn Sie eine FastAPI-Anwendung haben, die älter als 0.121.0 ist, und Sie auf Probleme mit Abhängigkeiten mit `yield` stoßen.
///
Abhängigkeiten mit `yield` haben sich im Laufe der Zeit weiterentwickelt, um verschiedene Anwendungsfälle abzudecken und einige Probleme zu beheben, hier ist eine Zusammenfassung der Änderungen.
### Abhängigkeiten mit `yield` und `scope` { #dependencies-with-yield-and-scope }
In Version 0.121.0 hat FastAPI Unterstützung für `Depends(scope="function")` für Abhängigkeiten mit `yield` hinzugefügt.
Mit `Depends(scope="function")` wird der Exit-Code nach `yield` direkt nach dem Ende der *Pfadoperation-Funktion* ausgeführt, bevor die Response an den Client gesendet wird.
Und bei Verwendung von `Depends(scope="request")` (dem Default) wird der Exit-Code nach `yield` ausgeführt, nachdem die Response gesendet wurde.
Mehr dazu finden Sie in der Dokumentation zu [Abhängigkeiten mit `yield` – Frühes Beenden und `scope`](../tutorial/dependencies/dependencies-with-yield.md#early-exit-and-scope).
### Abhängigkeiten mit `yield` und `StreamingResponse`, Technische Details { #dependencies-with-yield-and-streamingresponse-technical-details }
Vor FastAPI 0.118.0 wurde bei Verwendung einer Abhängigkeit mit `yield` der Exit-Code nach der *Pfadoperation-Funktion* ausgeführt, aber unmittelbar bevor die Response gesendet wurde.
Die Absicht war, Ressourcen nicht länger als nötig zu halten, während darauf gewartet wird, dass die Response durchs Netzwerk reist.
Diese Änderung bedeutete auch, dass bei Rückgabe einer `StreamingResponse` der Exit-Code der Abhängigkeit mit `yield` bereits ausgeführt worden wäre.
Wenn Sie beispielsweise eine Datenbanksession in einer Abhängigkeit mit `yield` hatten, konnte die `StreamingResponse` diese Session während des Streamens von Daten nicht verwenden, weil die Session im Exit-Code nach `yield` bereits geschlossen worden wäre.
Dieses Verhalten wurde in 0.118.0 zurückgenommen, sodass der Exit-Code nach `yield` ausgeführt wird, nachdem die Response gesendet wurde.
/// info | Info
Wie Sie unten sehen werden, ähnelt dies sehr dem Verhalten vor Version 0.106.0, jedoch mit mehreren Verbesserungen und Bugfixes für Sonderfälle.
///
#### Anwendungsfälle mit frühem Exit-Code { #use-cases-with-early-exit-code }
Es gibt einige Anwendungsfälle mit spezifischen Bedingungen, die vom alten Verhalten profitieren könnten, den Exit-Code von Abhängigkeiten mit `yield` vor dem Senden der Response auszuführen.
Stellen Sie sich zum Beispiel vor, Sie haben Code, der in einer Abhängigkeit mit `yield` eine Datenbanksession verwendet, nur um einen Benutzer zu verifizieren, die Datenbanksession wird aber in der *Pfadoperation-Funktion* nie wieder verwendet, sondern nur in der Abhängigkeit, und die Response benötigt lange, um gesendet zu werden, wie eine `StreamingResponse`, die Daten langsam sendet, aus irgendeinem Grund aber die Datenbank nicht verwendet.
In diesem Fall würde die Datenbanksession gehalten, bis das Senden der Response abgeschlossen ist, aber wenn Sie sie nicht verwenden, wäre es nicht notwendig, sie zu halten.
So könnte es aussehen:
{* ../../docs_src/dependencies/tutorial013_an_py310.py *}
Der Exit-Code, das automatische Schließen der `Session` in:
{* ../../docs_src/dependencies/tutorial013_an_py310.py ln[19:21] *}
... würde ausgeführt, nachdem die Response das langsame Senden der Daten beendet:
{* ../../docs_src/dependencies/tutorial013_an_py310.py ln[30:38] hl[31:33] *}
Da `generate_stream()` die Datenbanksession jedoch nicht verwendet, ist es nicht wirklich notwendig, die Session während des Sendens der Response offen zu halten.
Wenn Sie diesen spezifischen Anwendungsfall mit SQLModel (oder SQLAlchemy) haben, könnten Sie die Session explizit schließen, nachdem Sie sie nicht mehr benötigen:
{* ../../docs_src/dependencies/tutorial014_an_py310.py ln[24:28] hl[28] *}
Auf diese Weise würde die Session die Datenbankverbindung freigeben, sodass andere Requests sie verwenden könnten.
Wenn Sie einen anderen Anwendungsfall haben, der ein frühes Beenden aus einer Abhängigkeit mit `yield` benötigt, erstellen Sie bitte eine [GitHub-Diskussion-Frage](https://github.com/fastapi/fastapi/discussions/new?category=questions) mit Ihrem spezifischen Anwendungsfall und warum Sie von einem frühen Schließen für Abhängigkeiten mit `yield` profitieren würden.
Wenn es überzeugende Anwendungsfälle für ein frühes Schließen bei Abhängigkeiten mit `yield` gibt, würde ich erwägen, eine neue Möglichkeit hinzuzufügen, um ein frühes Schließen optional zu aktivieren.
### Abhängigkeiten mit `yield` und `except`, Technische Details { #dependencies-with-yield-and-except-technical-details }
Vor FastAPI 0.110.0 war es so, dass wenn Sie eine Abhängigkeit mit `yield` verwendet und dann in dieser Abhängigkeit mit `except` eine Exception abgefangen haben und die Exception nicht erneut geworfen haben, die Exception automatisch an beliebige Exceptionhandler oder den Handler für interne Serverfehler weitergereicht/weitergeworfen wurde.
Dies wurde in Version 0.110.0 geändert, um unbehandelten Speicherverbrauch durch weitergeleitete Exceptions ohne Handler (interne Serverfehler) zu beheben und um es mit dem Verhalten von normalem Python-Code konsistent zu machen.
### Hintergrundtasks und Abhängigkeiten mit `yield`, Technische Details { #background-tasks-and-dependencies-with-yield-technical-details }
Vor FastAPI 0.106.0 war das Werfen von Exceptions nach `yield` nicht möglich, der Exit-Code in Abhängigkeiten mit `yield` wurde ausgeführt, nachdem die Response gesendet wurde, sodass [Exceptionhandler](../tutorial/handling-errors.md#install-custom-exception-handlers) bereits ausgeführt worden wären.
Dies war so designt, hauptsächlich um die Verwendung derselben von Abhängigkeiten „geyieldeten“ Objekte in Hintergrundtasks zu ermöglichen, da der Exit-Code erst ausgeführt wurde, nachdem die Hintergrundtasks abgeschlossen waren.
Dies wurde in FastAPI 0.106.0 geändert mit der Absicht, keine Ressourcen zu halten, während darauf gewartet wird, dass die Response durchs Netzwerk reist.
/// tip | Tipp
Zusätzlich ist ein Hintergrundtask normalerweise ein unabhängiger Logikblock, der separat gehandhabt werden sollte, mit eigenen Ressourcen (z. B. eigener Datenbankverbindung).
So haben Sie wahrscheinlich saubereren Code.
///
Wenn Sie sich bisher auf dieses Verhalten verlassen haben, sollten Sie jetzt die Ressourcen für Hintergrundtasks innerhalb des Hintergrundtasks selbst erstellen und intern nur Daten verwenden, die nicht von den Ressourcen von Abhängigkeiten mit `yield` abhängen.
Anstatt beispielsweise dieselbe Datenbanksession zu verwenden, würden Sie innerhalb des Hintergrundtasks eine neue Datenbanksession erstellen und die Objekte aus der Datenbank mithilfe dieser neuen Session beziehen. Und anstatt das Objekt aus der Datenbank als Parameter an die Hintergrundtask-Funktion zu übergeben, würden Sie die ID dieses Objekts übergeben und das Objekt dann innerhalb der Hintergrundtask-Funktion erneut beziehen.
================================================
FILE: docs/de/docs/advanced/advanced-python-types.md
================================================
# Fortgeschrittene Python-Typen { #advanced-python-types }
Hier sind einige zusätzliche Ideen, die beim Arbeiten mit Python-Typen nützlich sein könnten.
## `Union` oder `Optional` verwenden { #using-union-or-optional }
Wenn Ihr Code aus irgendeinem Grund nicht `|` verwenden kann, z. B. wenn es nicht in einer Typannotation ist, sondern in etwas wie `response_model=`, können Sie anstelle des senkrechten Strichs (`|`) `Union` aus `typing` verwenden.
Zum Beispiel könnten Sie deklarieren, dass etwas ein `str` oder `None` sein könnte:
```python
from typing import Union
def say_hi(name: Union[str, None]):
print(f"Hi {name}!")
```
`typing` hat außerdem eine Abkürzung, um zu deklarieren, dass etwas `None` sein könnte, mit `Optional`.
Hier ist ein Tipp aus meiner sehr **subjektiven** Perspektive:
* 🚨 Vermeiden Sie die Verwendung von `Optional[SomeType]`
* Verwenden Sie stattdessen ✨ **`Union[SomeType, None]`** ✨.
Beides ist äquivalent und unter der Haube identisch, aber ich würde `Union` statt `Optional` empfehlen, weil das Wort „**optional**“ implizieren könnte, dass der Wert optional ist; tatsächlich bedeutet es jedoch „es kann `None` sein“, selbst wenn es nicht optional ist und weiterhin erforderlich bleibt.
Ich finde, `Union[SomeType, None]` ist expliziter in dem, was es bedeutet.
Es geht nur um Wörter und Namen. Aber diese Wörter können beeinflussen, wie Sie und Ihr Team über den Code denken.
Als Beispiel nehmen wir diese Funktion:
```python
from typing import Optional
def say_hi(name: Optional[str]):
print(f"Hey {name}!")
```
Der Parameter `name` ist als `Optional[str]` definiert, aber er ist **nicht optional**, Sie können die Funktion nicht ohne den Parameter aufrufen:
```Python
say_hi() # Oh nein, das löst einen Fehler aus! 😱
```
Der Parameter `name` ist **weiterhin erforderlich** (nicht *optional*), weil er keinen Defaultwert hat. Dennoch akzeptiert `name` den Wert `None`:
```Python
say_hi(name=None) # Das funktioniert, None ist gültig 🎉
```
Die gute Nachricht ist: In den meisten Fällen können Sie einfach `|` verwenden, um Unions von Typen zu definieren:
```python
def say_hi(name: str | None):
print(f"Hey {name}!")
```
Sie müssen sich also normalerweise keine Gedanken über Namen wie `Optional` und `Union` machen. 😎
================================================
FILE: docs/de/docs/advanced/async-tests.md
================================================
# Asynchrone Tests { #async-tests }
Sie haben bereits gesehen, wie Sie Ihre **FastAPI**-Anwendungen mit dem bereitgestellten `TestClient` testen. Bisher haben Sie nur gesehen, wie man synchrone Tests schreibt, ohne `async`-Funktionen zu verwenden.
Die Möglichkeit, in Ihren Tests asynchrone Funktionen zu verwenden, könnte beispielsweise nützlich sein, wenn Sie Ihre Datenbank asynchron abfragen. Stellen Sie sich vor, Sie möchten das Senden von <abbr title="Request – Anfrage: Daten, die der Client zum Server sendet">Requests</abbr> an Ihre FastAPI-Anwendung testen und dann überprüfen, ob Ihr Backend die richtigen Daten erfolgreich in die Datenbank geschrieben hat, während Sie eine asynchrone Datenbankbibliothek verwenden.
Schauen wir uns an, wie wir das machen können.
## pytest.mark.anyio { #pytest-mark-anyio }
Wenn wir in unseren Tests asynchrone Funktionen aufrufen möchten, müssen unsere Testfunktionen asynchron sein. AnyIO stellt hierfür ein nettes Plugin zur Verfügung, mit dem wir festlegen können, dass einige Testfunktionen asynchron aufgerufen werden sollen.
## HTTPX { #httpx }
Auch wenn Ihre **FastAPI**-Anwendung normale `def`-Funktionen anstelle von `async def` verwendet, handelt es sich darunter immer noch um eine `async`-Anwendung.
Der `TestClient` betreibt unter der Haube etwas Magie, um die asynchrone FastAPI-Anwendung in Ihren normalen `def`-Testfunktionen, mithilfe von Standard-Pytest aufzurufen. Aber diese Magie funktioniert nicht mehr, wenn wir sie in asynchronen Funktionen verwenden. Durch die asynchrone Ausführung unserer Tests können wir den `TestClient` nicht mehr in unseren Testfunktionen verwenden.
Der `TestClient` basiert auf [HTTPX](https://www.python-httpx.org) und glücklicherweise können wir es direkt verwenden, um die API zu testen.
## Beispiel { #example }
Betrachten wir als einfaches Beispiel eine Dateistruktur ähnlich der in [Größere Anwendungen](../tutorial/bigger-applications.md) und [Testen](../tutorial/testing.md):
```
.
├── app
│ ├── __init__.py
│ ├── main.py
│ └── test_main.py
```
Die Datei `main.py` hätte als Inhalt:
{* ../../docs_src/async_tests/app_a_py310/main.py *}
Die Datei `test_main.py` hätte die Tests für `main.py`, das könnte jetzt so aussehen:
{* ../../docs_src/async_tests/app_a_py310/test_main.py *}
## Es ausführen { #run-it }
Sie können Ihre Tests wie gewohnt ausführen mit:
<div class="termy">
```console
$ pytest
---> 100%
```
</div>
## Im Detail { #in-detail }
Der Marker `@pytest.mark.anyio` teilt pytest mit, dass diese Testfunktion asynchron aufgerufen werden soll:
{* ../../docs_src/async_tests/app_a_py310/test_main.py hl[7] *}
/// tip | Tipp
Beachten Sie, dass die Testfunktion jetzt `async def` ist und nicht nur `def` wie zuvor, wenn Sie den `TestClient` verwenden.
///
Dann können wir einen `AsyncClient` mit der App erstellen und mit `await` asynchrone Requests an ihn senden.
{* ../../docs_src/async_tests/app_a_py310/test_main.py hl[9:12] *}
Das ist das Äquivalent zu:
```Python
response = client.get('/')
```
... welches wir verwendet haben, um unsere Requests mit dem `TestClient` zu machen.
/// tip | Tipp
Beachten Sie, dass wir async/await mit dem neuen `AsyncClient` verwenden – der Request ist asynchron.
///
/// warning | Achtung
Falls Ihre Anwendung auf Lifespan-Events angewiesen ist, der `AsyncClient` löst diese Events nicht aus. Um sicherzustellen, dass sie ausgelöst werden, verwenden Sie `LifespanManager` von [florimondmanca/asgi-lifespan](https://github.com/florimondmanca/asgi-lifespan#usage).
///
## Andere asynchrone Funktionsaufrufe { #other-asynchronous-function-calls }
Da die Testfunktion jetzt asynchron ist, können Sie in Ihren Tests neben dem Senden von Requests an Ihre FastAPI-Anwendung jetzt auch andere `async`-Funktionen aufrufen (und `await`en), genau so, wie Sie diese an anderer Stelle in Ihrem Code aufrufen würden.
/// tip | Tipp
Wenn Sie einen `RuntimeError: Task attached to a different loop` erhalten, wenn Sie asynchrone Funktionsaufrufe in Ihre Tests integrieren (z. B. bei Verwendung von [MongoDBs MotorClient](https://stackoverflow.com/questions/41584243/runtimeerror-task-attached-to-a-different-loop)), dann denken Sie daran, Objekte zu instanziieren, die einen Event Loop nur innerhalb asynchroner Funktionen benötigen, z. B. einen `@app.on_event("startup")`-Callback.
///
================================================
FILE: docs/de/docs/advanced/behind-a-proxy.md
================================================
# Hinter einem Proxy { #behind-a-proxy }
In vielen Situationen würden Sie einen **Proxy** wie Traefik oder Nginx vor Ihrer FastAPI-App verwenden.
Diese Proxys könnten HTTPS-Zertifikate und andere Dinge handhaben.
## Proxy-<abbr title="weitergeleitete Header">Forwarded-Header</abbr> { #proxy-forwarded-headers }
Ein **Proxy** vor Ihrer Anwendung würde normalerweise einige Header on-the-fly setzen, bevor er die Requests an den **Server** sendet, um den Server wissen zu lassen, dass der Request vom Proxy **weitergeleitet** wurde, einschließlich der ursprünglichen (öffentlichen) URL, inklusive der Domain, dass HTTPS verwendet wird, usw.
Das **Server**-Programm (z. B. **Uvicorn** via **FastAPI CLI**) ist in der Lage, diese Header zu interpretieren und diese Information dann an Ihre Anwendung weiterzugeben.
Aber aus Sicherheitsgründen, da der Server nicht weiß, dass er hinter einem vertrauenswürdigen Proxy läuft, wird er diese Header nicht interpretieren.
/// note | Technische Details
Die Proxy-Header sind:
* [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Forwarded-For)
* [X-Forwarded-Proto](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Forwarded-Proto)
* [X-Forwarded-Host](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Forwarded-Host)
///
### Proxy-Forwarded-Header aktivieren { #enable-proxy-forwarded-headers }
Sie können FastAPI CLI mit der *CLI-Option* `--forwarded-allow-ips` starten und die IP-Adressen übergeben, denen vertraut werden soll, um diese Forwarded-Header zu lesen.
Wenn Sie es auf `--forwarded-allow-ips="*"` setzen, würde es allen eingehenden IPs vertrauen.
Wenn Ihr **Server** hinter einem vertrauenswürdigen **Proxy** sitzt und nur der Proxy mit ihm spricht, würde dies dazu führen, dass er die IP dieses **Proxys** akzeptiert, was auch immer sie ist.
<div class="termy">
```console
$ fastapi run --forwarded-allow-ips="*"
<span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
```
</div>
### Weiterleitungen mit HTTPS { #redirects-with-https }
Angenommen, Sie definieren eine *Pfadoperation* `/items/`:
{* ../../docs_src/behind_a_proxy/tutorial001_01_py310.py hl[6] *}
Wenn der Client versucht, zu `/items` zu gehen, würde er standardmäßig zu `/items/` umgeleitet.
Aber bevor Sie die *CLI-Option* `--forwarded-allow-ips` setzen, könnte er zu `http://localhost:8000/items/` umleiten.
Aber möglicherweise wird Ihre Anwendung unter `https://mysuperapp.com` gehostet, und die Weiterleitung sollte zu `https://mysuperapp.com/items/` erfolgen.
Durch Setzen von `--proxy-headers` kann FastAPI jetzt an den richtigen Ort umleiten. 😎
```
https://mysuperapp.com/items/
```
/// tip | Tipp
Wenn Sie mehr über HTTPS erfahren möchten, lesen Sie den Leitfaden [Über HTTPS](../deployment/https.md).
///
### Wie Proxy-Forwarded-Header funktionieren { #how-proxy-forwarded-headers-work }
Hier ist eine visuelle Darstellung, wie der **Proxy** weitergeleitete Header zwischen dem Client und dem **Anwendungsserver** hinzufügt:
```mermaid
sequenceDiagram
participant Client
participant Proxy as Proxy/Loadbalancer
participant Server as FastAPI Server
Client->>Proxy: HTTPS-Request<br/>Host: mysuperapp.com<br/>Pfad: /items
Note over Proxy: Proxy fügt Forwarded-Header hinzu
Proxy->>Server: HTTP-Request<br/>X-Forwarded-For: [client IP]<br/>X-Forwarded-Proto: https<br/>X-Forwarded-Host: mysuperapp.com<br/>Pfad: /items
Note over Server: Server interpretiert die Header<br/>(wenn --forwarded-allow-ips gesetzt ist)
Server->>Proxy: HTTP-Response<br/>mit correkten HTTPS-URLs
Proxy->>Client: HTTPS-Response
```
Der **Proxy** fängt den ursprünglichen Client-Request ab und fügt die speziellen *Forwarded*-Header (`X-Forwarded-*`) hinzu, bevor er den Request an den **Anwendungsserver** weitergibt.
Diese Header bewahren Informationen über den ursprünglichen Request, die sonst verloren gingen:
* **X-Forwarded-For**: Die ursprüngliche IP-Adresse des Clients
* **X-Forwarded-Proto**: Das ursprüngliche Protokoll (`https`)
* **X-Forwarded-Host**: Der ursprüngliche Host (`mysuperapp.com`)
Wenn **FastAPI CLI** mit `--forwarded-allow-ips` konfiguriert ist, vertraut es diesen Headern und verwendet sie, z. B. um die korrekten URLs in Weiterleitungen zu erzeugen.
## Proxy mit einem abgetrennten Pfadpräfix { #proxy-with-a-stripped-path-prefix }
Sie könnten einen Proxy haben, der Ihrer Anwendung ein Pfadpräfix hinzufügt.
In diesen Fällen können Sie <abbr title="Wurzelpfad">`root_path`</abbr> verwenden, um Ihre Anwendung zu konfigurieren.
Der `root_path` ist ein Mechanismus, der von der ASGI-Spezifikation bereitgestellt wird (auf der FastAPI via Starlette aufbaut).
Der `root_path` wird verwendet, um diese speziellen Fälle zu handhaben.
Und er wird auch intern beim Mounten von Unteranwendungen verwendet.
Ein Proxy mit einem abgetrennten Pfadpräfix bedeutet in diesem Fall, dass Sie einen Pfad unter `/app` in Ihrem Code deklarieren könnten, dann aber, eine Ebene darüber, den Proxy hinzufügen, der Ihre **FastAPI**-Anwendung unter einem Pfad wie `/api/v1` platziert.
In diesem Fall würde der ursprüngliche Pfad `/app` tatsächlich unter `/api/v1/app` bereitgestellt.
Auch wenn Ihr gesamter Code unter der Annahme geschrieben ist, dass es nur `/app` gibt.
{* ../../docs_src/behind_a_proxy/tutorial001_py310.py hl[6] *}
Und der Proxy würde das **Pfadpräfix** on-the-fly **„entfernen“**, bevor er den <abbr title="Request – Anfrage: Daten, die der Client zum Server sendet">Request</abbr> an den Anwendungsserver (wahrscheinlich Uvicorn via FastAPI CLI) übermittelt, dafür sorgend, dass Ihre Anwendung davon überzeugt ist, dass sie unter `/app` bereitgestellt wird, sodass Sie nicht Ihren gesamten Code dahingehend aktualisieren müssen, das Präfix `/api/v1` zu verwenden.
Bis hierher würde alles wie gewohnt funktionieren.
Wenn Sie dann jedoch die Benutzeroberfläche der integrierten Dokumentation (das Frontend) öffnen, wird angenommen, dass sich das OpenAPI-Schema unter `/openapi.json` anstelle von `/api/v1/openapi.json` befindet.
Also würde das Frontend (das im Browser läuft) versuchen, `/openapi.json` zu erreichen und wäre nicht in der Lage, das OpenAPI-Schema abzurufen.
Da wir für unsere Anwendung einen Proxy mit dem Pfadpräfix `/api/v1` haben, muss das Frontend das OpenAPI-Schema unter `/api/v1/openapi.json` abrufen.
```mermaid
graph LR
browser("Browser")
proxy["Proxy auf http://0.0.0.0:9999/api/v1/app"]
server["Server auf http://127.0.0.1:8000/app"]
browser --> proxy
proxy --> server
```
/// tip | Tipp
Die IP `0.0.0.0` wird üblicherweise verwendet, um anzudeuten, dass das Programm alle auf diesem Computer/Server verfügbaren IPs abhört.
///
Die Benutzeroberfläche der Dokumentation würde benötigen, dass das OpenAPI-Schema deklariert, dass sich dieser API-`server` unter `/api/v1` (hinter dem Proxy) befindet. Zum Beispiel:
```JSON hl_lines="4-8"
{
"openapi": "3.1.0",
// Hier mehr Einstellungen
"servers": [
{
"url": "/api/v1"
}
],
"paths": {
// Hier mehr Einstellungen
}
}
```
In diesem Beispiel könnte der „Proxy“ etwa **Traefik** sein. Und der Server wäre etwas wie FastAPI CLI mit **Uvicorn**, auf dem Ihre FastAPI-Anwendung ausgeführt wird.
### Bereitstellung des `root_path` { #providing-the-root-path }
Um dies zu erreichen, können Sie die Kommandozeilenoption `--root-path` wie folgt verwenden:
<div class="termy">
```console
$ fastapi run main.py --forwarded-allow-ips="*" --root-path /api/v1
<span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
```
</div>
Falls Sie Hypercorn verwenden, das hat auch die Option `--root-path`.
/// note | Technische Details
Die ASGI-Spezifikation definiert einen `root_path` für diesen Anwendungsfall.
Und die Kommandozeilenoption `--root-path` stellt diesen `root_path` bereit.
///
### Testen des aktuellen `root_path` { #checking-the-current-root-path }
Sie können den aktuellen `root_path` abrufen, der von Ihrer Anwendung für jeden Request verwendet wird. Er ist Teil des `scope`-<abbr title="Dictionary – Zuordnungstabelle: In anderen Sprachen auch Hash, Map, Objekt, Assoziatives Array genannt">Dictionarys</abbr> (das ist Teil der ASGI-Spezifikation).
Hier fügen wir ihn, nur zu Demonstrationszwecken, in die Nachricht ein.
{* ../../docs_src/behind_a_proxy/tutorial001_py310.py hl[8] *}
Wenn Sie Uvicorn dann starten mit:
<div class="termy">
```console
$ fastapi run main.py --forwarded-allow-ips="*" --root-path /api/v1
<span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
```
</div>
wäre die <abbr title="Response – Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Response</abbr> etwa:
```JSON
{
"message": "Hello World",
"root_path": "/api/v1"
}
```
### Festlegen des `root_path` in der FastAPI-Anwendung { #setting-the-root-path-in-the-fastapi-app }
Falls Sie keine Möglichkeit haben, eine Kommandozeilenoption wie `--root-path` oder ähnlich zu übergeben, können Sie, alternativ dazu, beim Erstellen Ihrer FastAPI-Anwendung den Parameter `root_path` setzen:
{* ../../docs_src/behind_a_proxy/tutorial002_py310.py hl[3] *}
Die Übergabe des `root_path` an `FastAPI` wäre das Äquivalent zur Übergabe der `--root-path`-Kommandozeilenoption an Uvicorn oder Hypercorn.
### Über `root_path` { #about-root-path }
Beachten Sie, dass der Server (Uvicorn) diesen `root_path` für nichts anderes verwendet als für die Weitergabe an die Anwendung.
Aber wenn Sie mit Ihrem Browser auf [http://127.0.0.1:8000/app](http://127.0.0.1:8000/app) gehen, sehen Sie die normale Response:
```JSON
{
"message": "Hello World",
"root_path": "/api/v1"
}
```
Es wird also nicht erwartet, dass unter `http://127.0.0.1:8000/api/v1/app` darauf zugegriffen wird.
Uvicorn erwartet, dass der Proxy unter `http://127.0.0.1:8000/app` auf Uvicorn zugreift, und dann liegt es in der Verantwortung des Proxys, das zusätzliche `/api/v1`-Präfix darüber hinzuzufügen.
## Über Proxys mit einem abgetrennten Pfadpräfix { #about-proxies-with-a-stripped-path-prefix }
Bedenken Sie, dass ein Proxy mit abgetrenntem Pfadpräfix nur eine von vielen Konfigurationsmöglichkeiten ist.
Wahrscheinlich wird in vielen Fällen die Standardeinstellung sein, dass der Proxy kein abgetrenntes Pfadpräfix hat.
In einem solchen Fall (ohne ein abgetrenntes Pfadpräfix) würde der Proxy auf etwas wie `https://myawesomeapp.com` lauschen, und wenn der Browser dann zu `https://myawesomeapp.com/api/v1/app` wechselt, und Ihr Server (z. B. Uvicorn) auf `http://127.0.0.1:8000` lauscht, würde der Proxy (ohne ein abgetrenntes Pfadpräfix) über denselben Pfad auf Uvicorn zugreifen: `http://127.0.0.1:8000/api/v1/app`.
## Lokal testen mit Traefik { #testing-locally-with-traefik }
Sie können das Experiment mit einem abgetrennten Pfadpräfix einfach lokal ausführen, indem Sie [Traefik](https://docs.traefik.io/) verwenden.
[Laden Sie Traefik herunter](https://github.com/containous/traefik/releases), es ist eine einzelne Binärdatei, Sie können die komprimierte Datei extrahieren und sie direkt vom Terminal aus ausführen.
Dann erstellen Sie eine Datei `traefik.toml` mit:
```TOML hl_lines="3"
[entryPoints]
[entryPoints.http]
address = ":9999"
[providers]
[providers.file]
filename = "routes.toml"
```
Dadurch wird Traefik angewiesen, Port 9999 abzuhören und eine andere Datei `routes.toml` zu verwenden.
/// tip | Tipp
Wir verwenden Port 9999 anstelle des Standard-HTTP-Ports 80, damit Sie ihn nicht mit Administratorrechten (`sudo`) ausführen müssen.
///
Erstellen Sie nun die andere Datei `routes.toml`:
```TOML hl_lines="5 12 20"
[http]
[http.middlewares]
[http.middlewares.api-stripprefix.stripPrefix]
prefixes = ["/api/v1"]
[http.routers]
[http.routers.app-http]
entryPoints = ["http"]
service = "app"
rule = "PathPrefix(`/api/v1`)"
middlewares = ["api-stripprefix"]
[http.services]
[http.services.app]
[http.services.app.loadBalancer]
[[http.services.app.loadBalancer.servers]]
url = "http://127.0.0.1:8000"
```
Diese Datei konfiguriert Traefik, das Pfadpräfix `/api/v1` zu verwenden.
Und dann leitet Traefik seine Requests an Ihren Uvicorn weiter, der unter `http://127.0.0.1:8000` läuft.
Starten Sie nun Traefik:
<div class="termy">
```console
$ ./traefik --configFile=traefik.toml
INFO[0000] Configuration loaded from file: /home/user/awesomeapi/traefik.toml
```
</div>
Und jetzt starten Sie Ihre Anwendung mit Uvicorn, indem Sie die Option `--root-path` verwenden:
<div class="termy">
```console
$ fastapi run main.py --forwarded-allow-ips="*" --root-path /api/v1
<span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
```
</div>
### Die Responses testen { #check-the-responses }
Wenn Sie nun zur URL mit dem Port für Uvicorn gehen: [http://127.0.0.1:8000/app](http://127.0.0.1:8000/app), sehen Sie die normale Response:
```JSON
{
"message": "Hello World",
"root_path": "/api/v1"
}
```
/// tip | Tipp
Beachten Sie, dass, obwohl Sie unter `http://127.0.0.1:8000/app` darauf zugreifen, als `root_path` angezeigt wird `/api/v1`, welches aus der Option `--root-path` stammt.
///
Öffnen Sie nun die URL mit dem Port für Traefik, einschließlich des Pfadpräfixes: [http://127.0.0.1:9999/api/v1/app](http://127.0.0.1:9999/api/v1/app).
Wir bekommen die gleiche Response:
```JSON
{
"message": "Hello World",
"root_path": "/api/v1"
}
```
Diesmal jedoch unter der URL mit dem vom Proxy bereitgestellten Präfixpfad: `/api/v1`.
Die Idee hier ist natürlich, dass jeder über den Proxy auf die Anwendung zugreifen soll, daher ist die Version mit dem Pfadpräfix `/api/v1` die „korrekte“.
Und die von Uvicorn direkt bereitgestellte Version ohne Pfadpräfix (`http://127.0.0.1:8000/app`) wäre ausschließlich für den Zugriff durch den _Proxy_ (Traefik) bestimmt.
Dies demonstriert, wie der Proxy (Traefik) das Pfadpräfix verwendet und wie der Server (Uvicorn) den `root_path` aus der Option `--root-path` verwendet.
### Es in der Dokumentationsoberfläche testen { #check-the-docs-ui }
Jetzt folgt der spaßige Teil. ✨
Der „offizielle“ Weg, auf die Anwendung zuzugreifen, wäre über den Proxy mit dem von uns definierten Pfadpräfix. Wenn Sie also die von Uvicorn direkt bereitgestellte Dokumentationsoberfläche ohne das Pfadpräfix in der URL ausprobieren, wird es erwartungsgemäß nicht funktionieren, da erwartet wird, dass der Zugriff über den Proxy erfolgt.
Sie können das unter [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs) sehen:
<img src="/img/tutorial/behind-a-proxy/image01.png">
Wenn wir jedoch unter der „offiziellen“ URL, über den Proxy mit Port `9999`, unter `/api/v1/docs`, auf die Dokumentationsoberfläche zugreifen, funktioniert es ordnungsgemäß! 🎉
Sie können das unter [http://127.0.0.1:9999/api/v1/docs](http://127.0.0.1:9999/api/v1/docs) testen:
<img src="/img/tutorial/behind-a-proxy/image02.png">
Genau so, wie wir es wollten. ✔️
Dies liegt daran, dass FastAPI diesen `root_path` verwendet, um den Default-`server` in OpenAPI mit der von `root_path` bereitgestellten URL zu erstellen.
## Zusätzliche Server { #additional-servers }
/// warning | Achtung
Dies ist ein fortgeschrittener Anwendungsfall. Überspringen Sie das gerne.
///
Standardmäßig erstellt **FastAPI** einen `server` im OpenAPI-Schema mit der URL für den `root_path`.
Sie können aber auch andere alternative `servers` bereitstellen, beispielsweise wenn Sie möchten, dass *dieselbe* Dokumentationsoberfläche mit einer Staging- und Produktionsumgebung interagiert.
Wenn Sie eine benutzerdefinierte Liste von Servern (`servers`) übergeben und es einen `root_path` gibt (da Ihre API hinter einem Proxy läuft), fügt **FastAPI** einen „Server“ mit diesem `root_path` am Anfang der Liste ein.
Zum Beispiel:
{* ../../docs_src/behind_a_proxy/tutorial003_py310.py hl[4:7] *}
Erzeugt ein OpenAPI-Schema, wie:
```JSON hl_lines="5-7"
{
"openapi": "3.1.0",
// Hier mehr Einstellungen
"servers": [
{
"url": "/api/v1"
},
{
"url": "https://stag.example.com",
"description": "Staging environment"
},
{
"url": "https://prod.example.com",
"description": "Production environment"
}
],
"paths": {
// Hier mehr Einstellungen
}
}
```
/// tip | Tipp
Beachten Sie den automatisch generierten Server mit dem `URL`-Wert `/api/v1`, welcher vom `root_path` stammt.
///
In der Dokumentationsoberfläche unter [http://127.0.0.1:9999/api/v1/docs](http://127.0.0.1:9999/api/v1/docs) würde es so aussehen:
<img src="/img/tutorial/behind-a-proxy/image03.png">
/// tip | Tipp
Die Dokumentationsoberfläche interagiert mit dem von Ihnen ausgewählten Server.
///
/// note | Technische Details
Die Eigenschaft `servers` in der OpenAPI-Spezifikation ist optional.
Wenn Sie den Parameter `servers` nicht angeben und `root_path` den Wert `/` hat, wird die Eigenschaft `servers` im generierten OpenAPI-Schema standardmäßig vollständig weggelassen, was dem Äquivalent eines einzelnen Servers mit einem `url`-Wert von `/` entspricht.
///
### Den automatischen Server von `root_path` deaktivieren { #disable-automatic-server-from-root-path }
Wenn Sie nicht möchten, dass **FastAPI** einen automatischen Server inkludiert, welcher `root_path` verwendet, können Sie den Parameter `root_path_in_servers=False` verwenden:
{* ../../docs_src/behind_a_proxy/tutorial004_py310.py hl[9] *}
Dann wird er nicht in das OpenAPI-Schema aufgenommen.
## Mounten einer Unteranwendung { #mounting-a-sub-application }
Wenn Sie gleichzeitig eine Unteranwendung mounten (wie beschrieben in [Unteranwendungen – Mounts](sub-applications.md)) und einen Proxy mit `root_path` verwenden wollen, können Sie das normal tun, wie Sie es erwarten würden.
FastAPI verwendet intern den `root_path` auf intelligente Weise, sodass es einfach funktioniert. ✨
================================================
FILE: docs/de/docs/advanced/custom-response.md
================================================
# Benutzerdefinierte Response – HTML, Stream, Datei, andere { #custom-response-html-stream-file-others }
Standardmäßig gibt **FastAPI** JSON-Responses zurück.
Sie können dies überschreiben, indem Sie direkt eine `Response` zurückgeben, wie in [Eine Response direkt zurückgeben](response-directly.md) gezeigt.
Wenn Sie jedoch direkt eine `Response` (oder eine Unterklasse wie `JSONResponse`) zurückgeben, werden die Daten nicht automatisch konvertiert (selbst wenn Sie ein `response_model` deklarieren), und die Dokumentation wird nicht automatisch generiert (zum Beispiel einschließlich des spezifischen „Medientyps“ im HTTP-Header `Content-Type` als Teil der generierten OpenAPI).
Sie können jedoch auch die `Response`, die Sie verwenden möchten (z. B. jede `Response`-Unterklasse), im *Pfadoperation-Dekorator* mit dem `response_class`-Parameter deklarieren.
Der Inhalt, den Sie von Ihrer *Pfadoperation-Funktion* zurückgeben, wird in diese `Response` eingefügt.
/// note | Hinweis
Wenn Sie eine Response-Klasse ohne Medientyp verwenden, erwartet FastAPI, dass Ihre Response keinen Inhalt hat, und dokumentiert daher das Format der Response nicht in deren generierter OpenAPI-Dokumentation.
///
## JSON-Responses { #json-responses }
Standardmäßig gibt FastAPI JSON-Responses zurück.
Wenn Sie ein [Responsemodell](../tutorial/response-model.md) deklarieren, verwendet FastAPI Pydantic, um die Daten zu JSON zu serialisieren.
Wenn Sie kein Responsemodell deklarieren, verwendet FastAPI den `jsonable_encoder`, wie in [JSON-kompatibler Encoder](../tutorial/encoder.md) erklärt, und packt das Ergebnis in eine `JSONResponse`.
Wenn Sie eine `response_class` mit einem JSON-Medientyp (`application/json`) deklarieren, wie es bei `JSONResponse` der Fall ist, werden die von Ihnen zurückgegebenen Daten automatisch mit jedem Pydantic-`response_model` (das Sie im *Pfadoperation-Dekorator* deklariert haben) konvertiert (und gefiltert). Aber die Daten werden nicht mit Pydantic zu JSON-Bytes serialisiert, stattdessen werden sie mit dem `jsonable_encoder` konvertiert und anschließend an die `JSONResponse`-Klasse übergeben, die sie dann mit der Standard-JSON-Bibliothek in Python in Bytes serialisiert.
### JSON-Leistung { #json-performance }
Kurz gesagt: Wenn Sie die maximale Leistung möchten, verwenden Sie ein [Responsemodell](../tutorial/response-model.md) und deklarieren Sie keine `response_class` im *Pfadoperation-Dekorator*.
{* ../../docs_src/response_model/tutorial001_01_py310.py ln[15:17] hl[16] *}
## HTML-Response { #html-response }
Um eine Response mit HTML direkt von **FastAPI** zurückzugeben, verwenden Sie `HTMLResponse`.
* Importieren Sie `HTMLResponse`.
* Übergeben Sie `HTMLResponse` als den Parameter `response_class` Ihres *Pfadoperation-Dekorators*.
{* ../../docs_src/custom_response/tutorial002_py310.py hl[2,7] *}
/// info | Info
Der Parameter `response_class` wird auch verwendet, um den „Medientyp“ der Response zu definieren.
In diesem Fall wird der HTTP-Header `Content-Type` auf `text/html` gesetzt.
Und er wird als solcher in OpenAPI dokumentiert.
///
### Eine `Response` zurückgeben { #return-a-response }
Wie in [Eine Response direkt zurückgeben](response-directly.md) gezeigt, können Sie die Response auch direkt in Ihrer *Pfadoperation* überschreiben, indem Sie diese zurückgeben.
Das gleiche Beispiel von oben, das eine `HTMLResponse` zurückgibt, könnte so aussehen:
{* ../../docs_src/custom_response/tutorial003_py310.py hl[2,7,19] *}
/// warning | Achtung
Eine `Response`, die direkt von Ihrer *Pfadoperation-Funktion* zurückgegeben wird, wird in OpenAPI nicht dokumentiert (zum Beispiel wird der `Content-Type` nicht dokumentiert) und ist in der automatischen interaktiven Dokumentation nicht sichtbar.
///
/// info | Info
Natürlich stammen der eigentliche `Content-Type`-Header, der Statuscode, usw., aus dem `Response`-Objekt, das Sie zurückgegeben haben.
///
### In OpenAPI dokumentieren und `Response` überschreiben { #document-in-openapi-and-override-response }
Wenn Sie die Response innerhalb der Funktion überschreiben und gleichzeitig den „Medientyp“ in OpenAPI dokumentieren möchten, können Sie den `response_class`-Parameter verwenden UND ein `Response`-Objekt zurückgeben.
Die `response_class` wird dann nur zur Dokumentation der OpenAPI-*Pfadoperation* verwendet, Ihre `Response` wird jedoch unverändert verwendet.
#### Eine `HTMLResponse` direkt zurückgeben { #return-an-htmlresponse-directly }
Es könnte zum Beispiel so etwas sein:
{* ../../docs_src/custom_response/tutorial004_py310.py hl[7,21,23] *}
In diesem Beispiel generiert die Funktion `generate_html_response()` bereits eine `Response` und gibt sie zurück, anstatt das HTML in einem `str` zurückzugeben.
Indem Sie das Ergebnis des Aufrufs von `generate_html_response()` zurückgeben, geben Sie bereits eine `Response` zurück, die das Standardverhalten von **FastAPI** überschreibt.
Aber da Sie die `HTMLResponse` auch in der `response_class` übergeben haben, weiß **FastAPI**, dass sie in OpenAPI und der interaktiven Dokumentation als HTML mit `text/html` zu dokumentieren ist:
<img src="/img/tutorial/custom-response/image01.png">
## Verfügbare Responses { #available-responses }
Hier sind einige der verfügbaren Responses.
Bedenken Sie, dass Sie `Response` verwenden können, um alles andere zurückzugeben, oder sogar eine benutzerdefinierte Unterklasse zu erstellen.
/// note | Technische Details
Sie können auch `from starlette.responses import HTMLResponse` verwenden.
**FastAPI** bietet dieselben `starlette.responses` auch via `fastapi.responses` an, als Annehmlichkeit für Sie, den Entwickler. Die meisten verfügbaren Responses kommen aber direkt von Starlette.
///
### `Response` { #response }
Die Hauptklasse `Response`, alle anderen Responses erben von ihr.
Sie können sie direkt zurückgeben.
Sie akzeptiert die folgenden Parameter:
* `content` – Ein `str` oder `bytes`.
* `status_code` – Ein `int`-HTTP-Statuscode.
* `headers` – Ein `dict` von Strings.
* `media_type` – Ein `str`, der den Medientyp angibt. Z. B. `"text/html"`.
FastAPI (eigentlich Starlette) fügt automatisch einen Content-Length-Header ein. Außerdem wird es einen Content-Type-Header einfügen, der auf dem `media_type` basiert, und für Texttypen einen Zeichensatz (charset) anfügen.
{* ../../docs_src/response_directly/tutorial002_py310.py hl[1,18] *}
### `HTMLResponse` { #htmlresponse }
Nimmt Text oder Bytes entgegen und gibt eine HTML-Response zurück, wie Sie oben gelesen haben.
### `PlainTextResponse` { #plaintextresponse }
Nimmt Text oder Bytes entgegen und gibt eine Plain-Text-Response zurück.
{* ../../docs_src/custom_response/tutorial005_py310.py hl[2,7,9] *}
### `JSONResponse` { #jsonresponse }
Nimmt einige Daten entgegen und gibt eine `application/json`-codierte Response zurück.
Dies ist die Standard-Response, die in **FastAPI** verwendet wird, wie Sie oben gelesen haben.
/// note | Technische Details
Wenn Sie jedoch ein Responsemodell oder einen Rückgabetyp deklarieren, wird dieser direkt verwendet, um die Daten zu JSON zu serialisieren, und eine Response mit dem richtigen Medientyp für JSON wird direkt zurückgegeben, ohne die `JSONResponse`-Klasse zu verwenden.
Dies ist der ideale Weg, um die beste Leistung zu erzielen.
///
### `RedirectResponse` { #redirectresponse }
Gibt eine HTTP-Weiterleitung (HTTP-Redirect) zurück. Verwendet standardmäßig den Statuscode 307 – Temporäre Weiterleitung (Temporary Redirect).
Sie können eine `RedirectResponse` direkt zurückgeben:
{* ../../docs_src/custom_response/tutorial006_py310.py hl[2,9] *}
---
Oder Sie können sie im Parameter `response_class` verwenden:
{* ../../docs_src/custom_response/tutorial006b_py310.py hl[2,7,9] *}
Wenn Sie das tun, können Sie die URL direkt von Ihrer *Pfadoperation*-Funktion zurückgeben.
In diesem Fall ist der verwendete `status_code` der Standardcode für die `RedirectResponse`, also `307`.
---
Sie können den Parameter `status_code` auch in Kombination mit dem Parameter `response_class` verwenden:
{* ../../docs_src/custom_response/tutorial006c_py310.py hl[2,7,9] *}
### `StreamingResponse` { #streamingresponse }
Nimmt einen asynchronen Generator oder einen normalen Generator/Iterator (eine Funktion mit `yield`) und streamt den Responsebody.
{* ../../docs_src/custom_response/tutorial007_py310.py hl[3,16] *}
/// note | Technische Details
Ein `async`-Task kann nur abgebrochen werden, wenn er ein `await` erreicht. Wenn es kein `await` gibt, kann der Generator (Funktion mit `yield`) nicht ordnungsgemäß abgebrochen werden und könnte weiterlaufen, selbst nachdem der Abbruch angefordert wurde.
Da dieses kleine Beispiel keine `await`-Anweisungen benötigt, fügen wir ein `await anyio.sleep(0)` hinzu, um dem Event Loop die Chance zu geben, den Abbruch zu verarbeiten.
Dies wäre bei großen oder unendlichen Streams noch wichtiger.
///
/// tip | Tipp
Anstatt eine `StreamingResponse` direkt zurückzugeben, sollten Sie wahrscheinlich dem Stil in [Daten streamen](./stream-data.md) folgen. Das ist wesentlich bequemer und behandelt den Abbruch im Hintergrund für Sie.
Wenn Sie JSON Lines streamen, folgen Sie dem Tutorial [JSON Lines streamen](../tutorial/stream-json-lines.md).
///
### `FileResponse` { #fileresponse }
Streamt eine Datei asynchron als Response.
Nimmt zur Instanziierung einen anderen Satz von Argumenten entgegen als die anderen Response-Typen:
* `path` – Der Dateipfad zur Datei, die gestreamt werden soll.
* `headers` – Alle benutzerdefinierten Header, die inkludiert werden sollen, als Dictionary.
* `media_type` – Ein String, der den Medientyp angibt. Wenn nicht gesetzt, wird der Dateiname oder Pfad verwendet, um auf einen Medientyp zu schließen.
* `filename` – Wenn gesetzt, wird das in der `Content-Disposition` der Response eingefügt.
Datei-Responses enthalten die entsprechenden `Content-Length`-, `Last-Modified`- und `ETag`-Header.
{* ../../docs_src/custom_response/tutorial009_py310.py hl[2,10] *}
Sie können auch den Parameter `response_class` verwenden:
{* ../../docs_src/custom_response/tutorial009b_py310.py hl[2,8,10] *}
In diesem Fall können Sie den Dateipfad direkt von Ihrer *Pfadoperation*-Funktion zurückgeben.
## Benutzerdefinierte Response-Klasse { #custom-response-class }
Sie können Ihre eigene benutzerdefinierte Response-Klasse erstellen, die von `Response` erbt und diese verwendet.
Nehmen wir zum Beispiel an, dass Sie [`orjson`](https://github.com/ijl/orjson) mit einigen Einstellungen verwenden möchten.
Sie möchten etwa, dass Ihre Response eingerücktes und formatiertes JSON zurückgibt. Dafür möchten Sie die orjson-Option `orjson.OPT_INDENT_2` verwenden.
Sie könnten eine `CustomORJSONResponse` erstellen. Das Wichtigste, was Sie tun müssen, ist, eine `Response.render(content)`-Methode zu erstellen, die den Inhalt als `bytes` zurückgibt:
{* ../../docs_src/custom_response/tutorial009c_py310.py hl[9:14,17] *}
Anstatt Folgendes zurückzugeben:
```json
{"message": "Hello World"}
```
... wird diese Response Folgendes zurückgeben:
```json
{
"message": "Hello World"
}
```
Natürlich werden Sie wahrscheinlich viel bessere Möglichkeiten finden, Vorteil daraus zu ziehen, als JSON zu formatieren. 😉
### `orjson` oder Responsemodell { #orjson-or-response-model }
Wenn es Ihnen um Leistung geht, sind Sie wahrscheinlich mit einem [Responsemodell](../tutorial/response-model.md) besser beraten als mit einer `orjson`-Response.
Mit einem Responsemodell verwendet FastAPI Pydantic, um die Daten ohne Zwischenschritte zu JSON zu serialisieren, also ohne sie z. B. erst mit `jsonable_encoder` zu konvertieren, was sonst der Fall wäre.
Und unter der Haube verwendet Pydantic dieselben Rust-Mechanismen wie `orjson`, um nach JSON zu serialisieren. Sie erhalten mit einem Responsemodell also ohnehin die beste Leistung.
## Standard-Response-Klasse { #default-response-class }
Beim Erstellen einer **FastAPI**-Klasseninstanz oder eines `APIRouter`s können Sie angeben, welche Response-Klasse standardmäßig verwendet werden soll.
Der Parameter, der das definiert, ist `default_response_class`.
Im folgenden Beispiel verwendet **FastAPI** standardmäßig `HTMLResponse` in allen *Pfadoperationen*, anstelle von JSON.
{* ../../docs_src/custom_response/tutorial010_py310.py hl[2,4] *}
/// tip | Tipp
Sie können dennoch weiterhin `response_class` in *Pfadoperationen* überschreiben, wie bisher.
///
## Zusätzliche Dokumentation { #additional-documentation }
Sie können auch den Medientyp und viele andere Details in OpenAPI mit `responses` deklarieren: [Zusätzliche Responses in OpenAPI](additional-responses.md).
================================================
FILE: docs/de/docs/advanced/dataclasses.md
================================================
# Datenklassen verwenden { #using-dataclasses }
FastAPI basiert auf **Pydantic**, und ich habe Ihnen gezeigt, wie Sie Pydantic-Modelle verwenden können, um <abbr title="Request – Anfrage: Daten, die der Client zum Server sendet">Requests</abbr> und <abbr title="Response – Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Responses</abbr> zu deklarieren.
Aber FastAPI unterstützt auf die gleiche Weise auch die Verwendung von [`dataclasses`](https://docs.python.org/3/library/dataclasses.html):
{* ../../docs_src/dataclasses_/tutorial001_py310.py hl[1,6:11,18:19] *}
Das ist dank **Pydantic** ebenfalls möglich, da es [„`dataclasses` intern unterstützt“](https://docs.pydantic.dev/latest/concepts/dataclasses/#use-of-stdlib-dataclasses-with-basemodel).
Auch wenn im obigen Code Pydantic nicht explizit vorkommt, verwendet FastAPI Pydantic, um diese Standard-Datenklassen in Pydantics eigene Variante von Datenklassen zu konvertieren.
Und natürlich wird das gleiche unterstützt:
* Datenvalidierung
* Datenserialisierung
* Datendokumentation, usw.
Das funktioniert genauso wie mit Pydantic-Modellen. Und tatsächlich wird es unter der Haube mittels Pydantic auf die gleiche Weise bewerkstelligt.
/// info | Info
Bedenken Sie, dass Datenklassen nicht alles können, was Pydantic-Modelle können.
Daher müssen Sie möglicherweise weiterhin Pydantic-Modelle verwenden.
Wenn Sie jedoch eine Menge Datenklassen herumliegen haben, ist dies ein guter Trick, um sie für eine Web-API mithilfe von FastAPI zu verwenden. 🤓
///
## Datenklassen in `response_model` { #dataclasses-in-response-model }
Sie können `dataclasses` auch im Parameter `response_model` verwenden:
{* ../../docs_src/dataclasses_/tutorial002_py310.py hl[1,6:12,18] *}
Die Datenklasse wird automatisch in eine Pydantic-Datenklasse konvertiert.
Auf diese Weise wird deren Schema in der Benutzeroberfläche der API-Dokumentation angezeigt:
<img src="/img/tutorial/dataclasses/image01.png">
## Datenklassen in verschachtelten Datenstrukturen { #dataclasses-in-nested-data-structures }
Sie können `dataclasses` auch mit anderen Typannotationen kombinieren, um verschachtelte Datenstrukturen zu erstellen.
In einigen Fällen müssen Sie möglicherweise immer noch Pydantics Version von `dataclasses` verwenden. Zum Beispiel, wenn Sie Fehler in der automatisch generierten API-Dokumentation haben.
In diesem Fall können Sie einfach die Standard-`dataclasses` durch `pydantic.dataclasses` ersetzen, was einen direkten Ersatz darstellt:
{* ../../docs_src/dataclasses_/tutorial003_py310.py hl[1,4,7:10,13:16,22:24,27] *}
1. Wir importieren `field` weiterhin von Standard-`dataclasses`.
2. `pydantic.dataclasses` ist ein direkter Ersatz für `dataclasses`.
3. Die Datenklasse `Author` enthält eine Liste von `Item`-Datenklassen.
4. Die Datenklasse `Author` wird im `response_model`-Parameter verwendet.
5. Sie können andere Standard-Typannotationen mit Datenklassen als Requestbody verwenden.
In diesem Fall handelt es sich um eine Liste von `Item`-Datenklassen.
6. Hier geben wir ein <abbr title="Dictionary – Zuordnungstabelle: In anderen Sprachen auch Hash, Map, Objekt, Assoziatives Array genannt">Dictionary</abbr> zurück, das `items` enthält, welches eine Liste von Datenklassen ist.
FastAPI ist weiterhin in der Lage, die Daten nach JSON zu <dfn title="Konvertieren der Daten in ein übertragbares Format">Serialisieren</dfn>.
7. Hier verwendet das `response_model` als Typannotation eine Liste von `Author`-Datenklassen.
Auch hier können Sie `dataclasses` mit Standard-Typannotationen kombinieren.
8. Beachten Sie, dass diese *Pfadoperation-Funktion* reguläres `def` anstelle von `async def` verwendet.
Wie immer können Sie in FastAPI `def` und `async def` beliebig kombinieren.
Wenn Sie eine Auffrischung darüber benötigen, wann welche Anwendung sinnvoll ist, lesen Sie den Abschnitt „In Eile?“ in der Dokumentation zu [`async` und `await`](../async.md#in-a-hurry).
9. Diese *Pfadoperation-Funktion* gibt keine Datenklassen zurück (obwohl dies möglich wäre), sondern eine Liste von Dictionarys mit internen Daten.
FastAPI verwendet den Parameter `response_model` (der Datenklassen enthält), um die Response zu konvertieren.
Sie können `dataclasses` mit anderen Typannotationen auf vielfältige Weise kombinieren, um komplexe Datenstrukturen zu bilden.
Weitere Einzelheiten finden Sie in den Bemerkungen im Quellcode oben.
## Mehr erfahren { #learn-more }
Sie können `dataclasses` auch mit anderen Pydantic-Modellen kombinieren, von ihnen erben, sie in Ihre eigenen Modelle einbinden, usw.
Weitere Informationen finden Sie in der [Pydantic-Dokumentation zu Datenklassen](https://docs.pydantic.dev/latest/concepts/dataclasses/).
## Version { #version }
Dies ist verfügbar seit FastAPI-Version `0.67.0`. 🔖
================================================
FILE: docs/de/docs/advanced/events.md
================================================
# Lifespan-Events { #lifespan-events }
Sie können Logik (Code) definieren, die ausgeführt werden soll, bevor die Anwendung **hochfährt**. Dies bedeutet, dass dieser Code **einmal** ausgeführt wird, **bevor** die Anwendung **beginnt, <abbr title="Request – Anfrage: Daten, die der Client zum Server sendet">Requests</abbr> entgegenzunehmen**.
Auf die gleiche Weise können Sie Logik (Code) definieren, die ausgeführt werden soll, wenn die Anwendung **heruntergefahren** wird. In diesem Fall wird dieser Code **einmal** ausgeführt, **nachdem** möglicherweise **viele Requests** bearbeitet wurden.
Da dieser Code ausgeführt wird, bevor die Anwendung **beginnt**, Requests entgegenzunehmen, und unmittelbar, nachdem sie die Bearbeitung von Requests **abgeschlossen hat**, deckt er den gesamten Anwendungs-<abbr title="Lebensdauer">**Lifespan**</abbr> ab (das Wort „Lifespan“ wird gleich wichtig sein 😉).
Dies kann sehr nützlich sein, um **Ressourcen** einzurichten, die Sie in der gesamten App verwenden wollen und die von Requests **gemeinsam genutzt** werden und/oder die Sie anschließend **aufräumen** müssen. Zum Beispiel ein Pool von Datenbankverbindungen oder das Laden eines gemeinsam genutzten Modells für maschinelles Lernen.
## Anwendungsfall { #use-case }
Beginnen wir mit einem Beispiel-**Anwendungsfall** und schauen uns dann an, wie wir ihn mit dieser Methode implementieren können.
Stellen wir uns vor, Sie verfügen über einige **Modelle für maschinelles Lernen**, die Sie zur Bearbeitung von Requests verwenden möchten. 🤖
Die gleichen Modelle werden von den Requests gemeinsam genutzt, es handelt sich also nicht um ein Modell pro Request, pro Benutzer, oder ähnliches.
Stellen wir uns vor, dass das Laden des Modells **eine ganze Weile dauern** kann, da viele **Daten von der Festplatte** gelesen werden müssen. Sie möchten das also nicht für jeden Request tun.
Sie könnten das auf der obersten Ebene des Moduls/der Datei machen, aber das würde auch bedeuten, dass **das Modell geladen wird**, selbst wenn Sie nur einen einfachen automatisierten Test ausführen, dann wäre dieser Test **langsam**, weil er warten müsste, bis das Modell geladen ist, bevor er einen davon unabhängigen Teil des Codes ausführen könnte.
Das wollen wir besser machen: Laden wir das Modell, bevor die Requests bearbeitet werden, aber unmittelbar bevor die Anwendung beginnt, Requests zu empfangen, und nicht, während der Code geladen wird.
## Lifespan { #lifespan }
Sie können diese Logik beim <abbr title="Hochfahren">*Startup*</abbr> und <abbr title="Herunterfahren">*Shutdown*</abbr> mithilfe des `lifespan`-Parameters der `FastAPI`-App und eines „Kontextmanagers“ definieren (ich zeige Ihnen gleich, was das ist).
Beginnen wir mit einem Beispiel und sehen es uns dann im Detail an.
Wir erstellen eine asynchrone Funktion `lifespan()` mit `yield` wie folgt:
{* ../../docs_src/events/tutorial003_py310.py hl[16,19] *}
Hier simulieren wir den langsamen *Startup*, das Laden des Modells, indem wir die (Fake-)Modellfunktion vor dem `yield` in das <abbr title="Dictionary – Zuordnungstabelle: In anderen Sprachen auch Hash, Map, Objekt, Assoziatives Array genannt">Dictionary</abbr> mit Modellen für maschinelles Lernen einfügen. Dieser Code wird ausgeführt, **bevor** die Anwendung **beginnt, Requests entgegenzunehmen**, während des *Startups*.
Und dann, direkt nach dem `yield`, entladen wir das Modell. Dieser Code wird ausgeführt, **nachdem** die Anwendung **die Bearbeitung von Requests abgeschlossen hat**, direkt vor dem *Shutdown*. Dadurch könnten beispielsweise Ressourcen wie Arbeitsspeicher oder eine GPU freigegeben werden.
/// tip | Tipp
Das `shutdown` würde erfolgen, wenn Sie die Anwendung **stoppen**.
Möglicherweise müssen Sie eine neue Version starten, oder Sie haben es einfach satt, sie auszuführen. 🤷
///
### Lifespan-Funktion { #lifespan-function }
Das Erste, was auffällt, ist, dass wir eine asynchrone Funktion mit `yield` definieren. Das ist sehr ähnlich zu Abhängigkeiten mit `yield`.
{* ../../docs_src/events/tutorial003_py310.py hl[14:19] *}
Der erste Teil der Funktion, vor dem `yield`, wird ausgeführt **bevor** die Anwendung startet.
Und der Teil nach `yield` wird ausgeführt, **nachdem** die Anwendung beendet ist.
### Asynchroner Kontextmanager { #async-context-manager }
Wie Sie sehen, ist die Funktion mit einem `@asynccontextmanager` versehen.
Dadurch wird die Funktion in einen sogenannten „**asynchronen Kontextmanager**“ umgewandelt.
{* ../../docs_src/events/tutorial003_py310.py hl[1,13] *}
Ein **Kontextmanager** in Python ist etwas, das Sie in einer `with`-Anweisung verwenden können, zum Beispiel kann `open()` als Kontextmanager verwendet werden:
```Python
with open("file.txt") as file:
file.read()
```
In neueren Versionen von Python gibt es auch einen **asynchronen Kontextmanager**. Sie würden ihn mit `async with` verwenden:
```Python
async with lifespan(app):
await do_stuff()
```
Wenn Sie wie oben einen Kontextmanager oder einen asynchronen Kontextmanager erstellen, führt dieser vor dem Betreten des `with`-Blocks den Code vor dem `yield` aus, und nach dem Verlassen des `with`-Blocks wird er den Code nach dem `yield` ausführen.
In unserem obigen Codebeispiel verwenden wir ihn nicht direkt, sondern übergeben ihn an FastAPI, damit es ihn verwenden kann.
Der Parameter `lifespan` der `FastAPI`-App benötigt einen **asynchronen Kontextmanager**, wir können ihm also unseren neuen asynchronen Kontextmanager `lifespan` übergeben.
{* ../../docs_src/events/tutorial003_py310.py hl[22] *}
## Alternative Events (<abbr title="veraltet, obsolet: Es soll nicht mehr verwendet werden">deprecatet</abbr>) { #alternative-events-deprecated }
/// warning | Achtung
Der empfohlene Weg, den *Startup* und *Shutdown* zu handhaben, ist die Verwendung des `lifespan`-Parameters der `FastAPI`-App, wie oben beschrieben. Wenn Sie einen `lifespan`-Parameter übergeben, werden die `startup`- und `shutdown`-Eventhandler nicht mehr aufgerufen. Es ist entweder alles `lifespan` oder alles Events, nicht beides.
Sie können diesen Teil wahrscheinlich überspringen.
///
Es gibt eine alternative Möglichkeit, diese Logik zu definieren, sodass sie beim *Startup* und beim *Shutdown* ausgeführt wird.
Sie können <abbr title="Eventhandler – Ereignisbehandler: Funktion, die beim Eintreten eines bestimmten Ereignisses ausgeführt wird">Eventhandler</abbr> (Funktionen) definieren, die ausgeführt werden sollen, bevor die Anwendung hochgefahren wird oder wenn die Anwendung heruntergefahren wird.
Diese Funktionen können mit `async def` oder normalem `def` deklariert werden.
### `startup`-Event { #startup-event }
Um eine Funktion hinzuzufügen, die vor dem Start der Anwendung ausgeführt werden soll, deklarieren Sie diese mit dem Event `startup`:
{* ../../docs_src/events/tutorial001_py310.py hl[8] *}
In diesem Fall initialisiert die Eventhandler-Funktion `startup` die „Datenbank“ der Items (nur ein `dict`) mit einigen Werten.
Sie können mehr als eine Eventhandler-Funktion hinzufügen.
Und Ihre Anwendung empfängt erst dann Requests, wenn alle `startup`-Eventhandler abgeschlossen sind.
### `shutdown`-Event { #shutdown-event }
Um eine Funktion hinzuzufügen, die beim Shutdown der Anwendung ausgeführt werden soll, deklarieren Sie sie mit dem Event `shutdown`:
{* ../../docs_src/events/tutorial002_py310.py hl[6] *}
Hier schreibt die `shutdown`-Eventhandler-Funktion eine Textzeile `"Application shutdown"` in eine Datei `log.txt`.
/// info | Info
In der Funktion `open()` bedeutet `mode="a"` „append“ („anhängen“), sodass die Zeile nach dem, was sich in dieser Datei befindet, hinzugefügt wird, ohne den vorherigen Inhalt zu überschreiben.
///
/// tip | Tipp
Beachten Sie, dass wir in diesem Fall eine Standard-Python-Funktion `open()` verwenden, die mit einer Datei interagiert.
Es handelt sich also um I/O (Input/Output), welches „Warten“ erfordert, bis Dinge auf die Festplatte geschrieben werden.
Aber `open()` verwendet nicht `async` und `await`.
Daher deklarieren wir die Eventhandler-Funktion mit Standard-`def` statt mit `async def`.
///
### `startup` und `shutdown` zusammen { #startup-and-shutdown-together }
Es besteht eine hohe Wahrscheinlichkeit, dass die Logik für Ihr *Startup* und *Shutdown* miteinander verknüpft ist. Vielleicht möchten Sie etwas beginnen und es dann beenden, eine Ressource laden und sie dann freigeben usw.
Bei getrennten Funktionen, die keine gemeinsame Logik oder Variablen haben, ist dies schwieriger, da Sie Werte in globalen Variablen speichern oder ähnliche Tricks verwenden müssen.
Aus diesem Grund wird jetzt empfohlen, stattdessen `lifespan` wie oben erläutert zu verwenden.
## Technische Details { #technical-details }
Nur ein technisches Detail für die neugierigen Nerds. 🤓
In der technischen ASGI-Spezifikation ist dies Teil des [Lifespan Protokolls](https://asgi.readthedocs.io/en/latest/specs/lifespan.html) und definiert Events namens `startup` und `shutdown`.
/// info | Info
Weitere Informationen zu Starlettes `lifespan`-Handlern finden Sie in [Starlettes Lifespan-Dokumentation](https://www.starlette.dev/lifespan/).
Einschließlich, wie man Lifespan-Zustand handhabt, der in anderen Bereichen Ihres Codes verwendet werden kann.
///
## Unteranwendungen { #sub-applications }
🚨 Beachten Sie, dass diese Lifespan-Events (Startup und Shutdown) nur für die Hauptanwendung ausgeführt werden, nicht für [Unteranwendungen – Mounts](sub-applications.md).
================================================
FILE: docs/de/docs/advanced/generate-clients.md
================================================
# SDKs generieren { #generating-sdks }
Da **FastAPI** auf der **OpenAPI**-Spezifikation basiert, können dessen APIs in einem standardisierten Format beschrieben werden, das viele Tools verstehen.
Dies vereinfacht es, aktuelle **Dokumentation** und Client-Bibliotheken (<abbr title="Software Development Kits - Software-Entwicklungspakete">**SDKs**</abbr>) in verschiedenen Sprachen zu generieren sowie **Test-** oder **Automatisierungs-Workflows**, die mit Ihrem Code synchron bleiben.
In diesem Leitfaden erfahren Sie, wie Sie ein **TypeScript-SDK** für Ihr FastAPI-Backend generieren.
## Open Source SDK-Generatoren { #open-source-sdk-generators }
Eine vielseitige Möglichkeit ist der [OpenAPI Generator](https://openapi-generator.tech/), der **viele Programmiersprachen** unterstützt und SDKs aus Ihrer OpenAPI-Spezifikation generieren kann.
Für **TypeScript-Clients** ist [Hey API](https://heyapi.dev/) eine speziell entwickelte Lösung, die ein optimiertes Erlebnis für das TypeScript-Ökosystem bietet.
Weitere SDK-Generatoren finden Sie auf [OpenAPI.Tools](https://openapi.tools/#sdk).
/// tip | Tipp
FastAPI generiert automatisch **OpenAPI 3.1**-Spezifikationen, daher muss jedes von Ihnen verwendete Tool diese Version unterstützen.
///
## SDK-Generatoren von FastAPI-Sponsoren { #sdk-generators-from-fastapi-sponsors }
Dieser Abschnitt hebt **venture-unterstützte** und **firmengestützte** Lösungen hervor, die von Unternehmen entwickelt werden, welche FastAPI sponsern. Diese Produkte bieten **zusätzliche Funktionen** und **Integrationen** zusätzlich zu hochwertig generierten SDKs.
Durch das ✨ [**Sponsoring von FastAPI**](../help-fastapi.md#sponsor-the-author) ✨ helfen diese Unternehmen sicherzustellen, dass das Framework und sein **Ökosystem** gesund und **nachhaltig** bleiben.
Ihr Sponsoring zeigt auch ein starkes Engagement für die FastAPI-**Community** (Sie), was bedeutet, dass sie nicht nur einen **großartigen Service** bieten möchten, sondern auch ein **robustes und florierendes Framework**, FastAPI, unterstützen möchten. 🙇
Zum Beispiel könnten Sie ausprobieren:
* [Speakeasy](https://speakeasy.com/editor?utm_source=fastapi+repo&utm_medium=github+sponsorship)
* [Stainless](https://www.stainless.com/?utm_source=fastapi&utm_medium=referral)
* [liblab](https://developers.liblab.com/tutorials/sdk-for-fastapi?utm_source=fastapi)
Einige dieser Lösungen sind möglicherweise auch Open Source oder bieten kostenlose Tarife an, sodass Sie diese ohne finanzielle Verpflichtung ausprobieren können. Andere kommerzielle SDK-Generatoren sind online verfügbar und können dort gefunden werden. 🤓
## Ein TypeScript-SDK erstellen { #create-a-typescript-sdk }
Beginnen wir mit einer einfachen FastAPI-Anwendung:
{* ../../docs_src/generate_clients/tutorial001_py310.py hl[7:9,12:13,16:17,21] *}
Beachten Sie, dass die *Pfadoperationen* die Modelle definieren, die sie für die <abbr title="Request – Anfrage: Daten, die der Client zum Server sendet">Request</abbr>- und <abbr title="Response – Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Response</abbr>-<abbr title="Die eigentlichen Nutzdaten, abzüglich der Metadaten">Payload</abbr> verwenden, indem sie die Modelle `Item` und `ResponseMessage` verwenden.
### API-Dokumentation { #api-docs }
Wenn Sie zu `/docs` gehen, sehen Sie, dass es die **Schemas** für die Daten enthält, die in Requests gesendet und in Responses empfangen werden:
<img src="/img/tutorial/generate-clients/image01.png">
Sie können diese Schemas sehen, da sie mit den Modellen in der App deklariert wurden.
Diese Informationen sind im **OpenAPI-Schema** der Anwendung verfügbar und werden in der API-Dokumentation angezeigt.
Diese Informationen aus den Modellen, die in OpenAPI enthalten sind, können verwendet werden, um **den Client-Code zu generieren**.
### Hey API { #hey-api }
Sobald wir eine FastAPI-App mit den Modellen haben, können wir Hey API verwenden, um einen TypeScript-Client zu generieren. Der schnellste Weg das zu tun, ist über npx.
```sh
npx @hey-api/openapi-ts -i http://localhost:8000/openapi.json -o src/client
```
Dies generiert ein TypeScript-SDK in `./src/client`.
Sie können lernen, wie man [`@hey-api/openapi-ts` installiert](https://heyapi.dev/openapi-ts/get-started) und über die [erzeugte Ausgabe](https://heyapi.dev/openapi-ts/output) auf deren Website lesen.
### Das SDK verwenden { #using-the-sdk }
Jetzt können Sie den Client-Code importieren und verwenden. Er könnte wie folgt aussehen, beachten Sie, dass Sie eine automatische Vervollständigung für die Methoden erhalten:
<img src="/img/tutorial/generate-clients/image02.png">
Sie werden auch eine automatische Vervollständigung für die zu sendende Payload erhalten:
<img src="/img/tutorial/generate-clients/image03.png">
/// tip | Tipp
Beachten Sie die automatische Vervollständigung für `name` und `price`, die in der FastAPI-Anwendung im `Item`-Modell definiert wurden.
///
Sie erhalten Inline-Fehlerberichte für die von Ihnen gesendeten Daten:
<img src="/img/tutorial/generate-clients/image04.png">
Das Response-Objekt hat auch automatische Vervollständigung:
<img src="/img/tutorial/generate-clients/image05.png">
## FastAPI-Anwendung mit Tags { #fastapi-app-with-tags }
In vielen Fällen wird Ihre FastAPI-App größer sein und Sie werden wahrscheinlich Tags verwenden, um verschiedene Gruppen von *Pfadoperationen* zu separieren.
Zum Beispiel könnten Sie einen Abschnitt für **Items** und einen weiteren Abschnitt für **Users** haben, und diese könnten durch Tags getrennt sein:
{* ../../docs_src/generate_clients/tutorial002_py310.py hl[21,26,34] *}
### Einen TypeScript-Client mit Tags generieren { #generate-a-typescript-client-with-tags }
Wenn Sie einen Client für eine FastAPI-App generieren, die Tags verwendet, wird normalerweise der Client-Code auch anhand der Tags getrennt.
Auf diese Weise können Sie die Dinge für den Client-Code richtig ordnen und gruppieren:
<img src="/img/tutorial/generate-clients/image06.png">
In diesem Fall haben Sie:
* `ItemsService`
* `UsersService`
### Client-Methodennamen { #client-method-names }
Im Moment sehen die generierten Methodennamen wie `createItemItemsPost` nicht sehr sauber aus:
```TypeScript
ItemsService.createItemItemsPost({name: "Plumbus", price: 5})
```
... das liegt daran, dass der Client-Generator für jede *Pfadoperation* die OpenAPI-interne **Operation-ID** verwendet.
OpenAPI erfordert, dass jede Operation-ID innerhalb aller *Pfadoperationen* einzigartig ist. Daher verwendet FastAPI den **Funktionsnamen**, den **Pfad** und die **HTTP-Methode/-Operation**, um diese Operation-ID zu generieren. Denn so kann sichergestellt werden, dass die Operation-IDs einzigartig sind.
Aber ich zeige Ihnen als Nächstes, wie Sie das verbessern können. 🤓
## Benutzerdefinierte Operation-IDs und bessere Methodennamen { #custom-operation-ids-and-better-method-names }
Sie können die Art und Weise, wie diese Operation-IDs **generiert** werden, **ändern**, um sie einfacher zu machen und **einfachere Methodennamen** in den Clients zu haben.
In diesem Fall müssen Sie auf andere Weise sicherstellen, dass jede Operation-ID **einzigartig** ist.
Zum Beispiel könnten Sie sicherstellen, dass jede *Pfadoperation* einen Tag hat, und dann die Operation-ID basierend auf dem **Tag** und dem *Pfadoperation*-**Namen** (dem Funktionsnamen) generieren.
### Eine benutzerdefinierte Funktion zur Erzeugung einer eindeutigen ID erstellen { #custom-generate-unique-id-function }
FastAPI verwendet eine **eindeutige ID** für jede *Pfadoperation*, die für die **Operation-ID** und auch für die Namen aller benötigten benutzerdefinierten Modelle für Requests oder Responses verwendet wird.
Sie können diese Funktion anpassen. Sie nimmt ein `APIRoute` und gibt einen String zurück.
Hier verwendet sie beispielsweise den ersten Tag (Sie werden wahrscheinlich nur einen Tag haben) und den *Pfadoperation*-Namen (den Funktionsnamen).
Anschließend können Sie diese benutzerdefinierte Funktion als `generate_unique_id_function`-Parameter an **FastAPI** übergeben:
{* ../../docs_src/generate_clients/tutorial003_py310.py hl[6:7,10] *}
### Einen TypeScript-Client mit benutzerdefinierten Operation-IDs generieren { #generate-a-typescript-client-with-custom-operation-ids }
Wenn Sie nun den Client erneut generieren, werden Sie feststellen, dass er über die verbesserten Methodennamen verfügt:
<img src="/img/tutorial/generate-clients/image07.png">
Wie Sie sehen, haben die Methodennamen jetzt den Tag und dann den Funktionsnamen, aber keine Informationen aus dem URL-Pfad und der HTTP-Operation.
### Die OpenAPI-Spezifikation für den Client-Generator vorab modifizieren { #preprocess-the-openapi-specification-for-the-client-generator }
Der generierte Code enthält immer noch einige **verdoppelte Informationen**.
Wir wissen bereits, dass diese Methode mit den **Items** zusammenhängt, weil dieses Wort in `ItemsService` enthalten ist (vom Tag übernommen), aber wir haben den Tag-Namen dennoch im Methodennamen vorangestellt. 😕
Wir werden das wahrscheinlich weiterhin für OpenAPI allgemein beibehalten wollen, da dadurch sichergestellt wird, dass die Operation-IDs **einzigartig** sind.
Aber für den generierten Client könnten wir die OpenAPI-Operation-IDs direkt vor der Generierung der Clients **modifizieren**, um diese Methodennamen schöner und **sauberer** zu machen.
Wir könnten das OpenAPI-JSON in eine Datei `openapi.json` herunterladen und dann mit einem Skript wie dem folgenden **den präfixierten Tag entfernen**:
{* ../../docs_src/generate_clients/tutorial004_py310.py *}
//// tab | Node.js
```Javascript
{!> ../../docs_src/generate_clients/tutorial004.js!}
```
////
Damit würden die Operation-IDs von Dingen wie `items-get_items` in `get_items` umbenannt, sodass der Client-Generator einfachere Methodennamen generieren kann.
### Einen TypeScript-Client mit der vorverarbeiteten OpenAPI generieren { #generate-a-typescript-client-with-the-preprocessed-openapi }
Da das Endergebnis nun in einer `openapi.json`-Datei vorliegt, müssen Sie Ihren Eingabeort aktualisieren:
```sh
npx @hey-api/openapi-ts -i ./openapi.json -o src/client
```
Nach der Generierung des neuen Clients haben Sie jetzt **saubere Methodennamen**, mit allen **Autovervollständigungen**, **Inline-Fehlerberichten**, usw.:
<img src="/img/tutorial/generate-clients/image08.png">
## Vorteile { #benefits }
Wenn Sie die automatisch generierten Clients verwenden, erhalten Sie **Autovervollständigung** für:
* Methoden.
* Request-Payloads im Body, Query-Parameter, usw.
* Response-Payloads.
Sie erhalten auch **Inline-Fehlerberichte** für alles.
Und wann immer Sie den Backend-Code aktualisieren und **das Frontend neu generieren**, stehen alle neuen *Pfadoperationen* als Methoden zur Verfügung, die alten werden entfernt und alle anderen Änderungen werden im generierten Code reflektiert. 🤓
Das bedeutet auch, dass, wenn sich etwas ändert, dies automatisch im Client-Code **reflektiert** wird. Und wenn Sie den Client **erstellen**, wird eine Fehlermeldung ausgegeben, wenn die verwendeten Daten **nicht übereinstimmen**.
Sie würden also **viele Fehler sehr früh** im Entwicklungszyklus erkennen, anstatt darauf warten zu müssen, dass die Fehler Ihren Endbenutzern in der Produktion angezeigt werden, und dann zu versuchen, zu debuggen, wo das Problem liegt. ✨
================================================
FILE: docs/de/docs/advanced/index.md
================================================
# Handbuch für fortgeschrittene Benutzer { #advanced-user-guide }
## Zusatzfunktionen { #additional-features }
Das Haupt-[Tutorial – Benutzerhandbuch](../tutorial/index.md) sollte ausreichen, um Ihnen einen Überblick über alle Hauptfunktionen von **FastAPI** zu geben.
In den nächsten Abschnitten sehen Sie weitere Optionen, Konfigurationen und zusätzliche Funktionen.
/// tip | Tipp
Die nächsten Abschnitte sind **nicht unbedingt „fortgeschritten“**.
Und es ist möglich, dass für Ihren Anwendungsfall die Lösung in einem davon liegt.
///
## Das Tutorial zuerst lesen { #read-the-tutorial-first }
Sie können immer noch die meisten Funktionen in **FastAPI** mit den Kenntnissen aus dem Haupt-[Tutorial – Benutzerhandbuch](../tutorial/index.md) nutzen.
Und die nächsten Abschnitte setzen voraus, dass Sie es bereits gelesen haben und dass Sie diese Hauptideen kennen.
================================================
FILE: docs/de/docs/advanced/json-base64-bytes.md
================================================
# JSON mit Bytes als base64 { #json-with-bytes-as-base64 }
Wenn Ihre App JSON-Daten empfangen und senden muss, Sie darin aber Binärdaten einschließen müssen, können Sie diese als base64 kodieren.
## Base64 vs Dateien { #base64-vs-files }
Prüfen Sie zunächst, ob Sie [Request Files](../tutorial/request-files.md) zum Hochladen von Binärdaten und [Benutzerdefinierte Response – FileResponse](./custom-response.md#fileresponse--fileresponse-) zum Senden von Binärdaten verwenden können, anstatt sie in JSON zu kodieren.
JSON kann nur UTF-8-kodierte Strings enthalten, es kann daher keine rohen Bytes enthalten.
Base64 kann Binärdaten in Strings kodieren, dafür werden jedoch mehr Zeichen benötigt als in den ursprünglichen Binärdaten; es ist daher in der Regel weniger effizient als der Umgang mit normalen Dateien.
Verwenden Sie base64 nur, wenn Sie Binärdaten unbedingt in JSON einbetten müssen und dafür keine Dateien verwenden können.
## Pydantic `bytes` { #pydantic-bytes }
Sie können ein Pydantic-Modell mit `bytes`-Feldern deklarieren und dann in der Modellkonfiguration `val_json_bytes` verwenden, um anzugeben, dass zur *Validierung* von eingehenden JSON-Daten base64 genutzt werden soll; im Rahmen dieser Validierung wird der base64-String in Bytes dekodiert.
{* ../../docs_src/json_base64_bytes/tutorial001_py310.py ln[1:9,29:35] hl[9] *}
Wenn Sie die `/docs` aufrufen, zeigt die Dokumentation, dass das Feld `data` base64-kodierte Bytes erwartet:
<div class="screenshot">
<img src="/img/tutorial/json-base64-bytes/image01.png">
</div>
Sie könnten einen Request wie folgt senden:
```json
{
"description": "Some data",
"data": "aGVsbG8="
}
```
/// tip | Tipp
`aGVsbG8=` ist die base64-Kodierung von `hello`.
///
Anschließend dekodiert Pydantic den base64-String und stellt Ihnen die ursprünglichen Bytes im Feld `data` des Modells bereit.
Sie erhalten eine Response wie:
```json
{
"description": "Some data",
"content": "hello"
}
```
## Pydantic `bytes` für Ausgabedaten { #pydantic-bytes-for-output-data }
Sie können in der Modellkonfiguration für Ausgabedaten auch `bytes`-Felder mit `ser_json_bytes` verwenden; Pydantic wird die Bytes bei der Erzeugung der JSON-Response als base64 *serialisieren*.
{* ../../docs_src/json_base64_bytes/tutorial001_py310.py ln[1:2,12:16,29,38:41] hl[16] *}
## Pydantic `bytes` für Eingabe- und Ausgabedaten { #pydantic-bytes-for-input-and-output-data }
Und selbstverständlich können Sie dasselbe Modell so konfigurieren, dass base64 sowohl für Eingaben (*validieren*) mit `val_json_bytes` als auch für Ausgaben (*serialisieren*) mit `ser_json_bytes` verwendet wird, wenn JSON-Daten empfangen und gesendet werden.
{* ../../docs_src/json_base64_bytes/tutorial001_py310.py ln[1:2,19:26,29,44:46] hl[23:26] *}
================================================
FILE: docs/de/docs/advanced/middleware.md
================================================
# Fortgeschrittene Middleware { #advanced-middleware }
Im Haupttutorial haben Sie gelesen, wie Sie Ihrer Anwendung [benutzerdefinierte Middleware](../tutorial/middleware.md) hinzufügen können.
Und dann auch, wie man [CORS mittels der `CORSMiddleware`](../tutorial/cors.md) handhabt.
In diesem Abschnitt werden wir sehen, wie man andere Middlewares verwendet.
## ASGI-Middleware hinzufügen { #adding-asgi-middlewares }
Da **FastAPI** auf Starlette basiert und die <abbr title="Asynchrones Server-Gateway-Interface">ASGI</abbr>-Spezifikation implementiert, können Sie jede ASGI-Middleware verwenden.
Eine Middleware muss nicht speziell für FastAPI oder Starlette gemacht sein, um zu funktionieren, solange sie der ASGI-Spezifikation genügt.
Im Allgemeinen handelt es sich bei ASGI-Middleware um Klassen, die als erstes Argument eine ASGI-Anwendung erwarten.
In der Dokumentation für ASGI-Middlewares von Drittanbietern wird Ihnen wahrscheinlich gesagt, dass Sie etwa Folgendes tun sollen:
```Python
from unicorn import UnicornMiddleware
app = SomeASGIApp()
new_app = UnicornMiddleware(app, some_config="rainbow")
```
Aber FastAPI (eigentlich Starlette) bietet eine einfachere Möglichkeit, welche sicherstellt, dass die internen Middlewares zur Behandlung von Serverfehlern und benutzerdefinierten Exceptionhandlern ordnungsgemäß funktionieren.
Dazu verwenden Sie `app.add_middleware()` (wie schon im Beispiel für CORS gesehen).
```Python
from fastapi import FastAPI
from unicorn import UnicornMiddleware
app = FastAPI()
app.add_middleware(UnicornMiddleware, some_config="rainbow")
```
`app.add_middleware()` empfängt eine Middleware-Klasse als erstes Argument und dann alle weiteren Argumente, die an die Middleware übergeben werden sollen.
## Integrierte Middleware { #integrated-middlewares }
**FastAPI** enthält mehrere Middlewares für gängige Anwendungsfälle. Wir werden als Nächstes sehen, wie man sie verwendet.
/// note | Technische Details
Für die nächsten Beispiele könnten Sie auch `from starlette.middleware.something import SomethingMiddleware` verwenden.
**FastAPI** bietet mehrere Middlewares via `fastapi.middleware` an, als Annehmlichkeit für Sie, den Entwickler. Die meisten verfügbaren Middlewares kommen aber direkt von Starlette.
///
## `HTTPSRedirectMiddleware` { #httpsredirectmiddleware }
Erzwingt, dass alle eingehenden <abbr title="Request – Anfrage: Daten, die der Client zum Server sendet">Requests</abbr> entweder `https` oder `wss` sein müssen.
Alle eingehenden Requests an `http` oder `ws` werden stattdessen an das sichere Schema umgeleitet.
{* ../../docs_src/advanced_middleware/tutorial001_py310.py hl[2,6] *}
## `TrustedHostMiddleware` { #trustedhostmiddleware }
Erzwingt, dass alle eingehenden Requests einen korrekt gesetzten `Host`-Header haben, um sich vor HTTP-Host-Header-Angriffen zu schützen.
{* ../../docs_src/advanced_middleware/tutorial002_py310.py hl[2,6:8] *}
Die folgenden Argumente werden unterstützt:
* `allowed_hosts` – Eine Liste von Domain-Namen, die als Hostnamen zulässig sein sollten. Wildcard-Domains wie `*.example.com` werden unterstützt, um Subdomains zu matchen. Um jeden Hostnamen zu erlauben, verwenden Sie entweder `allowed_hosts=["*"]` oder lassen Sie diese Middleware weg.
* `www_redirect` – Wenn auf True gesetzt, werden Requests an Nicht-www-Versionen der erlaubten Hosts zu deren www-Gegenstücken umgeleitet. Der Defaultwert ist `True`.
Wenn ein eingehender Request nicht korrekt validiert wird, wird eine `400`-<abbr title="Response – Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Response</abbr> gesendet.
## `GZipMiddleware` { #gzipmiddleware }
Verarbeitet GZip-Responses für alle Requests, die „gzip“ im `Accept-Encoding`-Header enthalten.
Diese Middleware verarbeitet sowohl Standard- als auch Streaming-Responses.
{* ../../docs_src/advanced_middleware/tutorial003_py310.py hl[2,6] *}
Die folgenden Argumente werden unterstützt:
* `minimum_size` – Responses, die kleiner als diese Mindestgröße in Bytes sind, nicht per GZip komprimieren. Der Defaultwert ist `500`.
* `compresslevel` – Wird während der GZip-Kompression verwendet. Es ist ein Ganzzahlwert zwischen 1 und 9. Der Defaultwert ist `9`. Ein niedrigerer Wert resultiert in schnellerer Kompression, aber größeren Dateigrößen, während ein höherer Wert langsamere Kompression, aber kleinere Dateigrößen zur Folge hat.
## Andere Middlewares { #other-middlewares }
Es gibt viele andere ASGI-Middlewares.
Zum Beispiel:
* [Uvicorns `ProxyHeadersMiddleware`](https://github.com/encode/uvicorn/blob/master/uvicorn/middleware/proxy_headers.py)
* [MessagePack](https://github.com/florimondmanca/msgpack-asgi)
Um mehr über weitere verfügbare Middlewares herauszufinden, besuchen Sie [Starlettes Middleware-Dokumentation](https://www.starlette.dev/middleware/) und die [ASGI Awesome List](https://github.com/florimondmanca/awesome-asgi).
================================================
FILE: docs/de/docs/advanced/openapi-callbacks.md
================================================
# Op
gitextract_3s9wpzee/
├── .github/
│ ├── DISCUSSION_TEMPLATE/
│ │ ├── questions.yml
│ │ └── translations.yml
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── config.yml
│ │ └── privileged.yml
│ ├── dependabot.yml
│ ├── labeler.yml
│ └── workflows/
│ ├── add-to-project.yml
│ ├── build-docs.yml
│ ├── contributors.yml
│ ├── deploy-docs.yml
│ ├── detect-conflicts.yml
│ ├── issue-manager.yml
│ ├── label-approved.yml
│ ├── labeler.yml
│ ├── latest-changes.yml
│ ├── notify-translations.yml
│ ├── people.yml
│ ├── pre-commit.yml
│ ├── publish.yml
│ ├── smokeshow.yml
│ ├── sponsors.yml
│ ├── test-redistribute.yml
│ ├── test.yml
│ ├── topic-repos.yml
│ └── translate.yml
├── .gitignore
├── .pre-commit-config.yaml
├── .python-version
├── CITATION.cff
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── SECURITY.md
├── docs/
│ ├── de/
│ │ ├── docs/
│ │ │ ├── _llm-test.md
│ │ │ ├── about/
│ │ │ │ └── index.md
│ │ │ ├── advanced/
│ │ │ │ ├── additional-responses.md
│ │ │ │ ├── additional-status-codes.md
│ │ │ │ ├── advanced-dependencies.md
│ │ │ │ ├── advanced-python-types.md
│ │ │ │ ├── async-tests.md
│ │ │ │ ├── behind-a-proxy.md
│ │ │ │ ├── custom-response.md
│ │ │ │ ├── dataclasses.md
│ │ │ │ ├── events.md
│ │ │ │ ├── generate-clients.md
│ │ │ │ ├── index.md
│ │ │ │ ├── json-base64-bytes.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── openapi-callbacks.md
│ │ │ │ ├── openapi-webhooks.md
│ │ │ │ ├── path-operation-advanced-configuration.md
│ │ │ │ ├── response-change-status-code.md
│ │ │ │ ├── response-cookies.md
│ │ │ │ ├── response-directly.md
│ │ │ │ ├── response-headers.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── http-basic-auth.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── oauth2-scopes.md
│ │ │ │ ├── settings.md
│ │ │ │ ├── stream-data.md
│ │ │ │ ├── strict-content-type.md
│ │ │ │ ├── sub-applications.md
│ │ │ │ ├── templates.md
│ │ │ │ ├── testing-dependencies.md
│ │ │ │ ├── testing-events.md
│ │ │ │ ├── testing-websockets.md
│ │ │ │ ├── using-request-directly.md
│ │ │ │ ├── websockets.md
│ │ │ │ └── wsgi.md
│ │ │ ├── alternatives.md
│ │ │ ├── async.md
│ │ │ ├── benchmarks.md
│ │ │ ├── deployment/
│ │ │ │ ├── cloud.md
│ │ │ │ ├── concepts.md
│ │ │ │ ├── docker.md
│ │ │ │ ├── fastapicloud.md
│ │ │ │ ├── https.md
│ │ │ │ ├── index.md
│ │ │ │ ├── manually.md
│ │ │ │ ├── server-workers.md
│ │ │ │ └── versions.md
│ │ │ ├── editor-support.md
│ │ │ ├── environment-variables.md
│ │ │ ├── fastapi-cli.md
│ │ │ ├── features.md
│ │ │ ├── help-fastapi.md
│ │ │ ├── history-design-future.md
│ │ │ ├── how-to/
│ │ │ │ ├── authentication-error-status-code.md
│ │ │ │ ├── conditional-openapi.md
│ │ │ │ ├── configure-swagger-ui.md
│ │ │ │ ├── custom-docs-ui-assets.md
│ │ │ │ ├── custom-request-and-route.md
│ │ │ │ ├── extending-openapi.md
│ │ │ │ ├── general.md
│ │ │ │ ├── graphql.md
│ │ │ │ ├── index.md
│ │ │ │ ├── migrate-from-pydantic-v1-to-pydantic-v2.md
│ │ │ │ ├── separate-openapi-schemas.md
│ │ │ │ └── testing-database.md
│ │ │ ├── index.md
│ │ │ ├── learn/
│ │ │ │ └── index.md
│ │ │ ├── project-generation.md
│ │ │ ├── python-types.md
│ │ │ ├── resources/
│ │ │ │ └── index.md
│ │ │ ├── translation-banner.md
│ │ │ ├── tutorial/
│ │ │ │ ├── background-tasks.md
│ │ │ │ ├── bigger-applications.md
│ │ │ │ ├── body-fields.md
│ │ │ │ ├── body-multiple-params.md
│ │ │ │ ├── body-nested-models.md
│ │ │ │ ├── body-updates.md
│ │ │ │ ├── body.md
│ │ │ │ ├── cookie-param-models.md
│ │ │ │ ├── cookie-params.md
│ │ │ │ ├── cors.md
│ │ │ │ ├── debugging.md
│ │ │ │ ├── dependencies/
│ │ │ │ │ ├── classes-as-dependencies.md
│ │ │ │ │ ├── dependencies-in-path-operation-decorators.md
│ │ │ │ │ ├── dependencies-with-yield.md
│ │ │ │ │ ├── global-dependencies.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── sub-dependencies.md
│ │ │ │ ├── encoder.md
│ │ │ │ ├── extra-data-types.md
│ │ │ │ ├── extra-models.md
│ │ │ │ ├── first-steps.md
│ │ │ │ ├── handling-errors.md
│ │ │ │ ├── header-param-models.md
│ │ │ │ ├── header-params.md
│ │ │ │ ├── index.md
│ │ │ │ ├── metadata.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── path-operation-configuration.md
│ │ │ │ ├── path-params-numeric-validations.md
│ │ │ │ ├── path-params.md
│ │ │ │ ├── query-param-models.md
│ │ │ │ ├── query-params-str-validations.md
│ │ │ │ ├── query-params.md
│ │ │ │ ├── request-files.md
│ │ │ │ ├── request-form-models.md
│ │ │ │ ├── request-forms-and-files.md
│ │ │ │ ├── request-forms.md
│ │ │ │ ├── response-model.md
│ │ │ │ ├── response-status-code.md
│ │ │ │ ├── schema-extra-example.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── first-steps.md
│ │ │ │ │ ├── get-current-user.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ ├── oauth2-jwt.md
│ │ │ │ │ └── simple-oauth2.md
│ │ │ │ ├── server-sent-events.md
│ │ │ │ ├── sql-databases.md
│ │ │ │ ├── static-files.md
│ │ │ │ ├── stream-json-lines.md
│ │ │ │ └── testing.md
│ │ │ └── virtual-environments.md
│ │ ├── llm-prompt.md
│ │ └── mkdocs.yml
│ ├── en/
│ │ ├── data/
│ │ │ ├── contributors.yml
│ │ │ ├── github_sponsors.yml
│ │ │ ├── members.yml
│ │ │ ├── people.yml
│ │ │ ├── skip_users.yml
│ │ │ ├── sponsors.yml
│ │ │ ├── sponsors_badge.yml
│ │ │ ├── topic_repos.yml
│ │ │ ├── translation_reviewers.yml
│ │ │ └── translators.yml
│ │ ├── docs/
│ │ │ ├── _llm-test.md
│ │ │ ├── about/
│ │ │ │ └── index.md
│ │ │ ├── advanced/
│ │ │ │ ├── additional-responses.md
│ │ │ │ ├── additional-status-codes.md
│ │ │ │ ├── advanced-dependencies.md
│ │ │ │ ├── advanced-python-types.md
│ │ │ │ ├── async-tests.md
│ │ │ │ ├── behind-a-proxy.md
│ │ │ │ ├── custom-response.md
│ │ │ │ ├── dataclasses.md
│ │ │ │ ├── events.md
│ │ │ │ ├── generate-clients.md
│ │ │ │ ├── index.md
│ │ │ │ ├── json-base64-bytes.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── openapi-callbacks.md
│ │ │ │ ├── openapi-webhooks.md
│ │ │ │ ├── path-operation-advanced-configuration.md
│ │ │ │ ├── response-change-status-code.md
│ │ │ │ ├── response-cookies.md
│ │ │ │ ├── response-directly.md
│ │ │ │ ├── response-headers.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── http-basic-auth.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── oauth2-scopes.md
│ │ │ │ ├── settings.md
│ │ │ │ ├── stream-data.md
│ │ │ │ ├── strict-content-type.md
│ │ │ │ ├── sub-applications.md
│ │ │ │ ├── templates.md
│ │ │ │ ├── testing-dependencies.md
│ │ │ │ ├── testing-events.md
│ │ │ │ ├── testing-websockets.md
│ │ │ │ ├── using-request-directly.md
│ │ │ │ ├── websockets.md
│ │ │ │ └── wsgi.md
│ │ │ ├── alternatives.md
│ │ │ ├── async.md
│ │ │ ├── benchmarks.md
│ │ │ ├── contributing.md
│ │ │ ├── css/
│ │ │ │ ├── custom.css
│ │ │ │ └── termynal.css
│ │ │ ├── deployment/
│ │ │ │ ├── cloud.md
│ │ │ │ ├── concepts.md
│ │ │ │ ├── docker.md
│ │ │ │ ├── fastapicloud.md
│ │ │ │ ├── https.md
│ │ │ │ ├── index.md
│ │ │ │ ├── manually.md
│ │ │ │ ├── server-workers.md
│ │ │ │ └── versions.md
│ │ │ ├── editor-support.md
│ │ │ ├── environment-variables.md
│ │ │ ├── external-links.md
│ │ │ ├── fastapi-cli.md
│ │ │ ├── fastapi-people.md
│ │ │ ├── features.md
│ │ │ ├── help-fastapi.md
│ │ │ ├── history-design-future.md
│ │ │ ├── how-to/
│ │ │ │ ├── authentication-error-status-code.md
│ │ │ │ ├── conditional-openapi.md
│ │ │ │ ├── configure-swagger-ui.md
│ │ │ │ ├── custom-docs-ui-assets.md
│ │ │ │ ├── custom-request-and-route.md
│ │ │ │ ├── extending-openapi.md
│ │ │ │ ├── general.md
│ │ │ │ ├── graphql.md
│ │ │ │ ├── index.md
│ │ │ │ ├── migrate-from-pydantic-v1-to-pydantic-v2.md
│ │ │ │ ├── separate-openapi-schemas.md
│ │ │ │ └── testing-database.md
│ │ │ ├── index.md
│ │ │ ├── js/
│ │ │ │ ├── custom.js
│ │ │ │ ├── init_kapa_widget.js
│ │ │ │ └── termynal.js
│ │ │ ├── learn/
│ │ │ │ └── index.md
│ │ │ ├── management-tasks.md
│ │ │ ├── management.md
│ │ │ ├── newsletter.md
│ │ │ ├── project-generation.md
│ │ │ ├── python-types.md
│ │ │ ├── reference/
│ │ │ │ ├── apirouter.md
│ │ │ │ ├── background.md
│ │ │ │ ├── dependencies.md
│ │ │ │ ├── encoders.md
│ │ │ │ ├── exceptions.md
│ │ │ │ ├── fastapi.md
│ │ │ │ ├── httpconnection.md
│ │ │ │ ├── index.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── openapi/
│ │ │ │ │ ├── docs.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── models.md
│ │ │ │ ├── parameters.md
│ │ │ │ ├── request.md
│ │ │ │ ├── response.md
│ │ │ │ ├── responses.md
│ │ │ │ ├── security/
│ │ │ │ │ └── index.md
│ │ │ │ ├── staticfiles.md
│ │ │ │ ├── status.md
│ │ │ │ ├── templating.md
│ │ │ │ ├── testclient.md
│ │ │ │ ├── uploadfile.md
│ │ │ │ └── websockets.md
│ │ │ ├── release-notes.md
│ │ │ ├── resources/
│ │ │ │ └── index.md
│ │ │ ├── translation-banner.md
│ │ │ ├── tutorial/
│ │ │ │ ├── background-tasks.md
│ │ │ │ ├── bigger-applications.md
│ │ │ │ ├── body-fields.md
│ │ │ │ ├── body-multiple-params.md
│ │ │ │ ├── body-nested-models.md
│ │ │ │ ├── body-updates.md
│ │ │ │ ├── body.md
│ │ │ │ ├── cookie-param-models.md
│ │ │ │ ├── cookie-params.md
│ │ │ │ ├── cors.md
│ │ │ │ ├── debugging.md
│ │ │ │ ├── dependencies/
│ │ │ │ │ ├── classes-as-dependencies.md
│ │ │ │ │ ├── dependencies-in-path-operation-decorators.md
│ │ │ │ │ ├── dependencies-with-yield.md
│ │ │ │ │ ├── global-dependencies.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── sub-dependencies.md
│ │ │ │ ├── encoder.md
│ │ │ │ ├── extra-data-types.md
│ │ │ │ ├── extra-models.md
│ │ │ │ ├── first-steps.md
│ │ │ │ ├── handling-errors.md
│ │ │ │ ├── header-param-models.md
│ │ │ │ ├── header-params.md
│ │ │ │ ├── index.md
│ │ │ │ ├── metadata.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── path-operation-configuration.md
│ │ │ │ ├── path-params-numeric-validations.md
│ │ │ │ ├── path-params.md
│ │ │ │ ├── query-param-models.md
│ │ │ │ ├── query-params-str-validations.md
│ │ │ │ ├── query-params.md
│ │ │ │ ├── request-files.md
│ │ │ │ ├── request-form-models.md
│ │ │ │ ├── request-forms-and-files.md
│ │ │ │ ├── request-forms.md
│ │ │ │ ├── response-model.md
│ │ │ │ ├── response-status-code.md
│ │ │ │ ├── schema-extra-example.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── first-steps.md
│ │ │ │ │ ├── get-current-user.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ ├── oauth2-jwt.md
│ │ │ │ │ └── simple-oauth2.md
│ │ │ │ ├── server-sent-events.md
│ │ │ │ ├── sql-databases.md
│ │ │ │ ├── static-files.md
│ │ │ │ ├── stream-json-lines.md
│ │ │ │ └── testing.md
│ │ │ └── virtual-environments.md
│ │ ├── mkdocs.env.yml
│ │ ├── mkdocs.yml
│ │ └── overrides/
│ │ ├── main.html
│ │ └── partials/
│ │ └── copyright.html
│ ├── es/
│ │ ├── docs/
│ │ │ ├── _llm-test.md
│ │ │ ├── about/
│ │ │ │ └── index.md
│ │ │ ├── advanced/
│ │ │ │ ├── additional-responses.md
│ │ │ │ ├── additional-status-codes.md
│ │ │ │ ├── advanced-dependencies.md
│ │ │ │ ├── advanced-python-types.md
│ │ │ │ ├── async-tests.md
│ │ │ │ ├── behind-a-proxy.md
│ │ │ │ ├── custom-response.md
│ │ │ │ ├── dataclasses.md
│ │ │ │ ├── events.md
│ │ │ │ ├── generate-clients.md
│ │ │ │ ├── index.md
│ │ │ │ ├── json-base64-bytes.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── openapi-callbacks.md
│ │ │ │ ├── openapi-webhooks.md
│ │ │ │ ├── path-operation-advanced-configuration.md
│ │ │ │ ├── response-change-status-code.md
│ │ │ │ ├── response-cookies.md
│ │ │ │ ├── response-directly.md
│ │ │ │ ├── response-headers.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── http-basic-auth.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── oauth2-scopes.md
│ │ │ │ ├── settings.md
│ │ │ │ ├── stream-data.md
│ │ │ │ ├── strict-content-type.md
│ │ │ │ ├── sub-applications.md
│ │ │ │ ├── templates.md
│ │ │ │ ├── testing-dependencies.md
│ │ │ │ ├── testing-events.md
│ │ │ │ ├── testing-websockets.md
│ │ │ │ ├── using-request-directly.md
│ │ │ │ ├── websockets.md
│ │ │ │ └── wsgi.md
│ │ │ ├── alternatives.md
│ │ │ ├── async.md
│ │ │ ├── benchmarks.md
│ │ │ ├── deployment/
│ │ │ │ ├── cloud.md
│ │ │ │ ├── concepts.md
│ │ │ │ ├── docker.md
│ │ │ │ ├── fastapicloud.md
│ │ │ │ ├── https.md
│ │ │ │ ├── index.md
│ │ │ │ ├── manually.md
│ │ │ │ ├── server-workers.md
│ │ │ │ └── versions.md
│ │ │ ├── editor-support.md
│ │ │ ├── environment-variables.md
│ │ │ ├── fastapi-cli.md
│ │ │ ├── features.md
│ │ │ ├── help-fastapi.md
│ │ │ ├── history-design-future.md
│ │ │ ├── how-to/
│ │ │ │ ├── authentication-error-status-code.md
│ │ │ │ ├── conditional-openapi.md
│ │ │ │ ├── configure-swagger-ui.md
│ │ │ │ ├── custom-docs-ui-assets.md
│ │ │ │ ├── custom-request-and-route.md
│ │ │ │ ├── extending-openapi.md
│ │ │ │ ├── general.md
│ │ │ │ ├── graphql.md
│ │ │ │ ├── index.md
│ │ │ │ ├── migrate-from-pydantic-v1-to-pydantic-v2.md
│ │ │ │ ├── separate-openapi-schemas.md
│ │ │ │ └── testing-database.md
│ │ │ ├── index.md
│ │ │ ├── learn/
│ │ │ │ └── index.md
│ │ │ ├── project-generation.md
│ │ │ ├── python-types.md
│ │ │ ├── resources/
│ │ │ │ └── index.md
│ │ │ ├── translation-banner.md
│ │ │ ├── tutorial/
│ │ │ │ ├── background-tasks.md
│ │ │ │ ├── bigger-applications.md
│ │ │ │ ├── body-fields.md
│ │ │ │ ├── body-multiple-params.md
│ │ │ │ ├── body-nested-models.md
│ │ │ │ ├── body-updates.md
│ │ │ │ ├── body.md
│ │ │ │ ├── cookie-param-models.md
│ │ │ │ ├── cookie-params.md
│ │ │ │ ├── cors.md
│ │ │ │ ├── debugging.md
│ │ │ │ ├── dependencies/
│ │ │ │ │ ├── classes-as-dependencies.md
│ │ │ │ │ ├── dependencies-in-path-operation-decorators.md
│ │ │ │ │ ├── dependencies-with-yield.md
│ │ │ │ │ ├── global-dependencies.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── sub-dependencies.md
│ │ │ │ ├── encoder.md
│ │ │ │ ├── extra-data-types.md
│ │ │ │ ├── extra-models.md
│ │ │ │ ├── first-steps.md
│ │ │ │ ├── handling-errors.md
│ │ │ │ ├── header-param-models.md
│ │ │ │ ├── header-params.md
│ │ │ │ ├── index.md
│ │ │ │ ├── metadata.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── path-operation-configuration.md
│ │ │ │ ├── path-params-numeric-validations.md
│ │ │ │ ├── path-params.md
│ │ │ │ ├── query-param-models.md
│ │ │ │ ├── query-params-str-validations.md
│ │ │ │ ├── query-params.md
│ │ │ │ ├── request-files.md
│ │ │ │ ├── request-form-models.md
│ │ │ │ ├── request-forms-and-files.md
│ │ │ │ ├── request-forms.md
│ │ │ │ ├── response-model.md
│ │ │ │ ├── response-status-code.md
│ │ │ │ ├── schema-extra-example.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── first-steps.md
│ │ │ │ │ ├── get-current-user.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ ├── oauth2-jwt.md
│ │ │ │ │ └── simple-oauth2.md
│ │ │ │ ├── server-sent-events.md
│ │ │ │ ├── sql-databases.md
│ │ │ │ ├── static-files.md
│ │ │ │ ├── stream-json-lines.md
│ │ │ │ └── testing.md
│ │ │ └── virtual-environments.md
│ │ ├── llm-prompt.md
│ │ └── mkdocs.yml
│ ├── fr/
│ │ ├── docs/
│ │ │ ├── _llm-test.md
│ │ │ ├── about/
│ │ │ │ └── index.md
│ │ │ ├── advanced/
│ │ │ │ ├── additional-responses.md
│ │ │ │ ├── additional-status-codes.md
│ │ │ │ ├── advanced-dependencies.md
│ │ │ │ ├── advanced-python-types.md
│ │ │ │ ├── async-tests.md
│ │ │ │ ├── behind-a-proxy.md
│ │ │ │ ├── custom-response.md
│ │ │ │ ├── dataclasses.md
│ │ │ │ ├── events.md
│ │ │ │ ├── generate-clients.md
│ │ │ │ ├── index.md
│ │ │ │ ├── json-base64-bytes.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── openapi-callbacks.md
│ │ │ │ ├── openapi-webhooks.md
│ │ │ │ ├── path-operation-advanced-configuration.md
│ │ │ │ ├── response-change-status-code.md
│ │ │ │ ├── response-cookies.md
│ │ │ │ ├── response-directly.md
│ │ │ │ ├── response-headers.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── http-basic-auth.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── oauth2-scopes.md
│ │ │ │ ├── settings.md
│ │ │ │ ├── stream-data.md
│ │ │ │ ├── strict-content-type.md
│ │ │ │ ├── sub-applications.md
│ │ │ │ ├── templates.md
│ │ │ │ ├── testing-dependencies.md
│ │ │ │ ├── testing-events.md
│ │ │ │ ├── testing-websockets.md
│ │ │ │ ├── using-request-directly.md
│ │ │ │ ├── websockets.md
│ │ │ │ └── wsgi.md
│ │ │ ├── alternatives.md
│ │ │ ├── async.md
│ │ │ ├── benchmarks.md
│ │ │ ├── deployment/
│ │ │ │ ├── cloud.md
│ │ │ │ ├── concepts.md
│ │ │ │ ├── docker.md
│ │ │ │ ├── fastapicloud.md
│ │ │ │ ├── https.md
│ │ │ │ ├── index.md
│ │ │ │ ├── manually.md
│ │ │ │ ├── server-workers.md
│ │ │ │ └── versions.md
│ │ │ ├── editor-support.md
│ │ │ ├── environment-variables.md
│ │ │ ├── fastapi-cli.md
│ │ │ ├── features.md
│ │ │ ├── help-fastapi.md
│ │ │ ├── history-design-future.md
│ │ │ ├── how-to/
│ │ │ │ ├── authentication-error-status-code.md
│ │ │ │ ├── conditional-openapi.md
│ │ │ │ ├── configure-swagger-ui.md
│ │ │ │ ├── custom-docs-ui-assets.md
│ │ │ │ ├── custom-request-and-route.md
│ │ │ │ ├── extending-openapi.md
│ │ │ │ ├── general.md
│ │ │ │ ├── graphql.md
│ │ │ │ ├── index.md
│ │ │ │ ├── migrate-from-pydantic-v1-to-pydantic-v2.md
│ │ │ │ ├── separate-openapi-schemas.md
│ │ │ │ └── testing-database.md
│ │ │ ├── index.md
│ │ │ ├── learn/
│ │ │ │ └── index.md
│ │ │ ├── project-generation.md
│ │ │ ├── python-types.md
│ │ │ ├── resources/
│ │ │ │ └── index.md
│ │ │ ├── translation-banner.md
│ │ │ ├── tutorial/
│ │ │ │ ├── background-tasks.md
│ │ │ │ ├── bigger-applications.md
│ │ │ │ ├── body-fields.md
│ │ │ │ ├── body-multiple-params.md
│ │ │ │ ├── body-nested-models.md
│ │ │ │ ├── body-updates.md
│ │ │ │ ├── body.md
│ │ │ │ ├── cookie-param-models.md
│ │ │ │ ├── cookie-params.md
│ │ │ │ ├── cors.md
│ │ │ │ ├── debugging.md
│ │ │ │ ├── dependencies/
│ │ │ │ │ ├── classes-as-dependencies.md
│ │ │ │ │ ├── dependencies-in-path-operation-decorators.md
│ │ │ │ │ ├── dependencies-with-yield.md
│ │ │ │ │ ├── global-dependencies.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── sub-dependencies.md
│ │ │ │ ├── encoder.md
│ │ │ │ ├── extra-data-types.md
│ │ │ │ ├── extra-models.md
│ │ │ │ ├── first-steps.md
│ │ │ │ ├── handling-errors.md
│ │ │ │ ├── header-param-models.md
│ │ │ │ ├── header-params.md
│ │ │ │ ├── index.md
│ │ │ │ ├── metadata.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── path-operation-configuration.md
│ │ │ │ ├── path-params-numeric-validations.md
│ │ │ │ ├── path-params.md
│ │ │ │ ├── query-param-models.md
│ │ │ │ ├── query-params-str-validations.md
│ │ │ │ ├── query-params.md
│ │ │ │ ├── request-files.md
│ │ │ │ ├── request-form-models.md
│ │ │ │ ├── request-forms-and-files.md
│ │ │ │ ├── request-forms.md
│ │ │ │ ├── response-model.md
│ │ │ │ ├── response-status-code.md
│ │ │ │ ├── schema-extra-example.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── first-steps.md
│ │ │ │ │ ├── get-current-user.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ ├── oauth2-jwt.md
│ │ │ │ │ └── simple-oauth2.md
│ │ │ │ ├── server-sent-events.md
│ │ │ │ ├── sql-databases.md
│ │ │ │ ├── static-files.md
│ │ │ │ ├── stream-json-lines.md
│ │ │ │ └── testing.md
│ │ │ └── virtual-environments.md
│ │ ├── llm-prompt.md
│ │ └── mkdocs.yml
│ ├── ja/
│ │ ├── docs/
│ │ │ ├── _llm-test.md
│ │ │ ├── about/
│ │ │ │ └── index.md
│ │ │ ├── advanced/
│ │ │ │ ├── additional-responses.md
│ │ │ │ ├── additional-status-codes.md
│ │ │ │ ├── advanced-dependencies.md
│ │ │ │ ├── advanced-python-types.md
│ │ │ │ ├── async-tests.md
│ │ │ │ ├── behind-a-proxy.md
│ │ │ │ ├── custom-response.md
│ │ │ │ ├── dataclasses.md
│ │ │ │ ├── events.md
│ │ │ │ ├── generate-clients.md
│ │ │ │ ├── index.md
│ │ │ │ ├── json-base64-bytes.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── openapi-callbacks.md
│ │ │ │ ├── openapi-webhooks.md
│ │ │ │ ├── path-operation-advanced-configuration.md
│ │ │ │ ├── response-change-status-code.md
│ │ │ │ ├── response-cookies.md
│ │ │ │ ├── response-directly.md
│ │ │ │ ├── response-headers.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── http-basic-auth.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── oauth2-scopes.md
│ │ │ │ ├── settings.md
│ │ │ │ ├── stream-data.md
│ │ │ │ ├── strict-content-type.md
│ │ │ │ ├── sub-applications.md
│ │ │ │ ├── templates.md
│ │ │ │ ├── testing-dependencies.md
│ │ │ │ ├── testing-events.md
│ │ │ │ ├── testing-websockets.md
│ │ │ │ ├── using-request-directly.md
│ │ │ │ ├── websockets.md
│ │ │ │ └── wsgi.md
│ │ │ ├── alternatives.md
│ │ │ ├── async.md
│ │ │ ├── benchmarks.md
│ │ │ ├── deployment/
│ │ │ │ ├── cloud.md
│ │ │ │ ├── concepts.md
│ │ │ │ ├── docker.md
│ │ │ │ ├── fastapicloud.md
│ │ │ │ ├── https.md
│ │ │ │ ├── index.md
│ │ │ │ ├── manually.md
│ │ │ │ ├── server-workers.md
│ │ │ │ └── versions.md
│ │ │ ├── editor-support.md
│ │ │ ├── environment-variables.md
│ │ │ ├── fastapi-cli.md
│ │ │ ├── features.md
│ │ │ ├── help-fastapi.md
│ │ │ ├── history-design-future.md
│ │ │ ├── how-to/
│ │ │ │ ├── authentication-error-status-code.md
│ │ │ │ ├── conditional-openapi.md
│ │ │ │ ├── configure-swagger-ui.md
│ │ │ │ ├── custom-docs-ui-assets.md
│ │ │ │ ├── custom-request-and-route.md
│ │ │ │ ├── extending-openapi.md
│ │ │ │ ├── general.md
│ │ │ │ ├── graphql.md
│ │ │ │ ├── index.md
│ │ │ │ ├── migrate-from-pydantic-v1-to-pydantic-v2.md
│ │ │ │ ├── separate-openapi-schemas.md
│ │ │ │ └── testing-database.md
│ │ │ ├── index.md
│ │ │ ├── learn/
│ │ │ │ └── index.md
│ │ │ ├── project-generation.md
│ │ │ ├── python-types.md
│ │ │ ├── resources/
│ │ │ │ └── index.md
│ │ │ ├── translation-banner.md
│ │ │ ├── tutorial/
│ │ │ │ ├── background-tasks.md
│ │ │ │ ├── bigger-applications.md
│ │ │ │ ├── body-fields.md
│ │ │ │ ├── body-multiple-params.md
│ │ │ │ ├── body-nested-models.md
│ │ │ │ ├── body-updates.md
│ │ │ │ ├── body.md
│ │ │ │ ├── cookie-param-models.md
│ │ │ │ ├── cookie-params.md
│ │ │ │ ├── cors.md
│ │ │ │ ├── debugging.md
│ │ │ │ ├── dependencies/
│ │ │ │ │ ├── classes-as-dependencies.md
│ │ │ │ │ ├── dependencies-in-path-operation-decorators.md
│ │ │ │ │ ├── dependencies-with-yield.md
│ │ │ │ │ ├── global-dependencies.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── sub-dependencies.md
│ │ │ │ ├── encoder.md
│ │ │ │ ├── extra-data-types.md
│ │ │ │ ├── extra-models.md
│ │ │ │ ├── first-steps.md
│ │ │ │ ├── handling-errors.md
│ │ │ │ ├── header-param-models.md
│ │ │ │ ├── header-params.md
│ │ │ │ ├── index.md
│ │ │ │ ├── metadata.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── path-operation-configuration.md
│ │ │ │ ├── path-params-numeric-validations.md
│ │ │ │ ├── path-params.md
│ │ │ │ ├── query-param-models.md
│ │ │ │ ├── query-params-str-validations.md
│ │ │ │ ├── query-params.md
│ │ │ │ ├── request-files.md
│ │ │ │ ├── request-form-models.md
│ │ │ │ ├── request-forms-and-files.md
│ │ │ │ ├── request-forms.md
│ │ │ │ ├── response-model.md
│ │ │ │ ├── response-status-code.md
│ │ │ │ ├── schema-extra-example.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── first-steps.md
│ │ │ │ │ ├── get-current-user.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ ├── oauth2-jwt.md
│ │ │ │ │ └── simple-oauth2.md
│ │ │ │ ├── server-sent-events.md
│ │ │ │ ├── sql-databases.md
│ │ │ │ ├── static-files.md
│ │ │ │ ├── stream-json-lines.md
│ │ │ │ └── testing.md
│ │ │ └── virtual-environments.md
│ │ ├── llm-prompt.md
│ │ └── mkdocs.yml
│ ├── ko/
│ │ ├── docs/
│ │ │ ├── _llm-test.md
│ │ │ ├── about/
│ │ │ │ └── index.md
│ │ │ ├── advanced/
│ │ │ │ ├── additional-responses.md
│ │ │ │ ├── additional-status-codes.md
│ │ │ │ ├── advanced-dependencies.md
│ │ │ │ ├── advanced-python-types.md
│ │ │ │ ├── async-tests.md
│ │ │ │ ├── behind-a-proxy.md
│ │ │ │ ├── custom-response.md
│ │ │ │ ├── dataclasses.md
│ │ │ │ ├── events.md
│ │ │ │ ├── generate-clients.md
│ │ │ │ ├── index.md
│ │ │ │ ├── json-base64-bytes.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── openapi-callbacks.md
│ │ │ │ ├── openapi-webhooks.md
│ │ │ │ ├── path-operation-advanced-configuration.md
│ │ │ │ ├── response-change-status-code.md
│ │ │ │ ├── response-cookies.md
│ │ │ │ ├── response-directly.md
│ │ │ │ ├── response-headers.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── http-basic-auth.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── oauth2-scopes.md
│ │ │ │ ├── settings.md
│ │ │ │ ├── stream-data.md
│ │ │ │ ├── strict-content-type.md
│ │ │ │ ├── sub-applications.md
│ │ │ │ ├── templates.md
│ │ │ │ ├── testing-dependencies.md
│ │ │ │ ├── testing-events.md
│ │ │ │ ├── testing-websockets.md
│ │ │ │ ├── using-request-directly.md
│ │ │ │ ├── websockets.md
│ │ │ │ └── wsgi.md
│ │ │ ├── alternatives.md
│ │ │ ├── async.md
│ │ │ ├── benchmarks.md
│ │ │ ├── deployment/
│ │ │ │ ├── cloud.md
│ │ │ │ ├── concepts.md
│ │ │ │ ├── docker.md
│ │ │ │ ├── fastapicloud.md
│ │ │ │ ├── https.md
│ │ │ │ ├── index.md
│ │ │ │ ├── manually.md
│ │ │ │ ├── server-workers.md
│ │ │ │ └── versions.md
│ │ │ ├── editor-support.md
│ │ │ ├── environment-variables.md
│ │ │ ├── fastapi-cli.md
│ │ │ ├── features.md
│ │ │ ├── help-fastapi.md
│ │ │ ├── history-design-future.md
│ │ │ ├── how-to/
│ │ │ │ ├── authentication-error-status-code.md
│ │ │ │ ├── conditional-openapi.md
│ │ │ │ ├── configure-swagger-ui.md
│ │ │ │ ├── custom-docs-ui-assets.md
│ │ │ │ ├── custom-request-and-route.md
│ │ │ │ ├── extending-openapi.md
│ │ │ │ ├── general.md
│ │ │ │ ├── graphql.md
│ │ │ │ ├── index.md
│ │ │ │ ├── migrate-from-pydantic-v1-to-pydantic-v2.md
│ │ │ │ ├── separate-openapi-schemas.md
│ │ │ │ └── testing-database.md
│ │ │ ├── index.md
│ │ │ ├── learn/
│ │ │ │ └── index.md
│ │ │ ├── project-generation.md
│ │ │ ├── python-types.md
│ │ │ ├── resources/
│ │ │ │ └── index.md
│ │ │ ├── translation-banner.md
│ │ │ ├── tutorial/
│ │ │ │ ├── background-tasks.md
│ │ │ │ ├── bigger-applications.md
│ │ │ │ ├── body-fields.md
│ │ │ │ ├── body-multiple-params.md
│ │ │ │ ├── body-nested-models.md
│ │ │ │ ├── body-updates.md
│ │ │ │ ├── body.md
│ │ │ │ ├── cookie-param-models.md
│ │ │ │ ├── cookie-params.md
│ │ │ │ ├── cors.md
│ │ │ │ ├── debugging.md
│ │ │ │ ├── dependencies/
│ │ │ │ │ ├── classes-as-dependencies.md
│ │ │ │ │ ├── dependencies-in-path-operation-decorators.md
│ │ │ │ │ ├── dependencies-with-yield.md
│ │ │ │ │ ├── global-dependencies.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── sub-dependencies.md
│ │ │ │ ├── encoder.md
│ │ │ │ ├── extra-data-types.md
│ │ │ │ ├── extra-models.md
│ │ │ │ ├── first-steps.md
│ │ │ │ ├── handling-errors.md
│ │ │ │ ├── header-param-models.md
│ │ │ │ ├── header-params.md
│ │ │ │ ├── index.md
│ │ │ │ ├── metadata.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── path-operation-configuration.md
│ │ │ │ ├── path-params-numeric-validations.md
│ │ │ │ ├── path-params.md
│ │ │ │ ├── query-param-models.md
│ │ │ │ ├── query-params-str-validations.md
│ │ │ │ ├── query-params.md
│ │ │ │ ├── request-files.md
│ │ │ │ ├── request-form-models.md
│ │ │ │ ├── request-forms-and-files.md
│ │ │ │ ├── request-forms.md
│ │ │ │ ├── response-model.md
│ │ │ │ ├── response-status-code.md
│ │ │ │ ├── schema-extra-example.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── first-steps.md
│ │ │ │ │ ├── get-current-user.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ ├── oauth2-jwt.md
│ │ │ │ │ └── simple-oauth2.md
│ │ │ │ ├── server-sent-events.md
│ │ │ │ ├── sql-databases.md
│ │ │ │ ├── static-files.md
│ │ │ │ ├── stream-json-lines.md
│ │ │ │ └── testing.md
│ │ │ └── virtual-environments.md
│ │ ├── llm-prompt.md
│ │ └── mkdocs.yml
│ ├── language_names.yml
│ ├── missing-translation.md
│ ├── pt/
│ │ ├── docs/
│ │ │ ├── _llm-test.md
│ │ │ ├── about/
│ │ │ │ └── index.md
│ │ │ ├── advanced/
│ │ │ │ ├── additional-responses.md
│ │ │ │ ├── additional-status-codes.md
│ │ │ │ ├── advanced-dependencies.md
│ │ │ │ ├── advanced-python-types.md
│ │ │ │ ├── async-tests.md
│ │ │ │ ├── behind-a-proxy.md
│ │ │ │ ├── custom-response.md
│ │ │ │ ├── dataclasses.md
│ │ │ │ ├── events.md
│ │ │ │ ├── generate-clients.md
│ │ │ │ ├── index.md
│ │ │ │ ├── json-base64-bytes.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── openapi-callbacks.md
│ │ │ │ ├── openapi-webhooks.md
│ │ │ │ ├── path-operation-advanced-configuration.md
│ │ │ │ ├── response-change-status-code.md
│ │ │ │ ├── response-cookies.md
│ │ │ │ ├── response-directly.md
│ │ │ │ ├── response-headers.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── http-basic-auth.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── oauth2-scopes.md
│ │ │ │ ├── settings.md
│ │ │ │ ├── stream-data.md
│ │ │ │ ├── strict-content-type.md
│ │ │ │ ├── sub-applications.md
│ │ │ │ ├── templates.md
│ │ │ │ ├── testing-dependencies.md
│ │ │ │ ├── testing-events.md
│ │ │ │ ├── testing-websockets.md
│ │ │ │ ├── using-request-directly.md
│ │ │ │ ├── websockets.md
│ │ │ │ └── wsgi.md
│ │ │ ├── alternatives.md
│ │ │ ├── async.md
│ │ │ ├── benchmarks.md
│ │ │ ├── deployment/
│ │ │ │ ├── cloud.md
│ │ │ │ ├── concepts.md
│ │ │ │ ├── docker.md
│ │ │ │ ├── fastapicloud.md
│ │ │ │ ├── https.md
│ │ │ │ ├── index.md
│ │ │ │ ├── manually.md
│ │ │ │ ├── server-workers.md
│ │ │ │ └── versions.md
│ │ │ ├── editor-support.md
│ │ │ ├── environment-variables.md
│ │ │ ├── fastapi-cli.md
│ │ │ ├── features.md
│ │ │ ├── help-fastapi.md
│ │ │ ├── history-design-future.md
│ │ │ ├── how-to/
│ │ │ │ ├── authentication-error-status-code.md
│ │ │ │ ├── conditional-openapi.md
│ │ │ │ ├── configure-swagger-ui.md
│ │ │ │ ├── custom-docs-ui-assets.md
│ │ │ │ ├── custom-request-and-route.md
│ │ │ │ ├── extending-openapi.md
│ │ │ │ ├── general.md
│ │ │ │ ├── graphql.md
│ │ │ │ ├── index.md
│ │ │ │ ├── migrate-from-pydantic-v1-to-pydantic-v2.md
│ │ │ │ ├── separate-openapi-schemas.md
│ │ │ │ └── testing-database.md
│ │ │ ├── index.md
│ │ │ ├── learn/
│ │ │ │ └── index.md
│ │ │ ├── project-generation.md
│ │ │ ├── python-types.md
│ │ │ ├── resources/
│ │ │ │ └── index.md
│ │ │ ├── translation-banner.md
│ │ │ ├── tutorial/
│ │ │ │ ├── background-tasks.md
│ │ │ │ ├── bigger-applications.md
│ │ │ │ ├── body-fields.md
│ │ │ │ ├── body-multiple-params.md
│ │ │ │ ├── body-nested-models.md
│ │ │ │ ├── body-updates.md
│ │ │ │ ├── body.md
│ │ │ │ ├── cookie-param-models.md
│ │ │ │ ├── cookie-params.md
│ │ │ │ ├── cors.md
│ │ │ │ ├── debugging.md
│ │ │ │ ├── dependencies/
│ │ │ │ │ ├── classes-as-dependencies.md
│ │ │ │ │ ├── dependencies-in-path-operation-decorators.md
│ │ │ │ │ ├── dependencies-with-yield.md
│ │ │ │ │ ├── global-dependencies.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── sub-dependencies.md
│ │ │ │ ├── encoder.md
│ │ │ │ ├── extra-data-types.md
│ │ │ │ ├── extra-models.md
│ │ │ │ ├── first-steps.md
│ │ │ │ ├── handling-errors.md
│ │ │ │ ├── header-param-models.md
│ │ │ │ ├── header-params.md
│ │ │ │ ├── index.md
│ │ │ │ ├── metadata.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── path-operation-configuration.md
│ │ │ │ ├── path-params-numeric-validations.md
│ │ │ │ ├── path-params.md
│ │ │ │ ├── query-param-models.md
│ │ │ │ ├── query-params-str-validations.md
│ │ │ │ ├── query-params.md
│ │ │ │ ├── request-files.md
│ │ │ │ ├── request-form-models.md
│ │ │ │ ├── request-forms-and-files.md
│ │ │ │ ├── request-forms.md
│ │ │ │ ├── response-model.md
│ │ │ │ ├── response-status-code.md
│ │ │ │ ├── schema-extra-example.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── first-steps.md
│ │ │ │ │ ├── get-current-user.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ ├── oauth2-jwt.md
│ │ │ │ │ └── simple-oauth2.md
│ │ │ │ ├── server-sent-events.md
│ │ │ │ ├── sql-databases.md
│ │ │ │ ├── static-files.md
│ │ │ │ ├── stream-json-lines.md
│ │ │ │ └── testing.md
│ │ │ └── virtual-environments.md
│ │ ├── llm-prompt.md
│ │ └── mkdocs.yml
│ ├── ru/
│ │ ├── docs/
│ │ │ ├── _llm-test.md
│ │ │ ├── about/
│ │ │ │ └── index.md
│ │ │ ├── advanced/
│ │ │ │ ├── additional-responses.md
│ │ │ │ ├── additional-status-codes.md
│ │ │ │ ├── advanced-dependencies.md
│ │ │ │ ├── advanced-python-types.md
│ │ │ │ ├── async-tests.md
│ │ │ │ ├── behind-a-proxy.md
│ │ │ │ ├── custom-response.md
│ │ │ │ ├── dataclasses.md
│ │ │ │ ├── events.md
│ │ │ │ ├── generate-clients.md
│ │ │ │ ├── index.md
│ │ │ │ ├── json-base64-bytes.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── openapi-callbacks.md
│ │ │ │ ├── openapi-webhooks.md
│ │ │ │ ├── path-operation-advanced-configuration.md
│ │ │ │ ├── response-change-status-code.md
│ │ │ │ ├── response-cookies.md
│ │ │ │ ├── response-directly.md
│ │ │ │ ├── response-headers.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── http-basic-auth.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── oauth2-scopes.md
│ │ │ │ ├── settings.md
│ │ │ │ ├── stream-data.md
│ │ │ │ ├── strict-content-type.md
│ │ │ │ ├── sub-applications.md
│ │ │ │ ├── templates.md
│ │ │ │ ├── testing-dependencies.md
│ │ │ │ ├── testing-events.md
│ │ │ │ ├── testing-websockets.md
│ │ │ │ ├── using-request-directly.md
│ │ │ │ ├── websockets.md
│ │ │ │ └── wsgi.md
│ │ │ ├── alternatives.md
│ │ │ ├── async.md
│ │ │ ├── benchmarks.md
│ │ │ ├── deployment/
│ │ │ │ ├── cloud.md
│ │ │ │ ├── concepts.md
│ │ │ │ ├── docker.md
│ │ │ │ ├── fastapicloud.md
│ │ │ │ ├── https.md
│ │ │ │ ├── index.md
│ │ │ │ ├── manually.md
│ │ │ │ ├── server-workers.md
│ │ │ │ └── versions.md
│ │ │ ├── editor-support.md
│ │ │ ├── environment-variables.md
│ │ │ ├── fastapi-cli.md
│ │ │ ├── features.md
│ │ │ ├── help-fastapi.md
│ │ │ ├── history-design-future.md
│ │ │ ├── how-to/
│ │ │ │ ├── authentication-error-status-code.md
│ │ │ │ ├── conditional-openapi.md
│ │ │ │ ├── configure-swagger-ui.md
│ │ │ │ ├── custom-docs-ui-assets.md
│ │ │ │ ├── custom-request-and-route.md
│ │ │ │ ├── extending-openapi.md
│ │ │ │ ├── general.md
│ │ │ │ ├── graphql.md
│ │ │ │ ├── index.md
│ │ │ │ ├── migrate-from-pydantic-v1-to-pydantic-v2.md
│ │ │ │ ├── separate-openapi-schemas.md
│ │ │ │ └── testing-database.md
│ │ │ ├── index.md
│ │ │ ├── learn/
│ │ │ │ └── index.md
│ │ │ ├── project-generation.md
│ │ │ ├── python-types.md
│ │ │ ├── resources/
│ │ │ │ └── index.md
│ │ │ ├── translation-banner.md
│ │ │ ├── tutorial/
│ │ │ │ ├── background-tasks.md
│ │ │ │ ├── bigger-applications.md
│ │ │ │ ├── body-fields.md
│ │ │ │ ├── body-multiple-params.md
│ │ │ │ ├── body-nested-models.md
│ │ │ │ ├── body-updates.md
│ │ │ │ ├── body.md
│ │ │ │ ├── cookie-param-models.md
│ │ │ │ ├── cookie-params.md
│ │ │ │ ├── cors.md
│ │ │ │ ├── debugging.md
│ │ │ │ ├── dependencies/
│ │ │ │ │ ├── classes-as-dependencies.md
│ │ │ │ │ ├── dependencies-in-path-operation-decorators.md
│ │ │ │ │ ├── dependencies-with-yield.md
│ │ │ │ │ ├── global-dependencies.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── sub-dependencies.md
│ │ │ │ ├── encoder.md
│ │ │ │ ├── extra-data-types.md
│ │ │ │ ├── extra-models.md
│ │ │ │ ├── first-steps.md
│ │ │ │ ├── handling-errors.md
│ │ │ │ ├── header-param-models.md
│ │ │ │ ├── header-params.md
│ │ │ │ ├── index.md
│ │ │ │ ├── metadata.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── path-operation-configuration.md
│ │ │ │ ├── path-params-numeric-validations.md
│ │ │ │ ├── path-params.md
│ │ │ │ ├── query-param-models.md
│ │ │ │ ├── query-params-str-validations.md
│ │ │ │ ├── query-params.md
│ │ │ │ ├── request-files.md
│ │ │ │ ├── request-form-models.md
│ │ │ │ ├── request-forms-and-files.md
│ │ │ │ ├── request-forms.md
│ │ │ │ ├── response-model.md
│ │ │ │ ├── response-status-code.md
│ │ │ │ ├── schema-extra-example.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── first-steps.md
│ │ │ │ │ ├── get-current-user.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ ├── oauth2-jwt.md
│ │ │ │ │ └── simple-oauth2.md
│ │ │ │ ├── server-sent-events.md
│ │ │ │ ├── sql-databases.md
│ │ │ │ ├── static-files.md
│ │ │ │ ├── stream-json-lines.md
│ │ │ │ └── testing.md
│ │ │ └── virtual-environments.md
│ │ ├── llm-prompt.md
│ │ └── mkdocs.yml
│ ├── tr/
│ │ ├── docs/
│ │ │ ├── _llm-test.md
│ │ │ ├── about/
│ │ │ │ └── index.md
│ │ │ ├── advanced/
│ │ │ │ ├── additional-responses.md
│ │ │ │ ├── additional-status-codes.md
│ │ │ │ ├── advanced-dependencies.md
│ │ │ │ ├── advanced-python-types.md
│ │ │ │ ├── async-tests.md
│ │ │ │ ├── behind-a-proxy.md
│ │ │ │ ├── custom-response.md
│ │ │ │ ├── dataclasses.md
│ │ │ │ ├── events.md
│ │ │ │ ├── generate-clients.md
│ │ │ │ ├── index.md
│ │ │ │ ├── json-base64-bytes.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── openapi-callbacks.md
│ │ │ │ ├── openapi-webhooks.md
│ │ │ │ ├── path-operation-advanced-configuration.md
│ │ │ │ ├── response-change-status-code.md
│ │ │ │ ├── response-cookies.md
│ │ │ │ ├── response-directly.md
│ │ │ │ ├── response-headers.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── http-basic-auth.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── oauth2-scopes.md
│ │ │ │ ├── settings.md
│ │ │ │ ├── stream-data.md
│ │ │ │ ├── strict-content-type.md
│ │ │ │ ├── sub-applications.md
│ │ │ │ ├── templates.md
│ │ │ │ ├── testing-dependencies.md
│ │ │ │ ├── testing-events.md
│ │ │ │ ├── testing-websockets.md
│ │ │ │ ├── using-request-directly.md
│ │ │ │ ├── websockets.md
│ │ │ │ └── wsgi.md
│ │ │ ├── alternatives.md
│ │ │ ├── async.md
│ │ │ ├── benchmarks.md
│ │ │ ├── deployment/
│ │ │ │ ├── cloud.md
│ │ │ │ ├── concepts.md
│ │ │ │ ├── docker.md
│ │ │ │ ├── fastapicloud.md
│ │ │ │ ├── https.md
│ │ │ │ ├── index.md
│ │ │ │ ├── manually.md
│ │ │ │ ├── server-workers.md
│ │ │ │ └── versions.md
│ │ │ ├── editor-support.md
│ │ │ ├── environment-variables.md
│ │ │ ├── fastapi-cli.md
│ │ │ ├── features.md
│ │ │ ├── help-fastapi.md
│ │ │ ├── history-design-future.md
│ │ │ ├── how-to/
│ │ │ │ ├── authentication-error-status-code.md
│ │ │ │ ├── conditional-openapi.md
│ │ │ │ ├── configure-swagger-ui.md
│ │ │ │ ├── custom-docs-ui-assets.md
│ │ │ │ ├── custom-request-and-route.md
│ │ │ │ ├── extending-openapi.md
│ │ │ │ ├── general.md
│ │ │ │ ├── graphql.md
│ │ │ │ ├── index.md
│ │ │ │ ├── migrate-from-pydantic-v1-to-pydantic-v2.md
│ │ │ │ ├── separate-openapi-schemas.md
│ │ │ │ └── testing-database.md
│ │ │ ├── index.md
│ │ │ ├── learn/
│ │ │ │ └── index.md
│ │ │ ├── project-generation.md
│ │ │ ├── python-types.md
│ │ │ ├── resources/
│ │ │ │ └── index.md
│ │ │ ├── translation-banner.md
│ │ │ ├── tutorial/
│ │ │ │ ├── background-tasks.md
│ │ │ │ ├── bigger-applications.md
│ │ │ │ ├── body-fields.md
│ │ │ │ ├── body-multiple-params.md
│ │ │ │ ├── body-nested-models.md
│ │ │ │ ├── body-updates.md
│ │ │ │ ├── body.md
│ │ │ │ ├── cookie-param-models.md
│ │ │ │ ├── cookie-params.md
│ │ │ │ ├── cors.md
│ │ │ │ ├── debugging.md
│ │ │ │ ├── dependencies/
│ │ │ │ │ ├── classes-as-dependencies.md
│ │ │ │ │ ├── dependencies-in-path-operation-decorators.md
│ │ │ │ │ ├── dependencies-with-yield.md
│ │ │ │ │ ├── global-dependencies.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── sub-dependencies.md
│ │ │ │ ├── encoder.md
│ │ │ │ ├── extra-data-types.md
│ │ │ │ ├── extra-models.md
│ │ │ │ ├── first-steps.md
│ │ │ │ ├── handling-errors.md
│ │ │ │ ├── header-param-models.md
│ │ │ │ ├── header-params.md
│ │ │ │ ├── index.md
│ │ │ │ ├── metadata.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── path-operation-configuration.md
│ │ │ │ ├── path-params-numeric-validations.md
│ │ │ │ ├── path-params.md
│ │ │ │ ├── query-param-models.md
│ │ │ │ ├── query-params-str-validations.md
│ │ │ │ ├── query-params.md
│ │ │ │ ├── request-files.md
│ │ │ │ ├── request-form-models.md
│ │ │ │ ├── request-forms-and-files.md
│ │ │ │ ├── request-forms.md
│ │ │ │ ├── response-model.md
│ │ │ │ ├── response-status-code.md
│ │ │ │ ├── schema-extra-example.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── first-steps.md
│ │ │ │ │ ├── get-current-user.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ ├── oauth2-jwt.md
│ │ │ │ │ └── simple-oauth2.md
│ │ │ │ ├── server-sent-events.md
│ │ │ │ ├── sql-databases.md
│ │ │ │ ├── static-files.md
│ │ │ │ ├── stream-json-lines.md
│ │ │ │ └── testing.md
│ │ │ └── virtual-environments.md
│ │ ├── llm-prompt.md
│ │ └── mkdocs.yml
│ ├── uk/
│ │ ├── docs/
│ │ │ ├── _llm-test.md
│ │ │ ├── about/
│ │ │ │ └── index.md
│ │ │ ├── advanced/
│ │ │ │ ├── additional-responses.md
│ │ │ │ ├── additional-status-codes.md
│ │ │ │ ├── advanced-dependencies.md
│ │ │ │ ├── advanced-python-types.md
│ │ │ │ ├── async-tests.md
│ │ │ │ ├── behind-a-proxy.md
│ │ │ │ ├── custom-response.md
│ │ │ │ ├── dataclasses.md
│ │ │ │ ├── events.md
│ │ │ │ ├── generate-clients.md
│ │ │ │ ├── index.md
│ │ │ │ ├── json-base64-bytes.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── openapi-callbacks.md
│ │ │ │ ├── openapi-webhooks.md
│ │ │ │ ├── path-operation-advanced-configuration.md
│ │ │ │ ├── response-change-status-code.md
│ │ │ │ ├── response-cookies.md
│ │ │ │ ├── response-directly.md
│ │ │ │ ├── response-headers.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── http-basic-auth.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── oauth2-scopes.md
│ │ │ │ ├── settings.md
│ │ │ │ ├── stream-data.md
│ │ │ │ ├── strict-content-type.md
│ │ │ │ ├── sub-applications.md
│ │ │ │ ├── templates.md
│ │ │ │ ├── testing-dependencies.md
│ │ │ │ ├── testing-events.md
│ │ │ │ ├── testing-websockets.md
│ │ │ │ ├── using-request-directly.md
│ │ │ │ ├── websockets.md
│ │ │ │ └── wsgi.md
│ │ │ ├── alternatives.md
│ │ │ ├── async.md
│ │ │ ├── benchmarks.md
│ │ │ ├── deployment/
│ │ │ │ ├── cloud.md
│ │ │ │ ├── concepts.md
│ │ │ │ ├── docker.md
│ │ │ │ ├── fastapicloud.md
│ │ │ │ ├── https.md
│ │ │ │ ├── index.md
│ │ │ │ ├── manually.md
│ │ │ │ ├── server-workers.md
│ │ │ │ └── versions.md
│ │ │ ├── editor-support.md
│ │ │ ├── environment-variables.md
│ │ │ ├── fastapi-cli.md
│ │ │ ├── features.md
│ │ │ ├── help-fastapi.md
│ │ │ ├── history-design-future.md
│ │ │ ├── how-to/
│ │ │ │ ├── authentication-error-status-code.md
│ │ │ │ ├── conditional-openapi.md
│ │ │ │ ├── configure-swagger-ui.md
│ │ │ │ ├── custom-docs-ui-assets.md
│ │ │ │ ├── custom-request-and-route.md
│ │ │ │ ├── extending-openapi.md
│ │ │ │ ├── general.md
│ │ │ │ ├── graphql.md
│ │ │ │ ├── index.md
│ │ │ │ ├── migrate-from-pydantic-v1-to-pydantic-v2.md
│ │ │ │ ├── separate-openapi-schemas.md
│ │ │ │ └── testing-database.md
│ │ │ ├── index.md
│ │ │ ├── learn/
│ │ │ │ └── index.md
│ │ │ ├── project-generation.md
│ │ │ ├── python-types.md
│ │ │ ├── resources/
│ │ │ │ └── index.md
│ │ │ ├── translation-banner.md
│ │ │ ├── tutorial/
│ │ │ │ ├── background-tasks.md
│ │ │ │ ├── bigger-applications.md
│ │ │ │ ├── body-fields.md
│ │ │ │ ├── body-multiple-params.md
│ │ │ │ ├── body-nested-models.md
│ │ │ │ ├── body-updates.md
│ │ │ │ ├── body.md
│ │ │ │ ├── cookie-param-models.md
│ │ │ │ ├── cookie-params.md
│ │ │ │ ├── cors.md
│ │ │ │ ├── debugging.md
│ │ │ │ ├── dependencies/
│ │ │ │ │ ├── classes-as-dependencies.md
│ │ │ │ │ ├── dependencies-in-path-operation-decorators.md
│ │ │ │ │ ├── dependencies-with-yield.md
│ │ │ │ │ ├── global-dependencies.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── sub-dependencies.md
│ │ │ │ ├── encoder.md
│ │ │ │ ├── extra-data-types.md
│ │ │ │ ├── extra-models.md
│ │ │ │ ├── first-steps.md
│ │ │ │ ├── handling-errors.md
│ │ │ │ ├── header-param-models.md
│ │ │ │ ├── header-params.md
│ │ │ │ ├── index.md
│ │ │ │ ├── metadata.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── path-operation-configuration.md
│ │ │ │ ├── path-params-numeric-validations.md
│ │ │ │ ├── path-params.md
│ │ │ │ ├── query-param-models.md
│ │ │ │ ├── query-params-str-validations.md
│ │ │ │ ├── query-params.md
│ │ │ │ ├── request-files.md
│ │ │ │ ├── request-form-models.md
│ │ │ │ ├── request-forms-and-files.md
│ │ │ │ ├── request-forms.md
│ │ │ │ ├── response-model.md
│ │ │ │ ├── response-status-code.md
│ │ │ │ ├── schema-extra-example.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── first-steps.md
│ │ │ │ │ ├── get-current-user.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ ├── oauth2-jwt.md
│ │ │ │ │ └── simple-oauth2.md
│ │ │ │ ├── server-sent-events.md
│ │ │ │ ├── sql-databases.md
│ │ │ │ ├── static-files.md
│ │ │ │ ├── stream-json-lines.md
│ │ │ │ └── testing.md
│ │ │ └── virtual-environments.md
│ │ ├── llm-prompt.md
│ │ └── mkdocs.yml
│ ├── zh/
│ │ ├── docs/
│ │ │ ├── _llm-test.md
│ │ │ ├── about/
│ │ │ │ └── index.md
│ │ │ ├── advanced/
│ │ │ │ ├── additional-responses.md
│ │ │ │ ├── additional-status-codes.md
│ │ │ │ ├── advanced-dependencies.md
│ │ │ │ ├── advanced-python-types.md
│ │ │ │ ├── async-tests.md
│ │ │ │ ├── behind-a-proxy.md
│ │ │ │ ├── custom-response.md
│ │ │ │ ├── dataclasses.md
│ │ │ │ ├── events.md
│ │ │ │ ├── generate-clients.md
│ │ │ │ ├── index.md
│ │ │ │ ├── json-base64-bytes.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── openapi-callbacks.md
│ │ │ │ ├── openapi-webhooks.md
│ │ │ │ ├── path-operation-advanced-configuration.md
│ │ │ │ ├── response-change-status-code.md
│ │ │ │ ├── response-cookies.md
│ │ │ │ ├── response-directly.md
│ │ │ │ ├── response-headers.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── http-basic-auth.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── oauth2-scopes.md
│ │ │ │ ├── settings.md
│ │ │ │ ├── stream-data.md
│ │ │ │ ├── strict-content-type.md
│ │ │ │ ├── sub-applications.md
│ │ │ │ ├── templates.md
│ │ │ │ ├── testing-dependencies.md
│ │ │ │ ├── testing-events.md
│ │ │ │ ├── testing-websockets.md
│ │ │ │ ├── using-request-directly.md
│ │ │ │ ├── websockets.md
│ │ │ │ └── wsgi.md
│ │ │ ├── alternatives.md
│ │ │ ├── async.md
│ │ │ ├── benchmarks.md
│ │ │ ├── deployment/
│ │ │ │ ├── cloud.md
│ │ │ │ ├── concepts.md
│ │ │ │ ├── docker.md
│ │ │ │ ├── fastapicloud.md
│ │ │ │ ├── https.md
│ │ │ │ ├── index.md
│ │ │ │ ├── manually.md
│ │ │ │ ├── server-workers.md
│ │ │ │ └── versions.md
│ │ │ ├── editor-support.md
│ │ │ ├── environment-variables.md
│ │ │ ├── fastapi-cli.md
│ │ │ ├── features.md
│ │ │ ├── help-fastapi.md
│ │ │ ├── history-design-future.md
│ │ │ ├── how-to/
│ │ │ │ ├── authentication-error-status-code.md
│ │ │ │ ├── conditional-openapi.md
│ │ │ │ ├── configure-swagger-ui.md
│ │ │ │ ├── custom-docs-ui-assets.md
│ │ │ │ ├── custom-request-and-route.md
│ │ │ │ ├── extending-openapi.md
│ │ │ │ ├── general.md
│ │ │ │ ├── graphql.md
│ │ │ │ ├── index.md
│ │ │ │ ├── migrate-from-pydantic-v1-to-pydantic-v2.md
│ │ │ │ ├── separate-openapi-schemas.md
│ │ │ │ └── testing-database.md
│ │ │ ├── index.md
│ │ │ ├── learn/
│ │ │ │ └── index.md
│ │ │ ├── project-generation.md
│ │ │ ├── python-types.md
│ │ │ ├── resources/
│ │ │ │ └── index.md
│ │ │ ├── translation-banner.md
│ │ │ ├── tutorial/
│ │ │ │ ├── background-tasks.md
│ │ │ │ ├── bigger-applications.md
│ │ │ │ ├── body-fields.md
│ │ │ │ ├── body-multiple-params.md
│ │ │ │ ├── body-nested-models.md
│ │ │ │ ├── body-updates.md
│ │ │ │ ├── body.md
│ │ │ │ ├── cookie-param-models.md
│ │ │ │ ├── cookie-params.md
│ │ │ │ ├── cors.md
│ │ │ │ ├── debugging.md
│ │ │ │ ├── dependencies/
│ │ │ │ │ ├── classes-as-dependencies.md
│ │ │ │ │ ├── dependencies-in-path-operation-decorators.md
│ │ │ │ │ ├── dependencies-with-yield.md
│ │ │ │ │ ├── global-dependencies.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ └── sub-dependencies.md
│ │ │ │ ├── encoder.md
│ │ │ │ ├── extra-data-types.md
│ │ │ │ ├── extra-models.md
│ │ │ │ ├── first-steps.md
│ │ │ │ ├── handling-errors.md
│ │ │ │ ├── header-param-models.md
│ │ │ │ ├── header-params.md
│ │ │ │ ├── index.md
│ │ │ │ ├── metadata.md
│ │ │ │ ├── middleware.md
│ │ │ │ ├── path-operation-configuration.md
│ │ │ │ ├── path-params-numeric-validations.md
│ │ │ │ ├── path-params.md
│ │ │ │ ├── query-param-models.md
│ │ │ │ ├── query-params-str-validations.md
│ │ │ │ ├── query-params.md
│ │ │ │ ├── request-files.md
│ │ │ │ ├── request-form-models.md
│ │ │ │ ├── request-forms-and-files.md
│ │ │ │ ├── request-forms.md
│ │ │ │ ├── response-model.md
│ │ │ │ ├── response-status-code.md
│ │ │ │ ├── schema-extra-example.md
│ │ │ │ ├── security/
│ │ │ │ │ ├── first-steps.md
│ │ │ │ │ ├── get-current-user.md
│ │ │ │ │ ├── index.md
│ │ │ │ │ ├── oauth2-jwt.md
│ │ │ │ │ └── simple-oauth2.md
│ │ │ │ ├── server-sent-events.md
│ │ │ │ ├── sql-databases.md
│ │ │ │ ├── static-files.md
│ │ │ │ ├── stream-json-lines.md
│ │ │ │ └── testing.md
│ │ │ └── virtual-environments.md
│ │ ├── llm-prompt.md
│ │ └── mkdocs.yml
│ └── zh-hant/
│ ├── docs/
│ │ ├── _llm-test.md
│ │ ├── about/
│ │ │ └── index.md
│ │ ├── advanced/
│ │ │ ├── additional-responses.md
│ │ │ ├── additional-status-codes.md
│ │ │ ├── advanced-dependencies.md
│ │ │ ├── advanced-python-types.md
│ │ │ ├── async-tests.md
│ │ │ ├── behind-a-proxy.md
│ │ │ ├── custom-response.md
│ │ │ ├── dataclasses.md
│ │ │ ├── events.md
│ │ │ ├── generate-clients.md
│ │ │ ├── index.md
│ │ │ ├── json-base64-bytes.md
│ │ │ ├── middleware.md
│ │ │ ├── openapi-callbacks.md
│ │ │ ├── openapi-webhooks.md
│ │ │ ├── path-operation-advanced-configuration.md
│ │ │ ├── response-change-status-code.md
│ │ │ ├── response-cookies.md
│ │ │ ├── response-directly.md
│ │ │ ├── response-headers.md
│ │ │ ├── security/
│ │ │ │ ├── http-basic-auth.md
│ │ │ │ ├── index.md
│ │ │ │ └── oauth2-scopes.md
│ │ │ ├── settings.md
│ │ │ ├── stream-data.md
│ │ │ ├── strict-content-type.md
│ │ │ ├── sub-applications.md
│ │ │ ├── templates.md
│ │ │ ├── testing-dependencies.md
│ │ │ ├── testing-events.md
│ │ │ ├── testing-websockets.md
│ │ │ ├── using-request-directly.md
│ │ │ ├── websockets.md
│ │ │ └── wsgi.md
│ │ ├── alternatives.md
│ │ ├── async.md
│ │ ├── benchmarks.md
│ │ ├── deployment/
│ │ │ ├── cloud.md
│ │ │ ├── concepts.md
│ │ │ ├── docker.md
│ │ │ ├── fastapicloud.md
│ │ │ ├── https.md
│ │ │ ├── index.md
│ │ │ ├── manually.md
│ │ │ ├── server-workers.md
│ │ │ └── versions.md
│ │ ├── editor-support.md
│ │ ├── environment-variables.md
│ │ ├── fastapi-cli.md
│ │ ├── features.md
│ │ ├── help-fastapi.md
│ │ ├── history-design-future.md
│ │ ├── how-to/
│ │ │ ├── authentication-error-status-code.md
│ │ │ ├── conditional-openapi.md
│ │ │ ├── configure-swagger-ui.md
│ │ │ ├── custom-docs-ui-assets.md
│ │ │ ├── custom-request-and-route.md
│ │ │ ├── extending-openapi.md
│ │ │ ├── general.md
│ │ │ ├── graphql.md
│ │ │ ├── index.md
│ │ │ ├── migrate-from-pydantic-v1-to-pydantic-v2.md
│ │ │ ├── separate-openapi-schemas.md
│ │ │ └── testing-database.md
│ │ ├── index.md
│ │ ├── learn/
│ │ │ └── index.md
│ │ ├── project-generation.md
│ │ ├── python-types.md
│ │ ├── resources/
│ │ │ └── index.md
│ │ ├── translation-banner.md
│ │ ├── tutorial/
│ │ │ ├── background-tasks.md
│ │ │ ├── bigger-applications.md
│ │ │ ├── body-fields.md
│ │ │ ├── body-multiple-params.md
│ │ │ ├── body-nested-models.md
│ │ │ ├── body-updates.md
│ │ │ ├── body.md
│ │ │ ├── cookie-param-models.md
│ │ │ ├── cookie-params.md
│ │ │ ├── cors.md
│ │ │ ├── debugging.md
│ │ │ ├── dependencies/
│ │ │ │ ├── classes-as-dependencies.md
│ │ │ │ ├── dependencies-in-path-operation-decorators.md
│ │ │ │ ├── dependencies-with-yield.md
│ │ │ │ ├── global-dependencies.md
│ │ │ │ ├── index.md
│ │ │ │ └── sub-dependencies.md
│ │ │ ├── encoder.md
│ │ │ ├── extra-data-types.md
│ │ │ ├── extra-models.md
│ │ │ ├── first-steps.md
│ │ │ ├── handling-errors.md
│ │ │ ├── header-param-models.md
│ │ │ ├── header-params.md
│ │ │ ├── index.md
│ │ │ ├── metadata.md
│ │ │ ├── middleware.md
│ │ │ ├── path-operation-configuration.md
│ │ │ ├── path-params-numeric-validations.md
│ │ │ ├── path-params.md
│ │ │ ├── query-param-models.md
│ │ │ ├── query-params-str-validations.md
│ │ │ ├── query-params.md
│ │ │ ├── request-files.md
│ │ │ ├── request-form-models.md
│ │ │ ├── request-forms-and-files.md
│ │ │ ├── request-forms.md
│ │ │ ├── response-model.md
│ │ │ ├── response-status-code.md
│ │ │ ├── schema-extra-example.md
│ │ │ ├── security/
│ │ │ │ ├── first-steps.md
│ │ │ │ ├── get-current-user.md
│ │ │ │ ├── index.md
│ │ │ │ ├── oauth2-jwt.md
│ │ │ │ └── simple-oauth2.md
│ │ │ ├── server-sent-events.md
│ │ │ ├── sql-databases.md
│ │ │ ├── static-files.md
│ │ │ ├── stream-json-lines.md
│ │ │ └── testing.md
│ │ └── virtual-environments.md
│ ├── llm-prompt.md
│ └── mkdocs.yml
├── docs_src/
│ ├── additional_responses/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ └── tutorial004_py310.py
│ ├── additional_status_codes/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ └── tutorial001_py310.py
│ ├── advanced_middleware/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ └── tutorial003_py310.py
│ ├── app_testing/
│ │ ├── __init__.py
│ │ ├── app_a_py310/
│ │ │ ├── __init__.py
│ │ │ ├── main.py
│ │ │ └── test_main.py
│ │ ├── app_b_an_py310/
│ │ │ ├── __init__.py
│ │ │ ├── main.py
│ │ │ └── test_main.py
│ │ ├── app_b_py310/
│ │ │ ├── __init__.py
│ │ │ ├── main.py
│ │ │ └── test_main.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ └── tutorial004_py310.py
│ ├── async_tests/
│ │ ├── __init__.py
│ │ └── app_a_py310/
│ │ ├── __init__.py
│ │ ├── main.py
│ │ └── test_main.py
│ ├── authentication_error_status_code/
│ │ ├── __init__.py
│ │ └── tutorial001_an_py310.py
│ ├── background_tasks/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ └── tutorial002_py310.py
│ ├── behind_a_proxy/
│ │ ├── __init__.py
│ │ ├── tutorial001_01_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ └── tutorial004_py310.py
│ ├── bigger_applications/
│ │ ├── __init__.py
│ │ └── app_an_py310/
│ │ ├── __init__.py
│ │ ├── dependencies.py
│ │ ├── internal/
│ │ │ ├── __init__.py
│ │ │ └── admin.py
│ │ ├── main.py
│ │ └── routers/
│ │ ├── __init__.py
│ │ ├── items.py
│ │ └── users.py
│ ├── body/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ └── tutorial004_py310.py
│ ├── body_fields/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ └── tutorial001_py310.py
│ ├── body_multiple_params/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_an_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_an_py310.py
│ │ ├── tutorial004_py310.py
│ │ ├── tutorial005_an_py310.py
│ │ └── tutorial005_py310.py
│ ├── body_nested_models/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_py310.py
│ │ ├── tutorial005_py310.py
│ │ ├── tutorial006_py310.py
│ │ ├── tutorial007_py310.py
│ │ ├── tutorial008_py310.py
│ │ └── tutorial009_py310.py
│ ├── body_updates/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ └── tutorial002_py310.py
│ ├── conditional_openapi/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── configure_swagger_ui/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ └── tutorial003_py310.py
│ ├── cookie_param_models/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ └── tutorial002_py310.py
│ ├── cookie_params/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ └── tutorial001_py310.py
│ ├── cors/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── custom_docs_ui/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ └── tutorial002_py310.py
│ ├── custom_request_and_route/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ ├── tutorial002_py310.py
│ │ └── tutorial003_py310.py
│ ├── custom_response/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial001b_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_py310.py
│ │ ├── tutorial005_py310.py
│ │ ├── tutorial006_py310.py
│ │ ├── tutorial006b_py310.py
│ │ ├── tutorial006c_py310.py
│ │ ├── tutorial007_py310.py
│ │ ├── tutorial008_py310.py
│ │ ├── tutorial009_py310.py
│ │ ├── tutorial009b_py310.py
│ │ ├── tutorial009c_py310.py
│ │ └── tutorial010_py310.py
│ ├── dataclasses_/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ └── tutorial003_py310.py
│ ├── debugging/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── dependencies/
│ │ ├── __init__.py
│ │ ├── tutorial001_02_an_py310.py
│ │ ├── tutorial001_an_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_an_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_an_py310.py
│ │ ├── tutorial004_py310.py
│ │ ├── tutorial005_an_py310.py
│ │ ├── tutorial005_py310.py
│ │ ├── tutorial006_an_py310.py
│ │ ├── tutorial006_py310.py
│ │ ├── tutorial007_py310.py
│ │ ├── tutorial008_an_py310.py
│ │ ├── tutorial008_py310.py
│ │ ├── tutorial008b_an_py310.py
│ │ ├── tutorial008b_py310.py
│ │ ├── tutorial008c_an_py310.py
│ │ ├── tutorial008c_py310.py
│ │ ├── tutorial008d_an_py310.py
│ │ ├── tutorial008d_py310.py
│ │ ├── tutorial008e_an_py310.py
│ │ ├── tutorial008e_py310.py
│ │ ├── tutorial010_py310.py
│ │ ├── tutorial011_an_py310.py
│ │ ├── tutorial011_py310.py
│ │ ├── tutorial012_an_py310.py
│ │ ├── tutorial012_py310.py
│ │ ├── tutorial013_an_py310.py
│ │ └── tutorial014_an_py310.py
│ ├── dependency_testing/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ └── tutorial001_py310.py
│ ├── encoder/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── events/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ └── tutorial003_py310.py
│ ├── extending_openapi/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── extra_data_types/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ └── tutorial001_py310.py
│ ├── extra_models/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_py310.py
│ │ └── tutorial005_py310.py
│ ├── first_steps/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ └── tutorial003_py310.py
│ ├── generate_clients/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004.js
│ │ └── tutorial004_py310.py
│ ├── graphql_/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── handling_errors/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_py310.py
│ │ ├── tutorial005_py310.py
│ │ └── tutorial006_py310.py
│ ├── header_param_models/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_an_py310.py
│ │ └── tutorial003_py310.py
│ ├── header_params/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_an_py310.py
│ │ └── tutorial003_py310.py
│ ├── json_base64_bytes/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── metadata/
│ │ ├── __init__.py
│ │ ├── tutorial001_1_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ └── tutorial004_py310.py
│ ├── middleware/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── openapi_callbacks/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── openapi_webhooks/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── path_operation_advanced_configuration/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_py310.py
│ │ ├── tutorial005_py310.py
│ │ ├── tutorial006_py310.py
│ │ └── tutorial007_py310.py
│ ├── path_operation_configuration/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial002b_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_py310.py
│ │ ├── tutorial005_py310.py
│ │ └── tutorial006_py310.py
│ ├── path_params/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial003b_py310.py
│ │ ├── tutorial004_py310.py
│ │ └── tutorial005_py310.py
│ ├── path_params_numeric_validations/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_an_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_an_py310.py
│ │ ├── tutorial004_py310.py
│ │ ├── tutorial005_an_py310.py
│ │ ├── tutorial005_py310.py
│ │ ├── tutorial006_an_py310.py
│ │ └── tutorial006_py310.py
│ ├── pydantic_v1_in_v2/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ ├── tutorial003_an_py310.py
│ │ └── tutorial004_an_py310.py
│ ├── python_types/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_py310.py
│ │ ├── tutorial005_py310.py
│ │ ├── tutorial006_py310.py
│ │ ├── tutorial007_py310.py
│ │ ├── tutorial008_py310.py
│ │ ├── tutorial008b_py310.py
│ │ ├── tutorial009_py310.py
│ │ ├── tutorial010_py310.py
│ │ ├── tutorial011_py310.py
│ │ └── tutorial013_py310.py
│ ├── query_param_models/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ └── tutorial002_py310.py
│ ├── query_params/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_py310.py
│ │ ├── tutorial005_py310.py
│ │ └── tutorial006_py310.py
│ ├── query_params_str_validations/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_an_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_an_py310.py
│ │ ├── tutorial004_py310.py
│ │ ├── tutorial005_an_py310.py
│ │ ├── tutorial005_py310.py
│ │ ├── tutorial006_an_py310.py
│ │ ├── tutorial006_py310.py
│ │ ├── tutorial006c_an_py310.py
│ │ ├── tutorial006c_py310.py
│ │ ├── tutorial007_an_py310.py
│ │ ├── tutorial007_py310.py
│ │ ├── tutorial008_an_py310.py
│ │ ├── tutorial008_py310.py
│ │ ├── tutorial009_an_py310.py
│ │ ├── tutorial009_py310.py
│ │ ├── tutorial010_an_py310.py
│ │ ├── tutorial010_py310.py
│ │ ├── tutorial011_an_py310.py
│ │ ├── tutorial011_py310.py
│ │ ├── tutorial012_an_py310.py
│ │ ├── tutorial012_py310.py
│ │ ├── tutorial013_an_py310.py
│ │ ├── tutorial013_py310.py
│ │ ├── tutorial014_an_py310.py
│ │ ├── tutorial014_py310.py
│ │ └── tutorial015_an_py310.py
│ ├── request_files/
│ │ ├── __init__.py
│ │ ├── tutorial001_02_an_py310.py
│ │ ├── tutorial001_02_py310.py
│ │ ├── tutorial001_03_an_py310.py
│ │ ├── tutorial001_03_py310.py
│ │ ├── tutorial001_an_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_an_py310.py
│ │ └── tutorial003_py310.py
│ ├── request_form_models/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ └── tutorial002_py310.py
│ ├── request_forms/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ └── tutorial001_py310.py
│ ├── request_forms_and_files/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ └── tutorial001_py310.py
│ ├── response_change_status_code/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── response_cookies/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ └── tutorial002_py310.py
│ ├── response_directly/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ └── tutorial002_py310.py
│ ├── response_headers/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ └── tutorial002_py310.py
│ ├── response_model/
│ │ ├── __init__.py
│ │ ├── tutorial001_01_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_01_py310.py
│ │ ├── tutorial003_02_py310.py
│ │ ├── tutorial003_03_py310.py
│ │ ├── tutorial003_04_py310.py
│ │ ├── tutorial003_05_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_py310.py
│ │ ├── tutorial005_py310.py
│ │ └── tutorial006_py310.py
│ ├── response_status_code/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ └── tutorial002_py310.py
│ ├── schema_extra_example/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_an_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_an_py310.py
│ │ ├── tutorial004_py310.py
│ │ ├── tutorial005_an_py310.py
│ │ └── tutorial005_py310.py
│ ├── security/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_an_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_an_py310.py
│ │ ├── tutorial004_py310.py
│ │ ├── tutorial005_an_py310.py
│ │ ├── tutorial005_py310.py
│ │ ├── tutorial006_an_py310.py
│ │ ├── tutorial006_py310.py
│ │ ├── tutorial007_an_py310.py
│ │ └── tutorial007_py310.py
│ ├── separate_openapi_schemas/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ └── tutorial002_py310.py
│ ├── server_sent_events/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_py310.py
│ │ ├── tutorial003_py310.py
│ │ ├── tutorial004_py310.py
│ │ └── tutorial005_py310.py
│ ├── settings/
│ │ ├── __init__.py
│ │ ├── app01_py310/
│ │ │ ├── __init__.py
│ │ │ ├── config.py
│ │ │ └── main.py
│ │ ├── app02_an_py310/
│ │ │ ├── __init__.py
│ │ │ ├── config.py
│ │ │ ├── main.py
│ │ │ └── test_main.py
│ │ ├── app02_py310/
│ │ │ ├── __init__.py
│ │ │ ├── config.py
│ │ │ ├── main.py
│ │ │ └── test_main.py
│ │ ├── app03_an_py310/
│ │ │ ├── __init__.py
│ │ │ ├── config.py
│ │ │ └── main.py
│ │ ├── app03_py310/
│ │ │ ├── __init__.py
│ │ │ ├── config.py
│ │ │ └── main.py
│ │ └── tutorial001_py310.py
│ ├── sql_databases/
│ │ ├── __init__.py
│ │ ├── tutorial001_an_py310.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ └── tutorial002_py310.py
│ ├── static_files/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── stream_data/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ └── tutorial002_py310.py
│ ├── stream_json_lines/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── strict_content_type/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── sub_applications/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── templates/
│ │ ├── __init__.py
│ │ ├── static/
│ │ │ ├── __init__.py
│ │ │ └── styles.css
│ │ ├── templates/
│ │ │ ├── __init__.py
│ │ │ └── item.html
│ │ └── tutorial001_py310.py
│ ├── using_request_directly/
│ │ ├── __init__.py
│ │ └── tutorial001_py310.py
│ ├── websockets_/
│ │ ├── __init__.py
│ │ ├── tutorial001_py310.py
│ │ ├── tutorial002_an_py310.py
│ │ ├── tutorial002_py310.py
│ │ └── tutorial003_py310.py
│ └── wsgi/
│ ├── __init__.py
│ └── tutorial001_py310.py
├── fastapi/
│ ├── .agents/
│ │ └── skills/
│ │ └── fastapi/
│ │ ├── SKILL.md
│ │ └── references/
│ │ ├── dependencies.md
│ │ ├── other-tools.md
│ │ └── streaming.md
│ ├── __init__.py
│ ├── __main__.py
│ ├── _compat/
│ │ ├── __init__.py
│ │ ├── shared.py
│ │ └── v2.py
│ ├── applications.py
│ ├── background.py
│ ├── cli.py
│ ├── concurrency.py
│ ├── datastructures.py
│ ├── dependencies/
│ │ ├── __init__.py
│ │ ├── models.py
│ │ └── utils.py
│ ├── encoders.py
│ ├── exception_handlers.py
│ ├── exceptions.py
│ ├── logger.py
│ ├── middleware/
│ │ ├── __init__.py
│ │ ├── asyncexitstack.py
│ │ ├── cors.py
│ │ ├── gzip.py
│ │ ├── httpsredirect.py
│ │ ├── trustedhost.py
│ │ └── wsgi.py
│ ├── openapi/
│ │ ├── __init__.py
│ │ ├── constants.py
│ │ ├── docs.py
│ │ ├── models.py
│ │ └── utils.py
│ ├── param_functions.py
│ ├── params.py
│ ├── py.typed
│ ├── requests.py
│ ├── responses.py
│ ├── routing.py
│ ├── security/
│ │ ├── __init__.py
│ │ ├── api_key.py
│ │ ├── base.py
│ │ ├── http.py
│ │ ├── oauth2.py
│ │ ├── open_id_connect_url.py
│ │ └── utils.py
│ ├── sse.py
│ ├── staticfiles.py
│ ├── templating.py
│ ├── testclient.py
│ ├── types.py
│ ├── utils.py
│ └── websockets.py
├── fastapi-slim/
│ └── README.md
├── pyproject.toml
├── scripts/
│ ├── add_latest_release_date.py
│ ├── contributors.py
│ ├── coverage.sh
│ ├── deploy_docs_status.py
│ ├── doc_parsing_utils.py
│ ├── docs.py
│ ├── format.sh
│ ├── general-llm-prompt.md
│ ├── label_approved.py
│ ├── lint.sh
│ ├── mkdocs_hooks.py
│ ├── notify_translations.py
│ ├── people.py
│ ├── playwright/
│ │ ├── cookie_param_models/
│ │ │ └── image01.py
│ │ ├── header_param_models/
│ │ │ └── image01.py
│ │ ├── json_base64_bytes/
│ │ │ └── image01.py
│ │ ├── query_param_models/
│ │ │ └── image01.py
│ │ ├── request_form_models/
│ │ │ └── image01.py
│ │ ├── separate_openapi_schemas/
│ │ │ ├── image01.py
│ │ │ ├── image02.py
│ │ │ ├── image03.py
│ │ │ ├── image04.py
│ │ │ └── image05.py
│ │ └── sql_databases/
│ │ ├── image01.py
│ │ └── image02.py
│ ├── sponsors.py
│ ├── test-cov-html.sh
│ ├── test-cov.sh
│ ├── test.sh
│ ├── tests/
│ │ └── test_translation_fixer/
│ │ ├── conftest.py
│ │ ├── test_code_blocks/
│ │ │ ├── data/
│ │ │ │ ├── en_doc.md
│ │ │ │ ├── translated_doc_lines_number_gt.md
│ │ │ │ ├── translated_doc_lines_number_lt.md
│ │ │ │ ├── translated_doc_mermaid_not_translated.md
│ │ │ │ ├── translated_doc_mermaid_translated.md
│ │ │ │ ├── translated_doc_number_gt.md
│ │ │ │ ├── translated_doc_number_lt.md
│ │ │ │ ├── translated_doc_wrong_lang_code.md
│ │ │ │ └── translated_doc_wrong_lang_code_2.md
│ │ │ ├── test_code_blocks_lines_number_mismatch.py
│ │ │ ├── test_code_blocks_mermaid.py
│ │ │ ├── test_code_blocks_number_mismatch.py
│ │ │ └── test_code_blocks_wrong_lang_code.py
│ │ ├── test_code_includes/
│ │ │ ├── data/
│ │ │ │ ├── en_doc.md
│ │ │ │ ├── translated_doc_number_gt.md
│ │ │ │ └── translated_doc_number_lt.md
│ │ │ └── test_number_mismatch.py
│ │ ├── test_complex_doc/
│ │ │ ├── data/
│ │ │ │ ├── en_doc.md
│ │ │ │ ├── translated_doc.md
│ │ │ │ └── translated_doc_expected.md
│ │ │ └── test_compex_doc.py
│ │ ├── test_header_permalinks/
│ │ │ ├── data/
│ │ │ │ ├── en_doc.md
│ │ │ │ ├── translated_doc_level_mismatch_1.md
│ │ │ │ ├── translated_doc_level_mismatch_2.md
│ │ │ │ ├── translated_doc_number_gt.md
│ │ │ │ └── translated_doc_number_lt.md
│ │ │ ├── test_header_level_mismatch.py
│ │ │ └── test_header_number_mismatch.py
│ │ ├── test_html_links/
│ │ │ ├── data/
│ │ │ │ ├── en_doc.md
│ │ │ │ ├── translated_doc_number_gt.md
│ │ │ │ └── translated_doc_number_lt.md
│ │ │ └── test_html_links_number_mismatch.py
│ │ └── test_markdown_links/
│ │ ├── data/
│ │ │ ├── en_doc.md
│ │ │ ├── translated_doc.md
│ │ │ ├── translated_doc_number_gt.md
│ │ │ └── translated_doc_number_lt.md
│ │ └── test_mkd_links_number_mismatch.py
│ ├── topic_repos.py
│ ├── translate.py
│ └── translation_fixer.py
└── tests/
├── __init__.py
├── benchmarks/
│ ├── __init__.py
│ └── test_general_performance.py
├── forward_reference_type.py
├── main.py
├── test_additional_properties.py
├── test_additional_properties_bool.py
├── test_additional_response_extra.py
├── test_additional_responses_bad.py
├── test_additional_responses_custom_model_in_callback.py
├── test_additional_responses_custom_validationerror.py
├── test_additional_responses_default_validationerror.py
├── test_additional_responses_response_class.py
├── test_additional_responses_router.py
├── test_additional_responses_union_duplicate_anyof.py
├── test_allow_inf_nan_in_enforcing.py
├── test_ambiguous_params.py
├── test_annotated.py
├── test_application.py
├── test_arbitrary_types.py
├── test_callable_endpoint.py
├── test_compat.py
├── test_computed_fields.py
├── test_custom_middleware_exception.py
├── test_custom_route_class.py
├── test_custom_schema_fields.py
├── test_custom_swagger_ui_redirect.py
├── test_datastructures.py
├── test_datetime_custom_encoder.py
├── test_default_response_class.py
├── test_default_response_class_router.py
├── test_dependencies_utils.py
├── test_dependency_after_yield_raise.py
├── test_dependency_after_yield_streaming.py
├── test_dependency_after_yield_websockets.py
├── test_dependency_cache.py
├── test_dependency_class.py
├── test_dependency_contextmanager.py
├── test_dependency_contextvars.py
├── test_dependency_duplicates.py
├── test_dependency_overrides.py
├── test_dependency_paramless.py
├── test_dependency_partial.py
├── test_dependency_pep695.py
├── test_dependency_security_overrides.py
├── test_dependency_wrapped.py
├── test_dependency_yield_except_httpexception.py
├── test_dependency_yield_scope.py
├── test_dependency_yield_scope_websockets.py
├── test_depends_hashable.py
├── test_deprecated_openapi_prefix.py
├── test_deprecated_responses.py
├── test_dump_json_fast_path.py
├── test_duplicate_models_openapi.py
├── test_empty_router.py
├── test_enforce_once_required_parameter.py
├── test_exception_handlers.py
├── test_extra_routes.py
├── test_fastapi_cli.py
├── test_file_and_form_order_issue_9116.py
├── test_filter_pydantic_sub_model_pv2.py
├── test_form_default.py
├── test_forms_from_non_typing_sequences.py
├── test_forms_single_model.py
├── test_forms_single_param.py
├── test_generate_unique_id_function.py
├── test_generic_parameterless_depends.py
├── test_get_model_definitions_formfeed_escape.py
├── test_get_request_body.py
├── test_http_connection_injection.py
├── test_include_route.py
├── test_include_router_defaults_overrides.py
├── test_infer_param_optionality.py
├── test_inherited_custom_class.py
├── test_invalid_path_param.py
├── test_invalid_sequence_param.py
├── test_json_type.py
├── test_jsonable_encoder.py
├── test_list_bytes_file_order_preserved_issue_14811.py
├── test_local_docs.py
├── test_modules_same_name_body/
│ ├── __init__.py
│ ├── app/
│ │ ├── __init__.py
│ │ ├── a.py
│ │ ├── b.py
│ │ └── main.py
│ └── test_main.py
├── test_multi_body_errors.py
├── test_multi_query_errors.py
├── test_multipart_installation.py
├── test_no_schema_split.py
├── test_no_swagger_ui_redirect.py
├── test_openapi_cache_root_path.py
├── test_openapi_examples.py
├── test_openapi_model_description_trim_on_formfeed.py
├── test_openapi_query_parameter_extension.py
├── test_openapi_route_extensions.py
├── test_openapi_schema_type.py
├── test_openapi_separate_input_output_schemas.py
├── test_openapi_servers.py
├── test_operations_signatures.py
├── test_optional_file_list.py
├── test_orjson_response_class.py
├── test_param_class.py
├── test_param_in_path_and_dependency.py
├── test_param_include_in_schema.py
├── test_params_repr.py
├── test_path.py
├── test_put_no_body.py
├── test_pydantic_v1_error.py
├── test_pydanticv2_dataclasses_uuid_stringified_annotations.py
├── test_query.py
├── test_query_cookie_header_model_extra_params.py
├── test_read_with_orm_mode.py
├── test_regex_deprecated_body.py
├── test_regex_deprecated_params.py
├── test_repeated_cookie_headers.py
├── test_repeated_dependency_schema.py
├── test_repeated_parameter_alias.py
├── test_request_body_parameters_media_type.py
├── test_request_param_model_by_alias.py
├── test_request_params/
│ ├── __init__.py
│ ├── test_body/
│ │ ├── __init__.py
│ │ ├── test_list.py
│ │ ├── test_optional_list.py
│ │ ├── test_optional_str.py
│ │ ├── test_required_str.py
│ │ └── utils.py
│ ├── test_cookie/
│ │ ├── __init__.py
│ │ ├── test_list.py
│ │ ├── test_optional_list.py
│ │ ├── test_optional_str.py
│ │ └── test_required_str.py
│ ├── test_file/
│ │ ├── __init__.py
│ │ ├── test_list.py
│ │ ├── test_optional.py
│ │ ├── test_optional_list.py
│ │ ├── test_required.py
│ │ └── utils.py
│ ├── test_form/
│ │ ├── __init__.py
│ │ ├── test_list.py
│ │ ├── test_optional_list.py
│ │ ├── test_optional_str.py
│ │ ├── test_required_str.py
│ │ └── utils.py
│ ├── test_header/
│ │ ├── __init__.py
│ │ ├── test_list.py
│ │ ├── test_optional_list.py
│ │ ├── test_optional_str.py
│ │ └── test_required_str.py
│ ├── test_path/
│ │ ├── __init__.py
│ │ ├── test_list.py
│ │ ├── test_optional_list.py
│ │ ├── test_optional_str.py
│ │ └── test_required_str.py
│ └── test_query/
│ ├── __init__.py
│ ├── test_list.py
│ ├── test_optional_list.py
│ ├── test_optional_str.py
│ └── test_required_str.py
├── test_required_noneable.py
├── test_response_by_alias.py
├── test_response_change_status_code.py
├── test_response_class_no_mediatype.py
├── test_response_code_no_body.py
├── test_response_dependency.py
├── test_response_model_as_return_annotation.py
├── test_response_model_data_filter.py
├── test_response_model_data_filter_no_inheritance.py
├── test_response_model_default_factory.py
├── test_response_model_include_exclude.py
├── test_response_model_invalid.py
├── test_response_model_sub_types.py
├── test_response_set_response_code_empty.py
├── test_return_none_stringified_annotations.py
├── test_route_scope.py
├── test_router_circular_import.py
├── test_router_events.py
├── test_router_prefix_with_template.py
├── test_router_redirect_slashes.py
├── test_schema_compat_pydantic_v2.py
├── test_schema_extra_examples.py
├── test_schema_ref_pydantic_v2.py
├── test_security_api_key_cookie.py
├── test_security_api_key_cookie_description.py
├── test_security_api_key_cookie_optional.py
├── test_security_api_key_header.py
├── test_security_api_key_header_description.py
├── test_security_api_key_header_optional.py
├── test_security_api_key_query.py
├── test_security_api_key_query_description.py
├── test_security_api_key_query_optional.py
├── test_security_http_base.py
├── test_security_http_base_description.py
├── test_security_http_base_optional.py
├── test_security_http_basic_optional.py
├── test_security_http_basic_realm.py
├── test_security_http_basic_realm_description.py
├── test_security_http_bearer.py
├── test_security_http_bearer_description.py
├── test_security_http_bearer_optional.py
├── test_security_http_digest.py
├── test_security_http_digest_description.py
├── test_security_http_digest_optional.py
├── test_security_oauth2.py
├── test_security_oauth2_authorization_code_bearer.py
├── test_security_oauth2_authorization_code_bearer_description.py
├── test_security_oauth2_authorization_code_bearer_scopes_openapi.py
├── test_security_oauth2_authorization_code_bearer_scopes_openapi_simple.py
├── test_security_oauth2_optional.py
├── test_security_oauth2_optional_description.py
├── test_security_oauth2_password_bearer_optional.py
├── test_security_oauth2_password_bearer_optional_description.py
├── test_security_openid_connect.py
├── test_security_openid_connect_description.py
├── test_security_openid_connect_optional.py
├── test_security_scopes.py
├── test_security_scopes_dont_propagate.py
├── test_security_scopes_sub_dependency.py
├── test_serialize_response.py
├── test_serialize_response_dataclass.py
├── test_serialize_response_model.py
├── test_skip_defaults.py
├── test_sse.py
├── test_starlette_exception.py
├── test_starlette_urlconvertors.py
├── test_stream_bare_type.py
├── test_stream_cancellation.py
├── test_stream_json_validation_error.py
├── test_strict_content_type_app_level.py
├── test_strict_content_type_nested.py
├── test_strict_content_type_router_level.py
├── test_stringified_annotation_dependency.py
├── test_stringified_annotation_dependency_py314.py
├── test_stringified_annotations_simple.py
├── test_sub_callbacks.py
├── test_swagger_ui_escape.py
├── test_swagger_ui_init_oauth.py
├── test_top_level_security_scheme_in_openapi.py
├── test_tuples.py
├── test_tutorial/
│ ├── __init__.py
│ ├── test_additional_responses/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ └── test_tutorial004.py
│ ├── test_additional_status_codes/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_advanced_middleware/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ └── test_tutorial003.py
│ ├── test_async_tests/
│ │ ├── __init__.py
│ │ └── test_main_a.py
│ ├── test_authentication_error_status_code/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_background_tasks/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ └── test_tutorial002.py
│ ├── test_behind_a_proxy/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial001_01.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ └── test_tutorial004.py
│ ├── test_bigger_applications/
│ │ ├── __init__.py
│ │ └── test_main.py
│ ├── test_body/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ └── test_tutorial004.py
│ ├── test_body_fields/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_body_multiple_params/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ ├── test_tutorial004.py
│ │ └── test_tutorial005.py
│ ├── test_body_nested_models/
│ │ ├── __init__.py
│ │ ├── test_tutorial001_tutorial002_tutorial003.py
│ │ ├── test_tutorial004.py
│ │ ├── test_tutorial005.py
│ │ ├── test_tutorial006.py
│ │ ├── test_tutorial007.py
│ │ ├── test_tutorial008.py
│ │ └── test_tutorial009.py
│ ├── test_body_updates/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ └── test_tutorial002.py
│ ├── test_conditional_openapi/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_configure_swagger_ui/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ └── test_tutorial003.py
│ ├── test_cookie_param_models/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ └── test_tutorial002.py
│ ├── test_cookie_params/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_cors/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_custom_docs_ui/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ └── test_tutorial002.py
│ ├── test_custom_request_and_route/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ └── test_tutorial003.py
│ ├── test_custom_response/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial001b.py
│ │ ├── test_tutorial002_tutorial003_tutorial004.py
│ │ ├── test_tutorial005.py
│ │ ├── test_tutorial006.py
│ │ ├── test_tutorial006b.py
│ │ ├── test_tutorial006c.py
│ │ ├── test_tutorial007.py
│ │ ├── test_tutorial008.py
│ │ ├── test_tutorial009.py
│ │ ├── test_tutorial009b.py
│ │ ├── test_tutorial009c.py
│ │ └── test_tutorial010.py
│ ├── test_dataclasses/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ └── test_tutorial003.py
│ ├── test_debugging/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_dependencies/
│ │ ├── __init__.py
│ │ ├── test_tutorial001_tutorial001_02.py
│ │ ├── test_tutorial002_tutorial003_tutorial004.py
│ │ ├── test_tutorial005.py
│ │ ├── test_tutorial006.py
│ │ ├── test_tutorial007.py
│ │ ├── test_tutorial008.py
│ │ ├── test_tutorial008b.py
│ │ ├── test_tutorial008c.py
│ │ ├── test_tutorial008d.py
│ │ ├── test_tutorial008e.py
│ │ ├── test_tutorial010.py
│ │ ├── test_tutorial011.py
│ │ └── test_tutorial012.py
│ ├── test_encoder/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_events/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ └── test_tutorial003.py
│ ├── test_extending_openapi/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_extra_data_types/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_extra_models/
│ │ ├── __init__.py
│ │ ├── test_tutorial001_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ ├── test_tutorial004.py
│ │ └── test_tutorial005.py
│ ├── test_first_steps/
│ │ ├── __init__.py
│ │ └── test_tutorial001_tutorial002_tutorial003.py
│ ├── test_generate_clients/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ └── test_tutorial004.py
│ ├── test_graphql/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_handling_errors/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ ├── test_tutorial004.py
│ │ ├── test_tutorial005.py
│ │ └── test_tutorial006.py
│ ├── test_header_param_models/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ └── test_tutorial003.py
│ ├── test_header_params/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ └── test_tutorial003.py
│ ├── test_json_base64_bytes/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_metadata/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial001_1.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ └── test_tutorial004.py
│ ├── test_middleware/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_openapi_callbacks/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_openapi_webhooks/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_path_operation_advanced_configurations/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ ├── test_tutorial004.py
│ │ ├── test_tutorial005.py
│ │ ├── test_tutorial006.py
│ │ └── test_tutorial007.py
│ ├── test_path_operation_configurations/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial002b.py
│ │ ├── test_tutorial003_tutorial004.py
│ │ ├── test_tutorial005.py
│ │ └── test_tutorial006.py
│ ├── test_path_params/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ ├── test_tutorial003b.py
│ │ ├── test_tutorial004.py
│ │ └── test_tutorial005.py
│ ├── test_path_params_numeric_validations/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002_tutorial003.py
│ │ ├── test_tutorial004.py
│ │ ├── test_tutorial005.py
│ │ └── test_tutorial006.py
│ ├── test_python_types/
│ │ ├── __init__.py
│ │ ├── test_tutorial001_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ ├── test_tutorial004.py
│ │ ├── test_tutorial005.py
│ │ ├── test_tutorial006.py
│ │ ├── test_tutorial007.py
│ │ ├── test_tutorial008.py
│ │ ├── test_tutorial008b.py
│ │ ├── test_tutorial009_tutorial009b.py
│ │ ├── test_tutorial010.py
│ │ ├── test_tutorial011.py
│ │ └── test_tutorial013.py
│ ├── test_query_param_models/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ └── test_tutorial002.py
│ ├── test_query_params/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ ├── test_tutorial004.py
│ │ ├── test_tutorial005.py
│ │ └── test_tutorial006.py
│ ├── test_query_params_str_validations/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ ├── test_tutorial004.py
│ │ ├── test_tutorial005.py
│ │ ├── test_tutorial006.py
│ │ ├── test_tutorial006c.py
│ │ ├── test_tutorial007.py
│ │ ├── test_tutorial008.py
│ │ ├── test_tutorial009.py
│ │ ├── test_tutorial010.py
│ │ ├── test_tutorial011.py
│ │ ├── test_tutorial012.py
│ │ ├── test_tutorial013.py
│ │ ├── test_tutorial014.py
│ │ └── test_tutorial015.py
│ ├── test_request_files/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial001_02.py
│ │ ├── test_tutorial001_03.py
│ │ ├── test_tutorial002.py
│ │ └── test_tutorial003.py
│ ├── test_request_form_models/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ └── test_tutorial002.py
│ ├── test_request_forms/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_request_forms_and_files/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_response_change_status_code/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_response_cookies/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ └── test_tutorial002.py
│ ├── test_response_directly/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ └── test_tutorial002.py
│ ├── test_response_headers/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ └── test_tutorial002.py
│ ├── test_response_model/
│ │ ├── __init__.py
│ │ ├── test_tutorial001_tutorial001_01.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ ├── test_tutorial003_01.py
│ │ ├── test_tutorial003_02.py
│ │ ├── test_tutorial003_03.py
│ │ ├── test_tutorial003_04.py
│ │ ├── test_tutorial003_05.py
│ │ ├── test_tutorial004.py
│ │ ├── test_tutorial005.py
│ │ └── test_tutorial006.py
│ ├── test_response_status_code/
│ │ ├── __init__.py
│ │ └── test_tutorial001_tutorial002.py
│ ├── test_schema_extra_example/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ ├── test_tutorial004.py
│ │ └── test_tutorial005.py
│ ├── test_security/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ ├── test_tutorial004.py
│ │ ├── test_tutorial005.py
│ │ ├── test_tutorial006.py
│ │ └── test_tutorial007.py
│ ├── test_separate_openapi_schemas/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ └── test_tutorial002.py
│ ├── test_server_sent_events/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ ├── test_tutorial004.py
│ │ └── test_tutorial005.py
│ ├── test_settings/
│ │ ├── __init__.py
│ │ ├── test_app01.py
│ │ ├── test_app02.py
│ │ ├── test_app03.py
│ │ └── test_tutorial001.py
│ ├── test_sql_databases/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ └── test_tutorial002.py
│ ├── test_static_files/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_stream_data/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ └── test_tutorial002.py
│ ├── test_stream_json_lines/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_strict_content_type/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_sub_applications/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_templates/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_testing/
│ │ ├── __init__.py
│ │ ├── test_main_a.py
│ │ ├── test_main_b.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ ├── test_tutorial003.py
│ │ └── test_tutorial004.py
│ ├── test_testing_dependencies/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_using_request_directly/
│ │ ├── __init__.py
│ │ └── test_tutorial001.py
│ ├── test_websockets/
│ │ ├── __init__.py
│ │ ├── test_tutorial001.py
│ │ ├── test_tutorial002.py
│ │ └── test_tutorial003.py
│ └── test_wsgi/
│ ├── __init__.py
│ └── test_tutorial001.py
├── test_typing_python39.py
├── test_union_body.py
├── test_union_body_discriminator.py
├── test_union_body_discriminator_annotated.py
├── test_union_forms.py
├── test_union_inherited_body.py
├── test_validate_response.py
├── test_validate_response_dataclass.py
├── test_validate_response_recursive/
│ ├── __init__.py
│ ├── app.py
│ └── test_validate_response_recursive.py
├── test_validation_error_context.py
├── test_webhooks_security.py
├── test_wrapped_method_forward_reference.py
├── test_ws_dependencies.py
├── test_ws_router.py
└── utils.py
Showing preview only (474K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (4861 symbols across 912 files)
FILE: docs/en/docs/js/custom.js
function setupTermynal (line 1) | function setupTermynal() {
function shuffle (line 115) | function shuffle(array) {
function showRandomAnnouncement (line 127) | async function showRandomAnnouncement(groupId, timeInterval) {
function handleSponsorImages (line 144) | function handleSponsorImages() {
function openLinksInNewTab (line 177) | function openLinksInNewTab() {
function setupOpinionsTabs (line 204) | function setupOpinionsTabs() {
function main (line 241) | async function main() {
FILE: docs/en/docs/js/termynal.js
class Termynal (line 14) | class Termynal {
method constructor (line 30) | constructor(container = '#termynal', options = {}) {
method loadLines (line 52) | loadLines() {
method init (line 74) | init() {
method start (line 96) | async start() {
method generateRestart (line 129) | generateRestart() {
method generateFinish (line 142) | generateFinish() {
method addRestart (line 157) | addRestart() {
method addFinish (line 162) | addFinish() {
method type (line 171) | async type(line) {
method progress (line 187) | async progress(line) {
method _wait (line 212) | _wait(time) {
method lineDataToElements (line 223) | lineDataToElements(lineData) {
method _attributes (line 238) | _attributes(line) {
FILE: docs_src/additional_responses/tutorial001_py310.py
class Item (line 6) | class Item(BaseModel):
class Message (line 11) | class Message(BaseModel):
function read_item (line 19) | async def read_item(item_id: str):
FILE: docs_src/additional_responses/tutorial002_py310.py
class Item (line 6) | class Item(BaseModel):
function read_item (line 24) | async def read_item(item_id: str, img: bool | None = None):
FILE: docs_src/additional_responses/tutorial003_py310.py
class Item (line 6) | class Item(BaseModel):
class Message (line 11) | class Message(BaseModel):
function read_item (line 33) | async def read_item(item_id: str):
FILE: docs_src/additional_responses/tutorial004_py310.py
class Item (line 6) | class Item(BaseModel):
function read_item (line 26) | async def read_item(item_id: str, img: bool | None = None):
FILE: docs_src/additional_status_codes/tutorial001_an_py310.py
function upsert_item (line 12) | async def upsert_item(
FILE: docs_src/additional_status_codes/tutorial001_py310.py
function upsert_item (line 10) | async def upsert_item(
FILE: docs_src/advanced_middleware/tutorial001_py310.py
function main (line 10) | async def main():
FILE: docs_src/advanced_middleware/tutorial002_py310.py
function main (line 12) | async def main():
FILE: docs_src/advanced_middleware/tutorial003_py310.py
function main (line 10) | async def main():
FILE: docs_src/app_testing/app_a_py310/main.py
function read_main (line 7) | async def read_main():
FILE: docs_src/app_testing/app_a_py310/test_main.py
function test_read_main (line 8) | def test_read_main():
FILE: docs_src/app_testing/app_b_an_py310/main.py
class Item (line 16) | class Item(BaseModel):
function read_main (line 23) | async def read_main(item_id: str, x_token: Annotated[str, Header()]):
function create_item (line 32) | async def create_item(item: Item, x_token: Annotated[str, Header()]) -> ...
FILE: docs_src/app_testing/app_b_an_py310/test_main.py
function test_read_item (line 8) | def test_read_item():
function test_read_item_bad_token (line 18) | def test_read_item_bad_token():
function test_read_nonexistent_item (line 24) | def test_read_nonexistent_item():
function test_create_item (line 30) | def test_create_item():
function test_create_item_bad_token (line 44) | def test_create_item_bad_token():
function test_create_existing_item (line 54) | def test_create_existing_item():
FILE: docs_src/app_testing/app_b_py310/main.py
class Item (line 14) | class Item(BaseModel):
function read_main (line 21) | async def read_main(item_id: str, x_token: str = Header()):
function create_item (line 30) | async def create_item(item: Item, x_token: str = Header()) -> Item:
FILE: docs_src/app_testing/app_b_py310/test_main.py
function test_read_item (line 8) | def test_read_item():
function test_read_item_bad_token (line 18) | def test_read_item_bad_token():
function test_read_nonexistent_item (line 24) | def test_read_nonexistent_item():
function test_create_item (line 30) | def test_create_item():
function test_create_item_bad_token (line 44) | def test_create_item_bad_token():
function test_create_existing_item (line 54) | def test_create_existing_item():
FILE: docs_src/app_testing/tutorial001_py310.py
function read_main (line 8) | async def read_main():
function test_read_main (line 15) | def test_read_main():
FILE: docs_src/app_testing/tutorial002_py310.py
function read_main (line 9) | async def read_main():
function websocket (line 14) | async def websocket(websocket: WebSocket):
function test_read_main (line 20) | def test_read_main():
function test_websocket (line 27) | def test_websocket():
FILE: docs_src/app_testing/tutorial003_py310.py
function startup_event (line 10) | async def startup_event():
function read_items (line 16) | async def read_items(item_id: str):
function test_read_items (line 20) | def test_read_items():
FILE: docs_src/app_testing/tutorial004_py310.py
function lifespan (line 10) | async def lifespan(app: FastAPI):
function read_items (line 22) | async def read_items(item_id: str):
function test_read_items (line 26) | def test_read_items():
FILE: docs_src/async_tests/app_a_py310/main.py
function root (line 7) | async def root():
FILE: docs_src/async_tests/app_a_py310/test_main.py
function test_root (line 8) | async def test_root():
FILE: docs_src/authentication_error_status_code/tutorial001_an_py310.py
class HTTPBearer403 (line 9) | class HTTPBearer403(HTTPBearer):
method make_not_authenticated_error (line 10) | def make_not_authenticated_error(self) -> HTTPException:
function read_me (line 20) | def read_me(credentials: CredentialsDep):
FILE: docs_src/background_tasks/tutorial001_py310.py
function write_notification (line 6) | def write_notification(email: str, message=""):
function send_notification (line 13) | async def send_notification(email: str, background_tasks: BackgroundTasks):
FILE: docs_src/background_tasks/tutorial002_an_py310.py
function write_log (line 8) | def write_log(message: str):
function get_query (line 13) | def get_query(background_tasks: BackgroundTasks, q: str | None = None):
function send_notification (line 21) | async def send_notification(
FILE: docs_src/background_tasks/tutorial002_py310.py
function write_log (line 6) | def write_log(message: str):
function get_query (line 11) | def get_query(background_tasks: BackgroundTasks, q: str | None = None):
function send_notification (line 19) | async def send_notification(
FILE: docs_src/behind_a_proxy/tutorial001_01_py310.py
function read_items (line 7) | def read_items():
FILE: docs_src/behind_a_proxy/tutorial001_py310.py
function read_main (line 7) | def read_main(request: Request):
FILE: docs_src/behind_a_proxy/tutorial002_py310.py
function read_main (line 7) | def read_main(request: Request):
FILE: docs_src/behind_a_proxy/tutorial003_py310.py
function read_main (line 13) | def read_main(request: Request):
FILE: docs_src/behind_a_proxy/tutorial004_py310.py
function read_main (line 14) | def read_main(request: Request):
FILE: docs_src/bigger_applications/app_an_py310/dependencies.py
function get_token_header (line 6) | async def get_token_header(x_token: Annotated[str, Header()]):
function get_query_token (line 11) | async def get_query_token(token: str):
FILE: docs_src/bigger_applications/app_an_py310/internal/admin.py
function update_admin (line 7) | async def update_admin():
FILE: docs_src/bigger_applications/app_an_py310/main.py
function root (line 22) | async def root():
FILE: docs_src/bigger_applications/app_an_py310/routers/items.py
function read_items (line 17) | async def read_items():
function read_item (line 22) | async def read_item(item_id: str):
function update_item (line 33) | async def update_item(item_id: str):
FILE: docs_src/bigger_applications/app_an_py310/routers/users.py
function read_users (line 7) | async def read_users():
function read_user_me (line 12) | async def read_user_me():
function read_user (line 17) | async def read_user(username: str):
FILE: docs_src/body/tutorial001_py310.py
class Item (line 5) | class Item(BaseModel):
function create_item (line 16) | async def create_item(item: Item):
FILE: docs_src/body/tutorial002_py310.py
class Item (line 5) | class Item(BaseModel):
function create_item (line 16) | async def create_item(item: Item):
FILE: docs_src/body/tutorial003_py310.py
class Item (line 5) | class Item(BaseModel):
function update_item (line 16) | async def update_item(item_id: int, item: Item):
FILE: docs_src/body/tutorial004_py310.py
class Item (line 5) | class Item(BaseModel):
function update_item (line 16) | async def update_item(item_id: int, item: Item, q: str | None = None):
FILE: docs_src/body_fields/tutorial001_an_py310.py
class Item (line 9) | class Item(BaseModel):
function update_item (line 19) | async def update_item(item_id: int, item: Annotated[Item, Body(embed=Tru...
FILE: docs_src/body_fields/tutorial001_py310.py
class Item (line 7) | class Item(BaseModel):
function update_item (line 17) | async def update_item(item_id: int, item: Item = Body(embed=True)):
FILE: docs_src/body_multiple_params/tutorial001_an_py310.py
class Item (line 9) | class Item(BaseModel):
function update_item (line 17) | async def update_item(
FILE: docs_src/body_multiple_params/tutorial001_py310.py
class Item (line 7) | class Item(BaseModel):
function update_item (line 15) | async def update_item(
FILE: docs_src/body_multiple_params/tutorial002_py310.py
class Item (line 7) | class Item(BaseModel):
class User (line 14) | class User(BaseModel):
function update_item (line 20) | async def update_item(item_id: int, item: Item, user: User):
FILE: docs_src/body_multiple_params/tutorial003_an_py310.py
class Item (line 9) | class Item(BaseModel):
class User (line 16) | class User(BaseModel):
function update_item (line 22) | async def update_item(
FILE: docs_src/body_multiple_params/tutorial003_py310.py
class Item (line 7) | class Item(BaseModel):
class User (line 14) | class User(BaseModel):
function update_item (line 20) | async def update_item(item_id: int, item: Item, user: User, importance: ...
FILE: docs_src/body_multiple_params/tutorial004_an_py310.py
class Item (line 9) | class Item(BaseModel):
class User (line 16) | class User(BaseModel):
function update_item (line 22) | async def update_item(
FILE: docs_src/body_multiple_params/tutorial004_py310.py
class Item (line 7) | class Item(BaseModel):
class User (line 14) | class User(BaseModel):
function update_item (line 20) | async def update_item(
FILE: docs_src/body_multiple_params/tutorial005_an_py310.py
class Item (line 9) | class Item(BaseModel):
function update_item (line 17) | async def update_item(item_id: int, item: Annotated[Item, Body(embed=Tru...
FILE: docs_src/body_multiple_params/tutorial005_py310.py
class Item (line 7) | class Item(BaseModel):
function update_item (line 15) | async def update_item(item_id: int, item: Item = Body(embed=True)):
FILE: docs_src/body_nested_models/tutorial001_py310.py
class Item (line 7) | class Item(BaseModel):
function update_item (line 16) | async def update_item(item_id: int, item: Item):
FILE: docs_src/body_nested_models/tutorial002_py310.py
class Item (line 7) | class Item(BaseModel):
function update_item (line 16) | async def update_item(item_id: int, item: Item):
FILE: docs_src/body_nested_models/tutorial003_py310.py
class Item (line 7) | class Item(BaseModel):
function update_item (line 16) | async def update_item(item_id: int, item: Item):
FILE: docs_src/body_nested_models/tutorial004_py310.py
class Image (line 7) | class Image(BaseModel):
class Item (line 12) | class Item(BaseModel):
function update_item (line 22) | async def update_item(item_id: int, item: Item):
FILE: docs_src/body_nested_models/tutorial005_py310.py
class Image (line 7) | class Image(BaseModel):
class Item (line 12) | class Item(BaseModel):
function update_item (line 22) | async def update_item(item_id: int, item: Item):
FILE: docs_src/body_nested_models/tutorial006_py310.py
class Image (line 7) | class Image(BaseModel):
class Item (line 12) | class Item(BaseModel):
function update_item (line 22) | async def update_item(item_id: int, item: Item):
FILE: docs_src/body_nested_models/tutorial007_py310.py
class Image (line 7) | class Image(BaseModel):
class Item (line 12) | class Item(BaseModel):
class Offer (line 21) | class Offer(BaseModel):
function create_offer (line 29) | async def create_offer(offer: Offer):
FILE: docs_src/body_nested_models/tutorial008_py310.py
class Image (line 7) | class Image(BaseModel):
function create_multiple_images (line 13) | async def create_multiple_images(images: list[Image]):
FILE: docs_src/body_nested_models/tutorial009_py310.py
function create_index_weights (line 7) | async def create_index_weights(weights: dict[int, float]):
FILE: docs_src/body_updates/tutorial001_py310.py
class Item (line 8) | class Item(BaseModel):
function read_item (line 24) | async def read_item(item_id: str):
function update_item (line 29) | async def update_item(item_id: str, item: Item):
FILE: docs_src/body_updates/tutorial002_py310.py
class Item (line 8) | class Item(BaseModel):
function read_item (line 24) | async def read_item(item_id: str):
function update_item (line 29) | async def update_item(item_id: str, item: Item) -> Item:
FILE: docs_src/conditional_openapi/tutorial001_py310.py
class Settings (line 5) | class Settings(BaseSettings):
function root (line 15) | def root():
FILE: docs_src/configure_swagger_ui/tutorial001_py310.py
function read_user (line 7) | async def read_user(username: str):
FILE: docs_src/configure_swagger_ui/tutorial002_py310.py
function read_user (line 7) | async def read_user(username: str):
FILE: docs_src/configure_swagger_ui/tutorial003_py310.py
function read_user (line 7) | async def read_user(username: str):
FILE: docs_src/cookie_param_models/tutorial001_an_py310.py
class Cookies (line 9) | class Cookies(BaseModel):
function read_items (line 16) | async def read_items(cookies: Annotated[Cookies, Cookie()]):
FILE: docs_src/cookie_param_models/tutorial001_py310.py
class Cookies (line 7) | class Cookies(BaseModel):
function read_items (line 14) | async def read_items(cookies: Cookies = Cookie()):
FILE: docs_src/cookie_param_models/tutorial002_an_py310.py
class Cookies (line 9) | class Cookies(BaseModel):
function read_items (line 18) | async def read_items(cookies: Annotated[Cookies, Cookie()]):
FILE: docs_src/cookie_param_models/tutorial002_py310.py
class Cookies (line 7) | class Cookies(BaseModel):
function read_items (line 16) | async def read_items(cookies: Cookies = Cookie()):
FILE: docs_src/cookie_params/tutorial001_an_py310.py
function read_items (line 9) | async def read_items(ads_id: Annotated[str | None, Cookie()] = None):
FILE: docs_src/cookie_params/tutorial001_py310.py
function read_items (line 7) | async def read_items(ads_id: str | None = Cookie(default=None)):
FILE: docs_src/cors/tutorial001_py310.py
function main (line 23) | async def main():
FILE: docs_src/custom_docs_ui/tutorial001_py310.py
function custom_swagger_ui_html (line 12) | async def custom_swagger_ui_html():
function swagger_ui_redirect (line 23) | async def swagger_ui_redirect():
function redoc_html (line 28) | async def redoc_html():
function read_user (line 37) | async def read_user(username: str):
FILE: docs_src/custom_docs_ui/tutorial002_py310.py
function custom_swagger_ui_html (line 15) | async def custom_swagger_ui_html():
function swagger_ui_redirect (line 26) | async def swagger_ui_redirect():
function redoc_html (line 31) | async def redoc_html():
function read_user (line 40) | async def read_user(username: str):
FILE: docs_src/custom_request_and_route/tutorial001_an_py310.py
class GzipRequest (line 9) | class GzipRequest(Request):
method body (line 10) | async def body(self) -> bytes:
class GzipRoute (line 19) | class GzipRoute(APIRoute):
method get_route_handler (line 20) | def get_route_handler(self) -> Callable:
function sum_numbers (line 35) | async def sum_numbers(numbers: Annotated[list[int], Body()]):
FILE: docs_src/custom_request_and_route/tutorial001_py310.py
class GzipRequest (line 8) | class GzipRequest(Request):
method body (line 9) | async def body(self) -> bytes:
class GzipRoute (line 18) | class GzipRoute(APIRoute):
method get_route_handler (line 19) | def get_route_handler(self) -> Callable:
function sum_numbers (line 34) | async def sum_numbers(numbers: list[int] = Body()):
FILE: docs_src/custom_request_and_route/tutorial002_an_py310.py
class ValidationErrorLoggingRoute (line 9) | class ValidationErrorLoggingRoute(APIRoute):
method get_route_handler (line 10) | def get_route_handler(self) -> Callable:
function sum_numbers (line 29) | async def sum_numbers(numbers: Annotated[list[int], Body()]):
FILE: docs_src/custom_request_and_route/tutorial002_py310.py
class ValidationErrorLoggingRoute (line 8) | class ValidationErrorLoggingRoute(APIRoute):
method get_route_handler (line 9) | def get_route_handler(self) -> Callable:
function sum_numbers (line 28) | async def sum_numbers(numbers: list[int] = Body()):
FILE: docs_src/custom_request_and_route/tutorial003_py310.py
class TimedRoute (line 8) | class TimedRoute(APIRoute):
method get_route_handler (line 9) | def get_route_handler(self) -> Callable:
function not_timed (line 30) | async def not_timed():
function timed (line 35) | async def timed():
FILE: docs_src/custom_response/tutorial001_py310.py
function read_items (line 8) | async def read_items():
FILE: docs_src/custom_response/tutorial001b_py310.py
function read_items (line 8) | async def read_items():
FILE: docs_src/custom_response/tutorial002_py310.py
function read_items (line 8) | async def read_items():
FILE: docs_src/custom_response/tutorial003_py310.py
function read_items (line 8) | async def read_items():
FILE: docs_src/custom_response/tutorial004_py310.py
function generate_html_response (line 7) | def generate_html_response():
function read_items (line 22) | async def read_items():
FILE: docs_src/custom_response/tutorial005_py310.py
function main (line 8) | async def main():
FILE: docs_src/custom_response/tutorial006_py310.py
function redirect_typer (line 8) | async def redirect_typer():
FILE: docs_src/custom_response/tutorial006b_py310.py
function redirect_fastapi (line 8) | async def redirect_fastapi():
FILE: docs_src/custom_response/tutorial006c_py310.py
function redirect_pydantic (line 8) | async def redirect_pydantic():
FILE: docs_src/custom_response/tutorial007_py310.py
function fake_video_streamer (line 8) | async def fake_video_streamer():
function main (line 15) | async def main():
FILE: docs_src/custom_response/tutorial008_py310.py
function main (line 9) | def main():
FILE: docs_src/custom_response/tutorial009_py310.py
function main (line 9) | async def main():
FILE: docs_src/custom_response/tutorial009b_py310.py
function main (line 9) | async def main():
FILE: docs_src/custom_response/tutorial009c_py310.py
class CustomORJSONResponse (line 9) | class CustomORJSONResponse(Response):
method render (line 12) | def render(self, content: Any) -> bytes:
function main (line 18) | async def main():
FILE: docs_src/custom_response/tutorial010_py310.py
function read_items (line 8) | async def read_items():
FILE: docs_src/dataclasses_/tutorial001_py310.py
class Item (line 7) | class Item:
function create_item (line 18) | async def create_item(item: Item):
FILE: docs_src/dataclasses_/tutorial002_py310.py
class Item (line 7) | class Item:
function read_next_item (line 19) | async def read_next_item():
FILE: docs_src/dataclasses_/tutorial003_py310.py
class Item (line 8) | class Item:
class Author (line 14) | class Author:
function create_author_items (line 23) | async def create_author_items(author_id: str, items: list[Item]): # (5)
function get_authors (line 28) | def get_authors(): # (8)
FILE: docs_src/debugging/tutorial001_py310.py
function root (line 8) | def root():
FILE: docs_src/dependencies/tutorial001_02_an_py310.py
function common_parameters (line 8) | async def common_parameters(q: str | None = None, skip: int = 0, limit: ...
function read_items (line 16) | async def read_items(commons: CommonsDep):
function read_users (line 21) | async def read_users(commons: CommonsDep):
FILE: docs_src/dependencies/tutorial001_an_py310.py
function common_parameters (line 8) | async def common_parameters(q: str | None = None, skip: int = 0, limit: ...
function read_items (line 13) | async def read_items(commons: Annotated[dict, Depends(common_parameters)]):
function read_users (line 18) | async def read_users(commons: Annotated[dict, Depends(common_parameters)]):
FILE: docs_src/dependencies/tutorial001_py310.py
function common_parameters (line 6) | async def common_parameters(q: str | None = None, skip: int = 0, limit: ...
function read_items (line 11) | async def read_items(commons: dict = Depends(common_parameters)):
function read_users (line 16) | async def read_users(commons: dict = Depends(common_parameters)):
FILE: docs_src/dependencies/tutorial002_an_py310.py
class CommonQueryParams (line 11) | class CommonQueryParams:
method __init__ (line 12) | def __init__(self, q: str | None = None, skip: int = 0, limit: int = 1...
function read_items (line 19) | async def read_items(commons: Annotated[CommonQueryParams, Depends(Commo...
FILE: docs_src/dependencies/tutorial002_py310.py
class CommonQueryParams (line 9) | class CommonQueryParams:
method __init__ (line 10) | def __init__(self, q: str | None = None, skip: int = 0, limit: int = 1...
function read_items (line 17) | async def read_items(commons: CommonQueryParams = Depends(CommonQueryPar...
FILE: docs_src/dependencies/tutorial003_an_py310.py
class CommonQueryParams (line 11) | class CommonQueryParams:
method __init__ (line 12) | def __init__(self, q: str | None = None, skip: int = 0, limit: int = 1...
function read_items (line 19) | async def read_items(commons: Annotated[Any, Depends(CommonQueryParams)]):
FILE: docs_src/dependencies/tutorial003_py310.py
class CommonQueryParams (line 9) | class CommonQueryParams:
method __init__ (line 10) | def __init__(self, q: str | None = None, skip: int = 0, limit: int = 1...
function read_items (line 17) | async def read_items(commons=Depends(CommonQueryParams)):
FILE: docs_src/dependencies/tutorial004_an_py310.py
class CommonQueryParams (line 11) | class CommonQueryParams:
method __init__ (line 12) | def __init__(self, q: str | None = None, skip: int = 0, limit: int = 1...
function read_items (line 19) | async def read_items(commons: Annotated[CommonQueryParams, Depends()]):
FILE: docs_src/dependencies/tutorial004_py310.py
class CommonQueryParams (line 9) | class CommonQueryParams:
method __init__ (line 10) | def __init__(self, q: str | None = None, skip: int = 0, limit: int = 1...
function read_items (line 17) | async def read_items(commons: CommonQueryParams = Depends()):
FILE: docs_src/dependencies/tutorial005_an_py310.py
function query_extractor (line 8) | def query_extractor(q: str | None = None):
function query_or_cookie_extractor (line 12) | def query_or_cookie_extractor(
function read_query (line 22) | async def read_query(
FILE: docs_src/dependencies/tutorial005_py310.py
function query_extractor (line 6) | def query_extractor(q: str | None = None):
function query_or_cookie_extractor (line 10) | def query_or_cookie_extractor(
function read_query (line 19) | async def read_query(query_or_default: str = Depends(query_or_cookie_ext...
FILE: docs_src/dependencies/tutorial006_an_py310.py
function verify_token (line 8) | async def verify_token(x_token: Annotated[str, Header()]):
function verify_key (line 13) | async def verify_key(x_key: Annotated[str, Header()]):
function read_items (line 20) | async def read_items():
FILE: docs_src/dependencies/tutorial006_py310.py
function verify_token (line 6) | async def verify_token(x_token: str = Header()):
function verify_key (line 11) | async def verify_key(x_key: str = Header()):
function read_items (line 18) | async def read_items():
FILE: docs_src/dependencies/tutorial007_py310.py
function get_db (line 1) | async def get_db():
FILE: docs_src/dependencies/tutorial008_an_py310.py
function dependency_a (line 6) | async def dependency_a():
function dependency_b (line 14) | async def dependency_b(dep_a: Annotated[DepA, Depends(dependency_a)]):
function dependency_c (line 22) | async def dependency_c(dep_b: Annotated[DepB, Depends(dependency_b)]):
FILE: docs_src/dependencies/tutorial008_py310.py
function dependency_a (line 4) | async def dependency_a():
function dependency_b (line 12) | async def dependency_b(dep_a=Depends(dependency_a)):
function dependency_c (line 20) | async def dependency_c(dep_b=Depends(dependency_b)):
FILE: docs_src/dependencies/tutorial008b_an_py310.py
class OwnerError (line 14) | class OwnerError(Exception):
function get_username (line 18) | def get_username():
function get_item (line 26) | def get_item(item_id: str, username: Annotated[str, Depends(get_username...
FILE: docs_src/dependencies/tutorial008b_py310.py
class OwnerError (line 12) | class OwnerError(Exception):
function get_username (line 16) | def get_username():
function get_item (line 24) | def get_item(item_id: str, username: str = Depends(get_username)):
FILE: docs_src/dependencies/tutorial008c_an_py310.py
class InternalError (line 8) | class InternalError(Exception):
function get_username (line 12) | def get_username():
function get_item (line 20) | def get_item(item_id: str, username: Annotated[str, Depends(get_username...
FILE: docs_src/dependencies/tutorial008c_py310.py
class InternalError (line 6) | class InternalError(Exception):
function get_username (line 10) | def get_username():
function get_item (line 18) | def get_item(item_id: str, username: str = Depends(get_username)):
FILE: docs_src/dependencies/tutorial008d_an_py310.py
class InternalError (line 8) | class InternalError(Exception):
function get_username (line 12) | def get_username():
function get_item (line 21) | def get_item(item_id: str, username: Annotated[str, Depends(get_username...
FILE: docs_src/dependencies/tutorial008d_py310.py
class InternalError (line 6) | class InternalError(Exception):
function get_username (line 10) | def get_username():
function get_item (line 19) | def get_item(item_id: str, username: str = Depends(get_username)):
FILE: docs_src/dependencies/tutorial008e_an_py310.py
function get_username (line 8) | def get_username():
function get_user_me (line 16) | def get_user_me(username: Annotated[str, Depends(get_username, scope="fu...
FILE: docs_src/dependencies/tutorial008e_py310.py
function get_username (line 6) | def get_username():
function get_user_me (line 14) | def get_user_me(username: str = Depends(get_username, scope="function")):
FILE: docs_src/dependencies/tutorial010_py310.py
class MySuperContextManager (line 1) | class MySuperContextManager:
method __init__ (line 2) | def __init__(self):
method __enter__ (line 5) | def __enter__(self):
method __exit__ (line 8) | def __exit__(self, exc_type, exc_value, traceback):
function get_db (line 12) | async def get_db():
FILE: docs_src/dependencies/tutorial011_an_py310.py
class FixedContentQueryChecker (line 8) | class FixedContentQueryChecker:
method __init__ (line 9) | def __init__(self, fixed_content: str):
method __call__ (line 12) | def __call__(self, q: str = ""):
function read_query_check (line 22) | async def read_query_check(fixed_content_included: Annotated[bool, Depen...
FILE: docs_src/dependencies/tutorial011_py310.py
class FixedContentQueryChecker (line 6) | class FixedContentQueryChecker:
method __init__ (line 7) | def __init__(self, fixed_content: str):
method __call__ (line 10) | def __call__(self, q: str = ""):
function read_query_check (line 20) | async def read_query_check(fixed_content_included: bool = Depends(checke...
FILE: docs_src/dependencies/tutorial012_an_py310.py
function verify_token (line 6) | async def verify_token(x_token: Annotated[str, Header()]):
function verify_key (line 11) | async def verify_key(x_key: Annotated[str, Header()]):
function read_items (line 21) | async def read_items():
function read_users (line 26) | async def read_users():
FILE: docs_src/dependencies/tutorial012_py310.py
function verify_token (line 4) | async def verify_token(x_token: str = Header()):
function verify_key (line 9) | async def verify_key(x_key: str = Header()):
function read_items (line 19) | async def read_items():
function read_users (line 24) | async def read_users():
FILE: docs_src/dependencies/tutorial013_an_py310.py
class User (line 11) | class User(SQLModel, table=True):
function get_session (line 19) | def get_session():
function get_user (line 24) | def get_user(user_id: int, session: Annotated[Session, Depends(get_sessi...
function generate_stream (line 30) | def generate_stream(query: str):
function generate (line 37) | def generate(query: str):
FILE: docs_src/dependencies/tutorial014_an_py310.py
class User (line 11) | class User(SQLModel, table=True):
function get_session (line 19) | def get_session():
function get_user (line 24) | def get_user(user_id: int, session: Annotated[Session, Depends(get_sessi...
function generate_stream (line 31) | def generate_stream(query: str):
function generate (line 38) | def generate(query: str):
FILE: docs_src/dependency_testing/tutorial001_an_py310.py
function common_parameters (line 9) | async def common_parameters(q: str | None = None, skip: int = 0, limit: ...
function read_items (line 14) | async def read_items(commons: Annotated[dict, Depends(common_parameters)]):
function read_users (line 19) | async def read_users(commons: Annotated[dict, Depends(common_parameters)]):
function override_dependency (line 26) | async def override_dependency(q: str | None = None):
function test_override_in_items (line 33) | def test_override_in_items():
function test_override_in_items_with_q (line 42) | def test_override_in_items_with_q():
function test_override_in_items_with_params (line 51) | def test_override_in_items_with_params():
FILE: docs_src/dependency_testing/tutorial001_py310.py
function common_parameters (line 7) | async def common_parameters(q: str | None = None, skip: int = 0, limit: ...
function read_items (line 12) | async def read_items(commons: dict = Depends(common_parameters)):
function read_users (line 17) | async def read_users(commons: dict = Depends(common_parameters)):
function override_dependency (line 24) | async def override_dependency(q: str | None = None):
function test_override_in_items (line 31) | def test_override_in_items():
function test_override_in_items_with_q (line 40) | def test_override_in_items_with_q():
function test_override_in_items_with_params (line 49) | def test_override_in_items_with_params():
FILE: docs_src/encoder/tutorial001_py310.py
class Item (line 10) | class Item(BaseModel):
function update_item (line 20) | def update_item(id: str, item: Item):
FILE: docs_src/events/tutorial001_py310.py
function startup_event (line 9) | async def startup_event():
function read_items (line 15) | async def read_items(item_id: str):
FILE: docs_src/events/tutorial002_py310.py
function shutdown_event (line 7) | def shutdown_event():
function read_items (line 13) | async def read_items():
FILE: docs_src/events/tutorial003_py310.py
function fake_answer_to_everything_ml_model (line 6) | def fake_answer_to_everything_ml_model(x: float):
function lifespan (line 14) | async def lifespan(app: FastAPI):
function predict (line 26) | async def predict(x: float):
FILE: docs_src/extending_openapi/tutorial001_py310.py
function read_items (line 8) | async def read_items():
function custom_openapi (line 12) | def custom_openapi():
FILE: docs_src/extra_data_types/tutorial001_an_py310.py
function read_items (line 11) | async def read_items(
FILE: docs_src/extra_data_types/tutorial001_py310.py
function read_items (line 10) | async def read_items(
FILE: docs_src/extra_models/tutorial001_py310.py
class UserIn (line 7) | class UserIn(BaseModel):
class UserOut (line 14) | class UserOut(BaseModel):
class UserInDB (line 20) | class UserInDB(BaseModel):
function fake_password_hasher (line 27) | def fake_password_hasher(raw_password: str):
function fake_save_user (line 31) | def fake_save_user(user_in: UserIn):
function create_user (line 39) | async def create_user(user_in: UserIn):
FILE: docs_src/extra_models/tutorial002_py310.py
class UserBase (line 7) | class UserBase(BaseModel):
class UserIn (line 13) | class UserIn(UserBase):
class UserOut (line 17) | class UserOut(UserBase):
class UserInDB (line 21) | class UserInDB(UserBase):
function fake_password_hasher (line 25) | def fake_password_hasher(raw_password: str):
function fake_save_user (line 29) | def fake_save_user(user_in: UserIn):
function create_user (line 37) | async def create_user(user_in: UserIn):
FILE: docs_src/extra_models/tutorial003_py310.py
class BaseItem (line 7) | class BaseItem(BaseModel):
class CarItem (line 12) | class CarItem(BaseItem):
class PlaneItem (line 16) | class PlaneItem(BaseItem):
function read_item (line 32) | async def read_item(item_id: str):
FILE: docs_src/extra_models/tutorial004_py310.py
class Item (line 7) | class Item(BaseModel):
function read_items (line 19) | async def read_items():
FILE: docs_src/extra_models/tutorial005_py310.py
function read_keyword_weights (line 7) | async def read_keyword_weights():
FILE: docs_src/first_steps/tutorial001_py310.py
function root (line 7) | async def root():
FILE: docs_src/first_steps/tutorial003_py310.py
function root (line 7) | def root():
FILE: docs_src/generate_clients/tutorial001_py310.py
class Item (line 7) | class Item(BaseModel):
class ResponseMessage (line 12) | class ResponseMessage(BaseModel):
function create_item (line 17) | async def create_item(item: Item):
function get_items (line 22) | async def get_items():
FILE: docs_src/generate_clients/tutorial002_py310.py
class Item (line 7) | class Item(BaseModel):
class ResponseMessage (line 12) | class ResponseMessage(BaseModel):
class User (line 16) | class User(BaseModel):
function create_item (line 22) | async def create_item(item: Item):
function get_items (line 27) | async def get_items():
function create_user (line 35) | async def create_user(user: User):
FILE: docs_src/generate_clients/tutorial003_py310.py
function custom_generate_unique_id (line 6) | def custom_generate_unique_id(route: APIRoute):
class Item (line 13) | class Item(BaseModel):
class ResponseMessage (line 18) | class ResponseMessage(BaseModel):
class User (line 22) | class User(BaseModel):
function create_item (line 28) | async def create_item(item: Item):
function get_items (line 33) | async def get_items():
function create_user (line 41) | async def create_user(user: User):
FILE: docs_src/generate_clients/tutorial004.js
function modifyOpenAPIFile (line 3) | async function modifyOpenAPIFile(filePath) {
FILE: docs_src/graphql_/tutorial001_py310.py
class User (line 7) | class User:
class Query (line 13) | class Query:
method user (line 15) | def user(self) -> User:
FILE: docs_src/handling_errors/tutorial001_py310.py
function read_item (line 9) | async def read_item(item_id: str):
FILE: docs_src/handling_errors/tutorial002_py310.py
function read_item_header (line 9) | async def read_item_header(item_id: str):
FILE: docs_src/handling_errors/tutorial003_py310.py
class UnicornException (line 5) | class UnicornException(Exception):
method __init__ (line 6) | def __init__(self, name: str):
function unicorn_exception_handler (line 14) | async def unicorn_exception_handler(request: Request, exc: UnicornExcept...
function read_unicorn (line 22) | async def read_unicorn(name: str):
FILE: docs_src/handling_errors/tutorial004_py310.py
function http_exception_handler (line 10) | async def http_exception_handler(request, exc):
function validation_exception_handler (line 15) | async def validation_exception_handler(request, exc: RequestValidationEr...
function read_item (line 23) | async def read_item(item_id: int):
FILE: docs_src/handling_errors/tutorial005_py310.py
function validation_exception_handler (line 11) | async def validation_exception_handler(request: Request, exc: RequestVal...
class Item (line 18) | class Item(BaseModel):
function create_item (line 24) | async def create_item(item: Item):
FILE: docs_src/handling_errors/tutorial006_py310.py
function custom_http_exception_handler (line 13) | async def custom_http_exception_handler(request, exc):
function validation_exception_handler (line 19) | async def validation_exception_handler(request, exc):
function read_item (line 25) | async def read_item(item_id: int):
FILE: docs_src/header_param_models/tutorial001_an_py310.py
class CommonHeaders (line 9) | class CommonHeaders(BaseModel):
function read_items (line 18) | async def read_items(headers: Annotated[CommonHeaders, Header()]):
FILE: docs_src/header_param_models/tutorial001_py310.py
class CommonHeaders (line 7) | class CommonHeaders(BaseModel):
function read_items (line 16) | async def read_items(headers: CommonHeaders = Header()):
FILE: docs_src/header_param_models/tutorial002_an_py310.py
class CommonHeaders (line 9) | class CommonHeaders(BaseModel):
function read_items (line 20) | async def read_items(headers: Annotated[CommonHeaders, Header()]):
FILE: docs_src/header_param_models/tutorial002_py310.py
class CommonHeaders (line 7) | class CommonHeaders(BaseModel):
function read_items (line 18) | async def read_items(headers: CommonHeaders = Header()):
FILE: docs_src/header_param_models/tutorial003_an_py310.py
class CommonHeaders (line 9) | class CommonHeaders(BaseModel):
function read_items (line 18) | async def read_items(
FILE: docs_src/header_param_models/tutorial003_py310.py
class CommonHeaders (line 7) | class CommonHeaders(BaseModel):
function read_items (line 16) | async def read_items(headers: CommonHeaders = Header(convert_underscores...
FILE: docs_src/header_params/tutorial001_an_py310.py
function read_items (line 9) | async def read_items(user_agent: Annotated[str | None, Header()] = None):
FILE: docs_src/header_params/tutorial001_py310.py
function read_items (line 7) | async def read_items(user_agent: str | None = Header(default=None)):
FILE: docs_src/header_params/tutorial002_an_py310.py
function read_items (line 9) | async def read_items(
FILE: docs_src/header_params/tutorial002_py310.py
function read_items (line 7) | async def read_items(
FILE: docs_src/header_params/tutorial003_an_py310.py
function read_items (line 9) | async def read_items(x_token: Annotated[list[str] | None, Header()] = No...
FILE: docs_src/header_params/tutorial003_py310.py
function read_items (line 7) | async def read_items(x_token: list[str] | None = Header(default=None)):
FILE: docs_src/json_base64_bytes/tutorial001_py310.py
class DataInput (line 5) | class DataInput(BaseModel):
class DataOutput (line 12) | class DataOutput(BaseModel):
class DataInputOutput (line 19) | class DataInputOutput(BaseModel):
function post_data (line 33) | def post_data(body: DataInput):
function get_data (line 39) | def get_data() -> DataOutput:
function post_data_in_out (line 45) | def post_data_in_out(body: DataInputOutput) -> DataInputOutput:
FILE: docs_src/metadata/tutorial001_1_py310.py
function read_items (line 37) | async def read_items():
FILE: docs_src/metadata/tutorial001_py310.py
function read_items (line 37) | async def read_items():
FILE: docs_src/metadata/tutorial002_py310.py
function read_items (line 7) | async def read_items():
FILE: docs_src/metadata/tutorial003_py310.py
function read_items (line 7) | async def read_items():
FILE: docs_src/metadata/tutorial004_py310.py
function get_users (line 22) | async def get_users():
function get_items (line 27) | async def get_items():
FILE: docs_src/middleware/tutorial001_py310.py
function add_process_time_header (line 9) | async def add_process_time_header(request: Request, call_next):
FILE: docs_src/openapi_callbacks/tutorial001_py310.py
class Invoice (line 7) | class Invoice(BaseModel):
class InvoiceEvent (line 14) | class InvoiceEvent(BaseModel):
class InvoiceEventReceived (line 19) | class InvoiceEventReceived(BaseModel):
function invoice_notification (line 29) | def invoice_notification(body: InvoiceEvent):
function create_invoice (line 34) | def create_invoice(invoice: Invoice, callback_url: HttpUrl | None = None):
FILE: docs_src/openapi_webhooks/tutorial001_py310.py
class Subscription (line 9) | class Subscription(BaseModel):
function new_subscription (line 16) | def new_subscription(body: Subscription):
function read_users (line 24) | def read_users():
FILE: docs_src/path_operation_advanced_configuration/tutorial001_py310.py
function read_items (line 7) | async def read_items():
FILE: docs_src/path_operation_advanced_configuration/tutorial002_py310.py
function read_items (line 8) | async def read_items():
function use_route_names_as_operation_ids (line 12) | def use_route_names_as_operation_ids(app: FastAPI) -> None:
FILE: docs_src/path_operation_advanced_configuration/tutorial003_py310.py
function read_items (line 7) | async def read_items():
FILE: docs_src/path_operation_advanced_configuration/tutorial004_py310.py
class Item (line 7) | class Item(BaseModel):
function create_item (line 16) | async def create_item(item: Item) -> Item:
FILE: docs_src/path_operation_advanced_configuration/tutorial005_py310.py
function read_items (line 7) | async def read_items():
FILE: docs_src/path_operation_advanced_configuration/tutorial006_py310.py
function magic_data_reader (line 6) | def magic_data_reader(raw_body: bytes):
function create_item (line 38) | async def create_item(request: Request):
FILE: docs_src/path_operation_advanced_configuration/tutorial007_py310.py
class Item (line 8) | class Item(BaseModel):
function create_item (line 22) | async def create_item(request: Request):
FILE: docs_src/path_operation_configuration/tutorial001_py310.py
class Item (line 7) | class Item(BaseModel):
function create_item (line 16) | async def create_item(item: Item) -> Item:
FILE: docs_src/path_operation_configuration/tutorial002_py310.py
class Item (line 7) | class Item(BaseModel):
function create_item (line 16) | async def create_item(item: Item) -> Item:
function read_items (line 21) | async def read_items():
function read_users (line 26) | async def read_users():
FILE: docs_src/path_operation_configuration/tutorial002b_py310.py
class Tags (line 8) | class Tags(Enum):
function get_items (line 14) | async def get_items():
function read_users (line 19) | async def read_users():
FILE: docs_src/path_operation_configuration/tutorial003_py310.py
class Item (line 7) | class Item(BaseModel):
function create_item (line 20) | async def create_item(item: Item) -> Item:
FILE: docs_src/path_operation_configuration/tutorial004_py310.py
class Item (line 7) | class Item(BaseModel):
function create_item (line 16) | async def create_item(item: Item) -> Item:
FILE: docs_src/path_operation_configuration/tutorial005_py310.py
class Item (line 7) | class Item(BaseModel):
function create_item (line 20) | async def create_item(item: Item) -> Item:
FILE: docs_src/path_operation_configuration/tutorial006_py310.py
function read_items (line 7) | async def read_items():
function read_users (line 12) | async def read_users():
function read_elements (line 17) | async def read_elements():
FILE: docs_src/path_params/tutorial001_py310.py
function read_item (line 7) | async def read_item(item_id):
FILE: docs_src/path_params/tutorial002_py310.py
function read_item (line 7) | async def read_item(item_id: int):
FILE: docs_src/path_params/tutorial003_py310.py
function read_user_me (line 7) | async def read_user_me():
function read_user (line 12) | async def read_user(user_id: str):
FILE: docs_src/path_params/tutorial003b_py310.py
function read_users (line 7) | async def read_users():
function read_users2 (line 12) | async def read_users2():
FILE: docs_src/path_params/tutorial004_py310.py
function read_file (line 7) | async def read_file(file_path: str):
FILE: docs_src/path_params/tutorial005_py310.py
class ModelName (line 6) | class ModelName(str, Enum):
function get_model (line 16) | async def get_model(model_name: ModelName):
FILE: docs_src/path_params_numeric_validations/tutorial001_an_py310.py
function read_items (line 9) | async def read_items(
FILE: docs_src/path_params_numeric_validations/tutorial001_py310.py
function read_items (line 7) | async def read_items(
FILE: docs_src/path_params_numeric_validations/tutorial002_an_py310.py
function read_items (line 9) | async def read_items(
FILE: docs_src/path_params_numeric_validations/tutorial002_py310.py
function read_items (line 7) | async def read_items(q: str, item_id: int = Path(title="The ID of the it...
FILE: docs_src/path_params_numeric_validations/tutorial003_an_py310.py
function read_items (line 9) | async def read_items(
FILE: docs_src/path_params_numeric_validations/tutorial003_py310.py
function read_items (line 7) | async def read_items(*, item_id: int = Path(title="The ID of the item to...
FILE: docs_src/path_params_numeric_validations/tutorial004_an_py310.py
function read_items (line 9) | async def read_items(
FILE: docs_src/path_params_numeric_validations/tutorial004_py310.py
function read_items (line 7) | async def read_items(
FILE: docs_src/path_params_numeric_validations/tutorial005_an_py310.py
function read_items (line 9) | async def read_items(
FILE: docs_src/path_params_numeric_validations/tutorial005_py310.py
function read_items (line 7) | async def read_items(
FILE: docs_src/path_params_numeric_validations/tutorial006_an_py310.py
function read_items (line 9) | async def read_items(
FILE: docs_src/path_params_numeric_validations/tutorial006_py310.py
function read_items (line 7) | async def read_items(
FILE: docs_src/pydantic_v1_in_v2/tutorial001_an_py310.py
class Item (line 4) | class Item(BaseModel):
FILE: docs_src/pydantic_v1_in_v2/tutorial002_an_py310.py
class Item (line 5) | class Item(BaseModel):
function create_item (line 15) | async def create_item(item: Item) -> Item:
FILE: docs_src/pydantic_v1_in_v2/tutorial003_an_py310.py
class Item (line 6) | class Item(BaseModel):
class ItemV2 (line 12) | class ItemV2(BaseModelV2):
function create_item (line 22) | async def create_item(item: Item):
FILE: docs_src/pydantic_v1_in_v2/tutorial004_an_py310.py
class Item (line 8) | class Item(BaseModel):
function create_item (line 18) | async def create_item(item: Annotated[Item, Body(embed=True)]) -> Item:
FILE: docs_src/python_types/tutorial001_py310.py
function get_full_name (line 1) | def get_full_name(first_name, last_name):
FILE: docs_src/python_types/tutorial002_py310.py
function get_full_name (line 1) | def get_full_name(first_name: str, last_name: str):
FILE: docs_src/python_types/tutorial003_py310.py
function get_name_with_age (line 1) | def get_name_with_age(name: str, age: int):
FILE: docs_src/python_types/tutorial004_py310.py
function get_name_with_age (line 1) | def get_name_with_age(name: str, age: int):
FILE: docs_src/python_types/tutorial005_py310.py
function get_items (line 1) | def get_items(item_a: str, item_b: int, item_c: float, item_d: bool, ite...
FILE: docs_src/python_types/tutorial006_py310.py
function process_items (line 1) | def process_items(items: list[str]):
FILE: docs_src/python_types/tutorial007_py310.py
function process_items (line 1) | def process_items(items_t: tuple[int, int, str], items_s: set[bytes]):
FILE: docs_src/python_types/tutorial008_py310.py
function process_items (line 1) | def process_items(prices: dict[str, float]):
FILE: docs_src/python_types/tutorial008b_py310.py
function process_item (line 1) | def process_item(item: int | str):
FILE: docs_src/python_types/tutorial009_py310.py
function say_hi (line 1) | def say_hi(name: str | None = None):
FILE: docs_src/python_types/tutorial010_py310.py
class Person (line 1) | class Person:
method __init__ (line 2) | def __init__(self, name: str):
function get_person_name (line 6) | def get_person_name(one_person: Person):
FILE: docs_src/python_types/tutorial011_py310.py
class User (line 6) | class User(BaseModel):
FILE: docs_src/python_types/tutorial013_py310.py
function say_hello (line 4) | def say_hello(name: Annotated[str, "this is just metadata"]) -> str:
FILE: docs_src/query_param_models/tutorial001_an_py310.py
class FilterParams (line 9) | class FilterParams(BaseModel):
function read_items (line 17) | async def read_items(filter_query: Annotated[FilterParams, Query()]):
FILE: docs_src/query_param_models/tutorial001_py310.py
class FilterParams (line 9) | class FilterParams(BaseModel):
function read_items (line 17) | async def read_items(filter_query: FilterParams = Query()):
FILE: docs_src/query_param_models/tutorial002_an_py310.py
class FilterParams (line 9) | class FilterParams(BaseModel):
function read_items (line 19) | async def read_items(filter_query: Annotated[FilterParams, Query()]):
FILE: docs_src/query_param_models/tutorial002_py310.py
class FilterParams (line 9) | class FilterParams(BaseModel):
function read_items (line 19) | async def read_items(filter_query: FilterParams = Query()):
FILE: docs_src/query_params/tutorial001_py310.py
function read_item (line 9) | async def read_item(skip: int = 0, limit: int = 10):
FILE: docs_src/query_params/tutorial002_py310.py
function read_item (line 7) | async def read_item(item_id: str, q: str | None = None):
FILE: docs_src/query_params/tutorial003_py310.py
function read_item (line 7) | async def read_item(item_id: str, q: str | None = None, short: bool = Fa...
FILE: docs_src/query_params/tutorial004_py310.py
function read_user_item (line 7) | async def read_user_item(
FILE: docs_src/query_params/tutorial005_py310.py
function read_user_item (line 7) | async def read_user_item(item_id: str, needy: str):
FILE: docs_src/query_params/tutorial006_py310.py
function read_user_item (line 7) | async def read_user_item(
FILE: docs_src/query_params_str_validations/tutorial001_py310.py
function read_items (line 7) | async def read_items(q: str | None = None):
FILE: docs_src/query_params_str_validations/tutorial002_an_py310.py
function read_items (line 9) | async def read_items(q: Annotated[str | None, Query(max_length=50)] = No...
FILE: docs_src/query_params_str_validations/tutorial002_py310.py
function read_items (line 7) | async def read_items(q: str | None = Query(default=None, max_length=50)):
FILE: docs_src/query_params_str_validations/tutorial003_an_py310.py
function read_items (line 9) | async def read_items(
FILE: docs_src/query_params_str_validations/tutorial003_py310.py
function read_items (line 7) | async def read_items(q: str | None = Query(default=None, min_length=3, m...
FILE: docs_src/query_params_str_validations/tutorial004_an_py310.py
function read_items (line 9) | async def read_items(
FILE: docs_src/query_params_str_validations/tutorial004_py310.py
function read_items (line 7) | async def read_items(
FILE: docs_src/query_params_str_validations/tutorial005_an_py310.py
function read_items (line 9) | async def read_items(q: Annotated[str, Query(min_length=3)] = "fixedquer...
FILE: docs_src/query_params_str_validations/tutorial005_py310.py
function read_items (line 7) | async def read_items(q: str = Query(default="fixedquery", min_length=3)):
FILE: docs_src/query_params_str_validations/tutorial006_an_py310.py
function read_items (line 9) | async def read_items(q: Annotated[str, Query(min_length=3)]):
FILE: docs_src/query_params_str_validations/tutorial006_py310.py
function read_items (line 7) | async def read_items(q: str = Query(min_length=3)):
FILE: docs_src/query_params_str_validations/tutorial006c_an_py310.py
function read_items (line 9) | async def read_items(q: Annotated[str | None, Query(min_length=3)]):
FILE: docs_src/query_params_str_validations/tutorial006c_py310.py
function read_items (line 7) | async def read_items(q: str | None = Query(min_length=3)):
FILE: docs_src/query_params_str_validations/tutorial007_an_py310.py
function read_items (line 9) | async def read_items(
FILE: docs_src/query_params_str_validations/tutorial007_py310.py
function read_items (line 7) | async def read_items(
FILE: docs_src/query_params_str_validations/tutorial008_an_py310.py
function read_items (line 9) | async def read_items(
FILE: docs_src/query_params_str_validations/tutorial008_py310.py
function read_items (line 7) | async def read_items(
FILE: docs_src/query_params_str_validations/tutorial009_an_py310.py
function read_items (line 9) | async def read_items(q: Annotated[str | None, Query(alias="item-query")]...
FILE: docs_src/query_params_str_validations/tutorial009_py310.py
function read_items (line 7) | async def read_items(q: str | None = Query(default=None, alias="item-que...
FILE: docs_src/query_params_str_validations/tutorial010_an_py310.py
function read_items (line 9) | async def read_items(
FILE: docs_src/query_params_str_validations/tutorial010_py310.py
function read_items (line 7) | async def read_items(
FILE: docs_src/query_params_str_validations/tutorial011_an_py310.py
function read_items (line 9) | async def read_items(q: Annotated[list[str] | None, Query()] = None):
FILE: docs_src/query_params_str_validations/tutorial011_py310.py
function read_items (line 7) | async def read_items(q: list[str] | None = Query(default=None)):
FILE: docs_src/query_params_str_validations/tutorial012_an_py310.py
function read_items (line 9) | async def read_items(q: Annotated[list[str], Query()] = ["foo", "bar"]):
FILE: docs_src/query_params_str_validations/tutorial012_py310.py
function read_items (line 7) | async def read_items(q: list[str] = Query(default=["foo", "bar"])):
FILE: docs_src/query_params_str_validations/tutorial013_an_py310.py
function read_items (line 9) | async def read_items(q: Annotated[list, Query()] = []):
FILE: docs_src/query_params_str_validations/tutorial013_py310.py
function read_items (line 7) | async def read_items(q: list = Query(default=[])):
FILE: docs_src/query_params_str_validations/tutorial014_an_py310.py
function read_items (line 9) | async def read_items(
FILE: docs_src/query_params_str_validations/tutorial014_py310.py
function read_items (line 7) | async def read_items(
FILE: docs_src/query_params_str_validations/tutorial015_an_py310.py
function check_valid_id (line 16) | def check_valid_id(id: str):
function read_items (line 23) | async def read_items(
FILE: docs_src/request_files/tutorial001_02_an_py310.py
function create_file (line 9) | async def create_file(file: Annotated[bytes | None, File()] = None):
function create_upload_file (line 17) | async def create_upload_file(file: UploadFile | None = None):
FILE: docs_src/request_files/tutorial001_02_py310.py
function create_file (line 7) | async def create_file(file: bytes | None = File(default=None)):
function create_upload_file (line 15) | async def create_upload_file(file: UploadFile | None = None):
FILE: docs_src/request_files/tutorial001_03_an_py310.py
function create_file (line 9) | async def create_file(file: Annotated[bytes, File(description="A file re...
function create_upload_file (line 14) | async def create_upload_file(
FILE: docs_src/request_files/tutorial001_03_py310.py
function create_file (line 7) | async def create_file(file: bytes = File(description="A file read as byt...
function create_upload_file (line 12) | async def create_upload_file(
FILE: docs_src/request_files/tutorial001_an_py310.py
function create_file (line 9) | async def create_file(file: Annotated[bytes, File()]):
function create_upload_file (line 14) | async def create_upload_file(file: UploadFile):
FILE: docs_src/request_files/tutorial001_py310.py
function create_file (line 7) | async def create_file(file: bytes = File()):
function create_upload_file (line 12) | async def create_upload_file(file: UploadFile):
FILE: docs_src/request_files/tutorial002_an_py310.py
function create_files (line 10) | async def create_files(files: Annotated[list[bytes], File()]):
function create_upload_files (line 15) | async def create_upload_files(files: list[UploadFile]):
function main (line 20) | async def main():
FILE: docs_src/request_files/tutorial002_py310.py
function create_files (line 8) | async def create_files(files: list[bytes] = File()):
function create_upload_files (line 13) | async def create_upload_files(files: list[UploadFile]):
function main (line 18) | async def main():
FILE: docs_src/request_files/tutorial003_an_py310.py
function create_files (line 10) | async def create_files(
function create_upload_files (line 17) | async def create_upload_files(
function main (line 26) | async def main():
FILE: docs_src/request_files/tutorial003_py310.py
function create_files (line 8) | async def create_files(
function create_upload_files (line 15) | async def create_upload_files(
function main (line 22) | async def main():
FILE: docs_src/request_form_models/tutorial001_an_py310.py
class FormData (line 9) | class FormData(BaseModel):
function login (line 15) | async def login(data: Annotated[FormData, Form()]):
FILE: docs_src/request_form_models/tutorial001_py310.py
class FormData (line 7) | class FormData(BaseModel):
function login (line 13) | async def login(data: FormData = Form()):
FILE: docs_src/request_form_models/tutorial002_an_py310.py
class FormData (line 9) | class FormData(BaseModel):
function login (line 16) | async def login(data: Annotated[FormData, Form()]):
FILE: docs_src/request_form_models/tutorial002_py310.py
class FormData (line 7) | class FormData(BaseModel):
function login (line 14) | async def login(data: FormData = Form()):
FILE: docs_src/request_forms/tutorial001_an_py310.py
function login (line 9) | async def login(username: Annotated[str, Form()], password: Annotated[st...
FILE: docs_src/request_forms/tutorial001_py310.py
function login (line 7) | async def login(username: str = Form(), password: str = Form()):
FILE: docs_src/request_forms_and_files/tutorial001_an_py310.py
function create_file (line 9) | async def create_file(
FILE: docs_src/request_forms_and_files/tutorial001_py310.py
function create_file (line 7) | async def create_file(
FILE: docs_src/response_change_status_code/tutorial001_py310.py
function get_or_create_task (line 9) | def get_or_create_task(task_id: str, response: Response):
FILE: docs_src/response_cookies/tutorial001_py310.py
function create_cookie (line 8) | def create_cookie():
FILE: docs_src/response_cookies/tutorial002_py310.py
function create_cookie (line 7) | def create_cookie(response: Response):
FILE: docs_src/response_directly/tutorial001_py310.py
class Item (line 9) | class Item(BaseModel):
function update_item (line 19) | def update_item(id: str, item: Item):
FILE: docs_src/response_directly/tutorial002_py310.py
function get_legacy_data (line 7) | def get_legacy_data():
FILE: docs_src/response_headers/tutorial001_py310.py
function get_headers (line 8) | def get_headers():
FILE: docs_src/response_headers/tutorial002_py310.py
function get_headers (line 7) | def get_headers(response: Response):
FILE: docs_src/response_model/tutorial001_01_py310.py
class Item (line 7) | class Item(BaseModel):
function create_item (line 16) | async def create_item(item: Item) -> Item:
function read_items (line 21) | async def read_items() -> list[Item]:
FILE: docs_src/response_model/tutorial001_py310.py
class Item (line 9) | class Item(BaseModel):
function create_item (line 18) | async def create_item(item: Item) -> Any:
function read_items (line 23) | async def read_items() -> Any:
FILE: docs_src/response_model/tutorial002_py310.py
class UserIn (line 7) | class UserIn(BaseModel):
function create_user (line 16) | async def create_user(user: UserIn) -> UserIn:
FILE: docs_src/response_model/tutorial003_01_py310.py
class BaseUser (line 7) | class BaseUser(BaseModel):
class UserIn (line 13) | class UserIn(BaseUser):
function create_user (line 18) | async def create_user(user: UserIn) -> BaseUser:
FILE: docs_src/response_model/tutorial003_02_py310.py
function get_portal (line 8) | async def get_portal(teleport: bool = False) -> Response:
FILE: docs_src/response_model/tutorial003_03_py310.py
function get_teleport (line 8) | async def get_teleport() -> RedirectResponse:
FILE: docs_src/response_model/tutorial003_04_py310.py
function get_portal (line 8) | async def get_portal(teleport: bool = False) -> Response | dict:
FILE: docs_src/response_model/tutorial003_05_py310.py
function get_portal (line 8) | async def get_portal(teleport: bool = False) -> Response | dict:
FILE: docs_src/response_model/tutorial003_py310.py
class UserIn (line 9) | class UserIn(BaseModel):
class UserOut (line 16) | class UserOut(BaseModel):
function create_user (line 23) | async def create_user(user: UserIn) -> Any:
FILE: docs_src/response_model/tutorial004_py310.py
class Item (line 7) | class Item(BaseModel):
function read_item (line 23) | async def read_item(item_id: str):
FILE: docs_src/response_model/tutorial005_py310.py
class Item (line 7) | class Item(BaseModel):
function read_item_name (line 31) | async def read_item_name(item_id: str):
function read_item_public_data (line 36) | async def read_item_public_data(item_id: str):
FILE: docs_src/response_model/tutorial006_py310.py
class Item (line 7) | class Item(BaseModel):
function read_item_name (line 31) | async def read_item_name(item_id: str):
function read_item_public_data (line 36) | async def read_item_public_data(item_id: str):
FILE: docs_src/response_status_code/tutorial001_py310.py
function create_item (line 7) | async def create_item(name: str):
FILE: docs_src/response_status_code/tutorial002_py310.py
function create_item (line 7) | async def create_item(name: str):
FILE: docs_src/schema_extra_example/tutorial001_py310.py
class Item (line 7) | class Item(BaseModel):
function update_item (line 28) | async def update_item(item_id: int, item: Item):
FILE: docs_src/schema_extra_example/tutorial002_py310.py
class Item (line 7) | class Item(BaseModel):
function update_item (line 15) | async def update_item(item_id: int, item: Item):
FILE: docs_src/schema_extra_example/tutorial003_an_py310.py
class Item (line 9) | class Item(BaseModel):
function update_item (line 17) | async def update_item(
FILE: docs_src/schema_extra_example/tutorial003_py310.py
class Item (line 7) | class Item(BaseModel):
function update_item (line 15) | async def update_item(
FILE: docs_src/schema_extra_example/tutorial004_an_py310.py
class Item (line 9) | class Item(BaseModel):
function update_item (line 17) | async def update_item(
FILE: docs_src/schema_extra_example/tutorial004_py310.py
class Item (line 7) | class Item(BaseModel):
function update_item (line 15) | async def update_item(
FILE: docs_src/schema_extra_example/tutorial005_an_py310.py
class Item (line 9) | class Item(BaseModel):
function update_item (line 17) | async def update_item(
FILE: docs_src/schema_extra_example/tutorial005_py310.py
class Item (line 7) | class Item(BaseModel):
function update_item (line 15) | async def update_item(
FILE: docs_src/security/tutorial001_an_py310.py
function read_items (line 12) | async def read_items(token: Annotated[str, Depends(oauth2_scheme)]):
FILE: docs_src/security/tutorial001_py310.py
function read_items (line 10) | async def read_items(token: str = Depends(oauth2_scheme)):
FILE: docs_src/security/tutorial002_an_py310.py
class User (line 12) | class User(BaseModel):
function fake_decode_token (line 19) | def fake_decode_token(token):
function get_current_user (line 25) | async def get_current_user(token: Annotated[str, Depends(oauth2_scheme)]):
function read_users_me (line 31) | async def read_users_me(current_user: Annotated[User, Depends(get_curren...
FILE: docs_src/security/tutorial002_py310.py
class User (line 10) | class User(BaseModel):
function fake_decode_token (line 17) | def fake_decode_token(token):
function get_current_user (line 23) | async def get_current_user(token: str = Depends(oauth2_scheme)):
function read_users_me (line 29) | async def read_users_me(current_user: User = Depends(get_current_user)):
FILE: docs_src/security/tutorial003_an_py310.py
function fake_hash_password (line 27) | def fake_hash_password(password: str):
class User (line 34) | class User(BaseModel):
class UserInDB (line 41) | class UserInDB(User):
function get_user (line 45) | def get_user(db, username: str):
function fake_decode_token (line 51) | def fake_decode_token(token):
function get_current_user (line 58) | async def get_current_user(token: Annotated[str, Depends(oauth2_scheme)]):
function get_current_active_user (line 69) | async def get_current_active_user(
function login (line 78) | async def login(form_data: Annotated[OAuth2PasswordRequestForm, Depends(...
function read_users_me (line 91) | async def read_users_me(
FILE: docs_src/security/tutorial003_py310.py
function fake_hash_password (line 25) | def fake_hash_password(password: str):
class User (line 32) | class User(BaseModel):
class UserInDB (line 39) | class UserInDB(User):
function get_user (line 43) | def get_user(db, username: str):
function fake_decode_token (line 49) | def fake_decode_token(token):
function get_current_user (line 56) | async def get_current_user(token: str = Depends(oauth2_scheme)):
function get_current_active_user (line 67) | async def get_current_active_user(current_user: User = Depends(get_curre...
function login (line 74) | async def login(form_data: OAuth2PasswordRequestForm = Depends()):
function read_users_me (line 87) | async def read_users_me(current_user: User = Depends(get_current_active_...
FILE: docs_src/security/tutorial004_an_py310.py
class Token (line 29) | class Token(BaseModel):
class TokenData (line 34) | class TokenData(BaseModel):
class User (line 38) | class User(BaseModel):
class UserInDB (line 45) | class UserInDB(User):
function verify_password (line 58) | def verify_password(plain_password, hashed_password):
function get_password_hash (line 62) | def get_password_hash(password):
function get_user (line 66) | def get_user(db, username: str):
function authenticate_user (line 72) | def authenticate_user(fake_db, username: str, password: str):
function create_access_token (line 82) | def create_access_token(data: dict, expires_delta: timedelta | None = No...
function get_current_user (line 93) | async def get_current_user(token: Annotated[str, Depends(oauth2_scheme)]):
function get_current_active_user (line 113) | async def get_current_active_user(
function login_for_access_token (line 122) | async def login_for_access_token(
function read_users_me (line 140) | async def read_users_me(
function read_own_items (line 147) | async def read_own_items(
FILE: docs_src/security/tutorial004_py310.py
class Token (line 28) | class Token(BaseModel):
class TokenData (line 33) | class TokenData(BaseModel):
class User (line 37) | class User(BaseModel):
class UserInDB (line 44) | class UserInDB(User):
function verify_password (line 57) | def verify_password(plain_password, hashed_password):
function get_password_hash (line 61) | def get_password_hash(password):
function get_user (line 65) | def get_user(db, username: str):
function authenticate_user (line 71) | def authenticate_user(fake_db, username: str, password: str):
function create_access_token (line 81) | def create_access_token(data: dict, expires_delta: timedelta | None = No...
function get_current_user (line 92) | async def get_current_user(token: str = Depends(oauth2_scheme)):
function get_current_active_user (line 112) | async def get_current_active_user(current_user: User = Depends(get_curre...
function login_for_access_token (line 119) | async def login_for_access_token(
function read_users_me (line 137) | async def read_users_me(current_user: User = Depends(get_current_active_...
function read_own_items (line 142) | async def read_own_items(current_user: User = Depends(get_current_active...
FILE: docs_src/security/tutorial005_an_py310.py
class Token (line 40) | class Token(BaseModel):
class TokenData (line 45) | class TokenData(BaseModel):
class User (line 50) | class User(BaseModel):
class UserInDB (line 57) | class UserInDB(User):
function verify_password (line 73) | def verify_password(plain_password, hashed_password):
function get_password_hash (line 77) | def get_password_hash(password):
function get_user (line 81) | def get_user(db, username: str):
function authenticate_user (line 87) | def authenticate_user(fake_db, username: str, password: str):
function create_access_token (line 97) | def create_access_token(data: dict, expires_delta: timedelta | None = No...
function get_current_user (line 108) | async def get_current_user(
function get_current_active_user (line 143) | async def get_current_active_user(
function login_for_access_token (line 152) | async def login_for_access_token(
function read_users_me (line 167) | async def read_users_me(
function read_own_items (line 174) | async def read_own_items(
function read_system_status (line 181) | async def read_system_status(current_user: Annotated[User, Depends(get_c...
FILE: docs_src/security/tutorial005_py310.py
class Token (line 39) | class Token(BaseModel):
class TokenData (line 44) | class TokenData(BaseModel):
class User (line 49) | class User(BaseModel):
class UserInDB (line 56) | class UserInDB(User):
function verify_password (line 72) | def verify_password(plain_password, hashed_password):
function get_password_hash (line 76) | def get_password_hash(password):
function get_user (line 80) | def get_user(db, username: str):
function authenticate_user (line 86) | def authenticate_user(fake_db, username: str, password: str):
function create_access_token (line 96) | def create_access_token(data: dict, expires_delta: timedelta | None = No...
function get_current_user (line 107) | async def get_current_user(
function get_current_active_user (line 142) | async def get_current_active_user(
function login_for_access_token (line 151) | async def login_for_access_token(
function read_users_me (line 166) | async def read_users_me(current_user: User = Depends(get_current_active_...
function read_own_items (line 171) | async def read_own_items(
function read_system_status (line 178) | async def read_system_status(current_user: User = Depends(get_current_us...
FILE: docs_src/security/tutorial006_an_py310.py
function read_current_user (line 12) | def read_current_user(credentials: Annotated[HTTPBasicCredentials, Depen...
FILE: docs_src/security/tutorial006_py310.py
function read_current_user (line 10) | def read_current_user(credentials: HTTPBasicCredentials = Depends(securi...
FILE: docs_src/security/tutorial007_an_py310.py
function get_current_username (line 12) | def get_current_username(
function read_current_user (line 35) | def read_current_user(username: Annotated[str, Depends(get_current_usern...
FILE: docs_src/security/tutorial007_py310.py
function get_current_username (line 11) | def get_current_username(credentials: HTTPBasicCredentials = Depends(sec...
function read_current_user (line 32) | def read_current_user(username: str = Depends(get_current_username)):
FILE: docs_src/separate_openapi_schemas/tutorial001_py310.py
class Item (line 5) | class Item(BaseModel):
function create_item (line 14) | def create_item(item: Item):
function read_items (line 19) | def read_items() -> list[Item]:
FILE: docs_src/separate_openapi_schemas/tutorial002_py310.py
class Item (line 5) | class Item(BaseModel):
function create_item (line 14) | def create_item(item: Item):
function read_items (line 19) | def read_items() -> list[Item]:
FILE: docs_src/server_sent_events/tutorial001_py310.py
class Item (line 10) | class Item(BaseModel):
function sse_items (line 23) | async def sse_items() -> AsyncIterable[Item]:
function sse_items_no_async (line 29) | def sse_items_no_async() -> Iterable[Item]:
function sse_items_no_annotation (line 35) | async def sse_items_no_annotation():
function sse_items_no_async_no_annotation (line 41) | def sse_items_no_async_no_annotation():
FILE: docs_src/server_sent_events/tutorial002_py310.py
class Item (line 10) | class Item(BaseModel):
function stream_items (line 23) | async def stream_items() -> AsyncIterable[ServerSentEvent]:
FILE: docs_src/server_sent_events/tutorial003_py310.py
function stream_logs (line 10) | async def stream_logs() -> AsyncIterable[ServerSentEvent]:
FILE: docs_src/server_sent_events/tutorial004_py310.py
class Item (line 11) | class Item(BaseModel):
function stream_items (line 24) | async def stream_items(
FILE: docs_src/server_sent_events/tutorial005_py310.py
class Prompt (line 10) | class Prompt(BaseModel):
function stream_chat (line 15) | async def stream_chat(prompt: Prompt) -> AsyncIterable[ServerSentEvent]:
FILE: docs_src/settings/app01_py310/config.py
class Settings (line 4) | class Settings(BaseSettings):
FILE: docs_src/settings/app01_py310/main.py
function info (line 9) | async def info():
FILE: docs_src/settings/app02_an_py310/config.py
class Settings (line 4) | class Settings(BaseSettings):
FILE: docs_src/settings/app02_an_py310/main.py
function get_settings (line 12) | def get_settings():
function info (line 17) | async def info(settings: Annotated[Settings, Depends(get_settings)]):
FILE: docs_src/settings/app02_an_py310/test_main.py
function get_settings_override (line 9) | def get_settings_override():
function test_app (line 16) | def test_app():
FILE: docs_src/settings/app02_py310/config.py
class Settings (line 4) | class Settings(BaseSettings):
FILE: docs_src/settings/app02_py310/main.py
function get_settings (line 11) | def get_settings():
function info (line 16) | async def info(settings: Settings = Depends(get_settings)):
FILE: docs_src/settings/app02_py310/test_main.py
function get_settings_override (line 9) | def get_settings_override():
function test_app (line 16) | def test_app():
FILE: docs_src/settings/app03_an_py310/config.py
class Settings (line 4) | class Settings(BaseSettings):
FILE: docs_src/settings/app03_an_py310/main.py
function get_settings (line 12) | def get_settings():
function info (line 17) | async def info(settings: Annotated[config.Settings, Depends(get_settings...
FILE: docs_src/settings/app03_py310/config.py
class Settings (line 4) | class Settings(BaseSettings):
FILE: docs_src/settings/app03_py310/main.py
function get_settings (line 11) | def get_settings():
function info (line 16) | async def info(settings: config.Settings = Depends(get_settings)):
FILE: docs_src/settings/tutorial001_py310.py
class Settings (line 5) | class Settings(BaseSettings):
function info (line 16) | async def info():
FILE: docs_src/sql_databases/tutorial001_an_py310.py
class Hero (line 7) | class Hero(SQLModel, table=True):
function create_db_and_tables (line 21) | def create_db_and_tables():
function get_session (line 25) | def get_session():
function on_startup (line 36) | def on_startup():
function create_hero (line 41) | def create_hero(hero: Hero, session: SessionDep) -> Hero:
function read_heroes (line 49) | def read_heroes(
function read_hero (line 59) | def read_hero(hero_id: int, session: SessionDep) -> Hero:
function delete_hero (line 67) | def delete_hero(hero_id: int, session: SessionDep):
FILE: docs_src/sql_databases/tutorial001_py310.py
class Hero (line 5) | class Hero(SQLModel, table=True):
function create_db_and_tables (line 19) | def create_db_and_tables():
function get_session (line 23) | def get_session():
function on_startup (line 32) | def on_startup():
function create_hero (line 37) | def create_hero(hero: Hero, session: Session = Depends(get_session)) -> ...
function read_heroes (line 45) | def read_heroes(
function read_hero (line 55) | def read_hero(hero_id: int, session: Session = Depends(get_session)) -> ...
function delete_hero (line 63) | def delete_hero(hero_id: int, session: Session = Depends(get_session)):
FILE: docs_src/sql_databases/tutorial002_an_py310.py
class HeroBase (line 7) | class HeroBase(SQLModel):
class Hero (line 12) | class Hero(HeroBase, table=True):
class HeroPublic (line 17) | class HeroPublic(HeroBase):
class HeroCreate (line 21) | class HeroCreate(HeroBase):
class HeroUpdate (line 25) | class HeroUpdate(HeroBase):
function create_db_and_tables (line 38) | def create_db_and_tables():
function get_session (line 42) | def get_session():
function on_startup (line 52) | def on_startup():
function create_hero (line 57) | def create_hero(hero: HeroCreate, session: SessionDep):
function read_heroes (line 66) | def read_heroes(
function read_hero (line 76) | def read_hero(hero_id: int, session: SessionDep):
function update_hero (line 84) | def update_hero(hero_id: int, hero: HeroUpdate, session: SessionDep):
function delete_hero (line 97) | def delete_hero(hero_id: int, session: SessionDep):
FILE: docs_src/sql_databases/tutorial002_py310.py
class HeroBase (line 5) | class HeroBase(SQLModel):
class Hero (line 10) | class Hero(HeroBase, table=True):
class HeroPublic (line 15) | class HeroPublic(HeroBase):
class HeroCreate (line 19) | class HeroCreate(HeroBase):
class HeroUpdate (line 23) | class HeroUpdate(HeroBase):
function create_db_and_tables (line 36) | def create_db_and_tables():
function get_session (line 40) | def get_session():
function on_startup (line 49) | def on_startup():
function create_hero (line 54) | def create_hero(hero: HeroCreate, session: Session = Depends(get_session)):
function read_heroes (line 63) | def read_heroes(
function read_hero (line 73) | def read_hero(hero_id: int, session: Session = Depends(get_session)):
function update_hero (line 81) | def update_hero(
function delete_hero (line 96) | def delete_hero(hero_id: int, session: Session = Depends(get_session)):
FILE: docs_src/stream_data/tutorial001_py310.py
function stream_story (line 21) | async def stream_story() -> AsyncIterable[str]:
function stream_story_no_async (line 27) | def stream_story_no_async() -> Iterable[str]:
function stream_story_no_annotation (line 33) | async def stream_story_no_annotation():
function stream_story_no_async_no_annotation (line 39) | def stream_story_no_async_no_annotation():
function stream_story_bytes (line 45) | async def stream_story_bytes() -> AsyncIterable[bytes]:
function stream_story_no_async_bytes (line 51) | def stream_story_no_async_bytes() -> Iterable[bytes]:
function stream_story_no_annotation_bytes (line 57) | async def stream_story_no_annotation_bytes():
function stream_story_no_async_no_annotation_bytes (line 63) | def stream_story_no_async_no_annotation_bytes():
FILE: docs_src/stream_data/tutorial002_py310.py
function read_image (line 12) | def read_image() -> BytesIO:
class PNGStreamingResponse (line 19) | class PNGStreamingResponse(StreamingResponse):
function stream_image (line 24) | async def stream_image() -> AsyncIterable[bytes]:
function stream_image_no_async (line 31) | def stream_image_no_async() -> Iterable[bytes]:
function stream_image_no_async_yield_from (line 38) | def stream_image_no_async_yield_from() -> Iterable[bytes]:
function stream_image_no_annotation (line 44) | async def stream_image_no_annotation():
function stream_image_no_async_no_annotation (line 51) | def stream_image_no_async_no_annotation():
FILE: docs_src/stream_json_lines/tutorial001_py310.py
class Item (line 9) | class Item(BaseModel):
function stream_items (line 22) | async def stream_items() -> AsyncIterable[Item]:
function stream_items_no_async (line 28) | def stream_items_no_async() -> Iterable[Item]:
function stream_items_no_annotation (line 34) | async def stream_items_no_annotation():
function stream_items_no_async_no_annotation (line 40) | def stream_items_no_async_no_annotation():
FILE: docs_src/strict_content_type/tutorial001_py310.py
class Item (line 7) | class Item(BaseModel):
function create_item (line 13) | async def create_item(item: Item):
FILE: docs_src/sub_applications/tutorial001_py310.py
function read_main (line 7) | def read_main():
function read_sub (line 15) | def read_sub():
FILE: docs_src/templates/tutorial001_py310.py
function read_item (line 15) | async def read_item(request: Request, id: str):
FILE: docs_src/using_request_directly/tutorial001_py310.py
function read_root (line 7) | def read_root(item_id: str, request: Request):
FILE: docs_src/websockets_/tutorial001_py310.py
function get (line 42) | async def get():
function websocket_endpoint (line 47) | async def websocket_endpoint(websocket: WebSocket):
FILE: docs_src/websockets_/tutorial002_an_py310.py
function get (line 62) | async def get():
function get_cookie_or_token (line 66) | async def get_cookie_or_token(
function websocket_endpoint (line 77) | async def websocket_endpoint(
FILE: docs_src/websockets_/tutorial002_py310.py
function get (line 60) | async def get():
function get_cookie_or_token (line 64) | async def get_cookie_or_token(
function websocket_endpoint (line 75) | async def websocket_endpoint(
FILE: docs_src/websockets_/tutorial003_py310.py
class ConnectionManager (line 44) | class ConnectionManager:
method __init__ (line 45) | def __init__(self):
method connect (line 48) | async def connect(self, websocket: WebSocket):
method disconnect (line 52) | def disconnect(self, websocket: WebSocket):
method send_personal_message (line 55) | async def send_personal_message(self, message: str, websocket: WebSock...
method broadcast (line 58) | async def broadcast(self, message: str):
function get (line 67) | async def get():
function websocket_endpoint (line 72) | async def websocket_endpoint(websocket: WebSocket, client_id: int):
FILE: docs_src/wsgi/tutorial001_py310.py
function flask_main (line 10) | def flask_main():
function read_main (line 19) | def read_main():
FILE: fastapi/_compat/shared.py
function lenient_issubclass (line 47) | def lenient_issubclass(
function _annotation_is_sequence (line 58) | def _annotation_is_sequence(annotation: type[Any] | None) -> bool:
function field_annotation_is_sequence (line 64) | def field_annotation_is_sequence(annotation: type[Any] | None) -> bool:
function value_is_sequence (line 76) | def value_is_sequence(value: Any) -> bool:
function _annotation_is_complex (line 80) | def _annotation_is_complex(annotation: type[Any] | None) -> bool:
function field_annotation_is_complex (line 88) | def field_annotation_is_complex(annotation: type[Any] | None) -> bool:
function field_annotation_is_scalar (line 104) | def field_annotation_is_scalar(annotation: Any) -> bool:
function field_annotation_is_scalar_sequence (line 109) | def field_annotation_is_scalar_sequence(annotation: type[Any] | None) ->...
function is_bytes_or_nonable_bytes_annotation (line 126) | def is_bytes_or_nonable_bytes_annotation(annotation: Any) -> bool:
function is_uploadfile_or_nonable_uploadfile_annotation (line 137) | def is_uploadfile_or_nonable_uploadfile_annotation(annotation: Any) -> b...
function is_bytes_sequence_annotation (line 148) | def is_bytes_sequence_annotation(annotation: Any) -> bool:
function is_uploadfile_sequence_annotation (line 163) | def is_uploadfile_sequence_annotation(annotation: Any) -> bool:
function is_pydantic_v1_model_instance (line 178) | def is_pydantic_v1_model_instance(obj: Any) -> bool:
function is_pydantic_v1_model_class (line 190) | def is_pydantic_v1_model_class(cls: Any) -> bool:
function annotation_is_pydantic_v1 (line 202) | def annotation_is_pydantic_v1(annotation: Any) -> bool:
FILE: fastapi/_compat/v2.py
function evaluate_forwardref (line 43) | def evaluate_forwardref(
class GenerateJsonSchema (line 57) | class GenerateJsonSchema(_GenerateJsonSchema):
method bytes_schema (line 60) | def bytes_schema(self, schema: CoreSchema) -> JsonSchemaValue:
function asdict (line 100) | def asdict(field_info: FieldInfo) -> dict[str, Any]:
class ModelField (line 114) | class ModelField:
method alias (line 121) | def alias(self) -> str:
method validation_alias (line 126) | def validation_alias(self) -> str | None:
method serialization_alias (line 133) | def serialization_alias(self) -> str | None:
method default (line 138) | def default(self) -> Any:
method __post_init__ (line 141) | def __post_init__(self) -> None:
method get_default (line 168) | def get_default(self) -> Any:
method validate (line 173) | def validate(
method serialize (line 190) | def serialize(
method serialize_json (line 215) | def serialize_json(
method __hash__ (line 241) | def __hash__(self) -> int:
function _has_computed_fields (line 247) | def _has_computed_fields(field: ModelField) -> bool:
function get_schema_from_model_field (line 254) | def get_schema_from_model_field(
function get_definitions (line 285) | def get_definitions(
function is_scalar_field (line 349) | def is_scalar_field(field: ModelField) -> bool:
function copy_field_info (line 357) | def copy_field_info(*, field_info: FieldInfo, annotation: Any) -> FieldI...
function serialize_sequence_value (line 366) | def serialize_sequence_value(*, field: ModelField, value: Any) -> Sequen...
function get_missing_field_error (line 379) | def get_missing_field_error(loc: tuple[int | str, ...]) -> dict[str, Any]:
function create_body_model (line 387) | def create_body_model(
function get_model_fields (line 395) | def get_model_fields(model: type[BaseModel]) -> list[ModelField]:
function get_cached_model_fields (line 414) | def get_cached_model_fields(model: type[BaseModel]) -> list[ModelField]:
function normalize_name (line 425) | def normalize_name(name: str) -> str:
function get_model_name_map (line 429) | def get_model_name_map(unique_models: TypeModelSet) -> dict[TypeModelOrE...
function get_flat_models_from_model (line 437) | def get_flat_models_from_model(
function get_flat_models_from_annotation (line 446) | def get_flat_models_from_annotation(
function get_flat_models_from_field (line 462) | def get_flat_models_from_field(
function get_flat_models_from_fields (line 478) | def get_flat_models_from_fields(
function _regenerate_error_with_loc (line 486) | def _regenerate_error_with_loc(
FILE: fastapi/background.py
class BackgroundTasks (line 11) | class BackgroundTasks(StarletteBackgroundTasks):
method add_task (line 40) | def add_task(
FILE: fastapi/cli.py
function main (line 8) | def main() -> None:
FILE: fastapi/concurrency.py
function contextmanager_in_threadpool (line 18) | async def contextmanager_in_threadpool(
FILE: fastapi/datastructures.py
class UploadFile (line 21) | class UploadFile(StarletteUploadFile):
method write (line 66) | async def write(
method read (line 86) | async def read(
method seek (line 104) | async def seek(
method close (line 124) | async def close(self) -> None:
method _validate (line 133) | def _validate(cls, __input_value: Any, _: Any) -> "UploadFile":
method __get_pydantic_json_schema__ (line 139) | def __get_pydantic_json_schema__(
method __get_pydantic_core_schema__ (line 145) | def __get_pydantic_core_schema__(
class DefaultPlaceholder (line 153) | class DefaultPlaceholder:
method __init__ (line 161) | def __init__(self, value: Any):
method __bool__ (line 164) | def __bool__(self) -> bool:
method __eq__ (line 167) | def __eq__(self, o: object) -> bool:
function Default (line 174) | def Default(value: DefaultType) -> DefaultType:
FILE: fastapi/dependencies/models.py
function _unwrapped_call (line 18) | def _unwrapped_call(call: Callable[..., Any] | None) -> Any:
function _impartial (line 25) | def _impartial(func: Callable[..., Any]) -> Callable[..., Any]:
class Dependant (line 32) | class Dependant:
method oauth_scopes (line 54) | def oauth_scopes(self) -> list[str]:
method cache_key (line 63) | def cache_key(self) -> DependencyCacheKey:
method _uses_scopes (line 74) | def _uses_scopes(self) -> bool:
method _is_security_scheme (line 87) | def _is_security_scheme(self) -> bool:
method _security_scheme (line 95) | def _security_scheme(self) -> SecurityBase:
method _security_dependencies (line 101) | def _security_dependencies(self) -> list["Dependant"]:
method is_gen_callable (line 106) | def is_gen_callable(self) -> bool:
method is_async_gen_callable (line 132) | def is_async_gen_callable(self) -> bool:
method is_coroutine_callable (line 158) | def is_coroutine_callable(self) -> bool:
method computed_scope (line 188) | def computed_scope(self) -> str | None:
FILE: fastapi/dependencies/utils.py
function ensure_multipart_is_installed (line 94) | def ensure_multipart_is_installed() -> None:
function get_parameterless_sub_dependant (line 123) | def get_parameterless_sub_dependant(*, depends: params.Depends, path: st...
function get_flat_dependant (line 138) | def get_flat_dependant(
function _get_flat_fields_from_params (line 192) | def _get_flat_fields_from_params(fields: list[ModelField]) -> list[Model...
function get_flat_params (line 204) | def get_flat_params(dependant: Dependant) -> list[ModelField]:
function _get_signature (line 213) | def _get_signature(call: Callable[..., Any]) -> inspect.Signature:
function get_typed_signature (line 228) | def get_typed_signature(call: Callable[..., Any]) -> inspect.Signature:
function get_typed_annotation (line 245) | def get_typed_annotation(annotation: Any, globalns: dict[str, Any]) -> Any:
function get_typed_return_annotation (line 254) | def get_typed_return_annotation(call: Callable[..., Any]) -> Any:
function get_stream_item_type (line 276) | def get_stream_item_type(annotation: Any) -> Any | None:
function get_dependant (line 286) | def get_dependant(
function add_non_field_param_to_dependency (line 362) | def add_non_field_param_to_dependency(
class ParamDetails (line 387) | class ParamDetails:
function analyze_param (line 393) | def analyze_param(
function add_param_to_fields (line 562) | def add_param_to_fields(*, field: ModelField, dependant: Dependant) -> N...
function _solve_generator (line 578) | async def _solve_generator(
class SolvedDependency (line 590) | class SolvedDependency:
function solve_dependencies (line 598) | async def solve_dependencies(
function _validate_value_with_model_field (line 738) | def _validate_value_with_model_field(
function _is_json_field (line 749) | def _is_json_field(field: ModelField) -> bool:
function _get_multidict_value (line 753) | def _get_multidict_value(
function request_params_to_args (line 784) | def request_params_to_args(
function is_union_of_base_models (line 869) | def is_union_of_base_models(field_type: Any) -> bool:
function _should_embed_body_fields (line 888) | def _should_embed_body_fields(fields: list[ModelField]) -> bool:
function _extract_form_body (line 912) | async def _extract_form_body(
function request_body_to_args (line 951) | async def request_body_to_args(
function get_body_field (line 1001) | def get_body_field(
function get_validation_alias (line 1055) | def get_validation_alias(field: ModelField) -> str:
FILE: fastapi/encoders.py
class Color (line 39) | class Color: # type: ignore[no-redef]
class PyExtraColor (line 48) | class PyExtraColor: # type: ignore[no-redef]
function isoformat (line 53) | def isoformat(o: datetime.date | datetime.time) -> str:
function decimal_encoder (line 59) | def decimal_encoder(dec_value: Decimal) -> int | float:
function generate_encoders_by_class_tuples (line 115) | def generate_encoders_by_class_tuples(
function jsonable_encoder (line 129) | def jsonable_encoder(
FILE: fastapi/exception_handlers.py
function http_exception_handler (line 11) | async def http_exception_handler(request: Request, exc: HTTPException) -...
function request_validation_exception_handler (line 20) | async def request_validation_exception_handler(
function websocket_request_validation_exception_handler (line 29) | async def websocket_request_validation_exception_handler(
FILE: fastapi/exceptions.py
class EndpointContext (line 10) | class EndpointContext(TypedDict, total=False):
class HTTPException (line 17) | class HTTPException(StarletteHTTPException):
method __init__ (line 45) | def __init__(
class WebSocketException (line 86) | class WebSocketException(StarletteWebSocketException):
method __init__ (line 128) | def __init__(
class FastAPIError (line 161) | class FastAPIError(RuntimeError):
class DependencyScopeError (line 167) | class DependencyScopeError(FastAPIError):
class ValidationException (line 174) | class ValidationException(Exception):
method __init__ (line 175) | def __init__(
method errors (line 190) | def errors(self) -> Sequence[Any]:
method _format_endpoint_context (line 193) | def _format_endpoint_context(self) -> str:
method __str__ (line 204) | def __str__(self) -> str:
class RequestValidationError (line 212) | class RequestValidationError(ValidationException):
method __init__ (line 213) | def __init__(
class WebSocketRequestValidationError (line 224) | class WebSocketRequestValidationError(ValidationException):
method __init__ (line 225) | def __init__(
class ResponseValidationError (line 234) | class ResponseValidationError(ValidationException):
method __init__ (line 235) | def __init__(
class PydanticV1NotSupportedError (line 246) | class PydanticV1NotSupportedError(FastAPIError):
class FastAPIDeprecationWarning (line 252) | class FastAPIDeprecationWarning(UserWarning):
FILE: fastapi/middleware/asyncexitstack.py
class AsyncExitStackMiddleware (line 8) | class AsyncExitStackMiddleware:
method __init__ (line 9) | def __init__(
method __call__ (line 15) | async def __call__(self, scope: Scope, receive: Receive, send: Send) -...
FILE: fastapi/openapi/docs.py
function _html_safe_json (line 9) | def _html_safe_json(value: Any) -> str:
function get_swagger_ui_html (line 40) | def get_swagger_ui_html(
function get_redoc_html (line 197) | def get_redoc_html(
function get_swagger_ui_oauth2_redirect_html (line 301) | def get_swagger_ui_oauth2_redirect_html() -> HTMLResponse:
FILE: fastapi/openapi/models.py
class EmailStr (line 23) | class EmailStr(str): # type: ignore[no-redef]
method __get_validators__ (line 25) | def __get_validators__(cls) -> Iterable[Callable[..., Any]]:
method validate (line 29) | def validate(cls, v: Any) -> str:
method _validate (line 37) | def _validate(cls, __input_value: Any, _: Any) -> str:
method __get_pydantic_json_schema__ (line 45) | def __get_pydantic_json_schema__(
method __get_pydantic_core_schema__ (line 51) | def __get_pydantic_core_schema__(
class BaseModelWithConfig (line 57) | class BaseModelWithConfig(BaseModel):
class Contact (line 61) | class Contact(BaseModelWithConfig):
class License (line 67) | class License(BaseModelWithConfig):
class Info (line 73) | class Info(BaseModelWithConfig):
class ServerVariable (line 83) | class ServerVariable(BaseModelWithConfig):
class Server (line 89) | class Server(BaseModelWithConfig):
class Reference (line 95) | class Reference(BaseModel):
class Discriminator (line 99) | class Discriminator(BaseModel):
class XML (line 104) | class XML(BaseModelWithConfig):
class ExternalDocumentation (line 112) | class ExternalDocumentation(BaseModelWithConfig):
class Schema (line 123) | class Schema(BaseModelWithConfig):
class Example (line 212) | class Example(TypedDict, total=False):
class ParameterInType (line 221) | class ParameterInType(Enum):
class Encoding (line 228) | class Encoding(BaseModelWithConfig):
class MediaType (line 236) | class MediaType(BaseModelWithConfig):
class ParameterBase (line 243) | class ParameterBase(BaseModelWithConfig):
class Parameter (line 258) | class Parameter(ParameterBase):
class Header (line 263) | class Header(ParameterBase):
class RequestBody (line 267) | class RequestBody(BaseModelWithConfig):
class Link (line 273) | class Link(BaseModelWithConfig):
class Response (line 282) | class Response(BaseModelWithConfig):
class Operation (line 289) | class Operation(BaseModelWithConfig):
class PathItem (line 305) | class PathItem(BaseModelWithConfig):
class SecuritySchemeType (line 321) | class SecuritySchemeType(Enum):
class SecurityBase (line 328) | class SecurityBase(BaseModelWithConfig):
class APIKeyIn (line 333) | class APIKeyIn(Enum):
class APIKey (line 339) | class APIKey(SecurityBase):
class HTTPBase (line 345) | class HTTPBase(SecurityBase):
class HTTPBearer (line 350) | class HTTPBearer(HTTPBase):
class OAuthFlow (line 355) | class OAuthFlow(BaseModelWithConfig):
class OAuthFlowImplicit (line 360) | class OAuthFlowImplicit(OAuthFlow):
class OAuthFlowPassword (line 364) | class OAuthFlowPassword(OAuthFlow):
class OAuthFlowClientCredentials (line 368) | class OAuthFlowClientCredentials(OAuthFlow):
class OAuthFlowAuthorizationCode (line 372) | class OAuthFlowAuthorizationCode(OAuthFlow):
class OAuthFlows (line 377) | class OAuthFlows(BaseModelWithConfig):
class OAuth2 (line 384) | class OAuth2(SecurityBase):
class OpenIdConnect (line 389) | class OpenIdConnect(SecurityBase):
class Components (line 399) | class Components(BaseModelWithConfig):
class Tag (line 413) | class Tag(BaseModelWithConfig):
class OpenAPI (line 419) | class OpenAPI(BaseModelWithConfig):
FILE: fastapi/openapi/utils.py
function get_openapi_security_definitions (line 81) | def get_openapi_security_definitions(
function _get_openapi_operation_parameters (line 107) | def _get_openapi_operation_parameters(
function get_openapi_operation_request_body (line 180) | def get_openapi_operation_request_body(
function generate_operation_id (line 215) | def generate_operation_id(
function generate_operation_summary (line 230) | def generate_operation_summary(*, route: routing.APIRoute, method: str) ...
function get_openapi_operation_metadata (line 236) | def get_openapi_operation_metadata(
function get_openapi_path (line 260) | def get_openapi_path(
function get_fields_from_routes (line 481) | def get_fields_from_routes(
function get_openapi (line 514) | def get_openapi(
FILE: fastapi/param_functions.py
function Path (line 13) | def Path( # noqa: N802
function Query (line 357) | def Query( # noqa: N802
function Header (line 701) | def Header( # noqa: N802
function Cookie (line 1018) | def Cookie( # noqa: N802
function Body (line 1323) | def Body( # noqa: N802
function Form (line 1653) | def Form( # noqa: N802
function File (line 1968) | def File( # noqa: N802
function Depends (line 2283) | def Depends( # noqa: N802
function Security (line 2372) | def Security( # noqa: N802
FILE: fastapi/params.py
class ParamTypes (line 19) | class ParamTypes(Enum):
class Param (line 26) | class Param(FieldInfo): # type: ignore[misc] # ty: ignore[subclass-of-...
method __init__ (line 29) | def __init__(
method __repr__ (line 133) | def __repr__(self) -> str:
class Path (line 137) | class Path(Param): # type: ignore[misc]
method __init__ (line 140) | def __init__(
class Query (line 221) | class Query(Param): # type: ignore[misc]
method __init__ (line 224) | def __init__(
class Header (line 303) | class Header(Param): # type: ignore[misc]
method __init__ (line 306) | def __init__(
class Cookie (line 387) | class Cookie(Param): # type: ignore[misc]
method __init__ (line 390) | def __init__(
class Body (line 469) | class Body(FieldInfo): # type: ignore[misc] # ty: ignore[subclass-of-f...
method __init__ (line 470) | def __init__(
method __repr__ (line 577) | def __repr__(self) -> str:
class Form (line 581) | class Form(Body): # type: ignore[misc]
method __init__ (line 582) | def __init__(
class File (line 663) | class File(Form): # type: ignore[misc]
method __init__ (line 664) | def __init__(
class Depends (line 746) | class Depends:
class Security (line 753) | class Security(Depends):
FILE: fastapi/responses.py
class _UjsonModule (line 16) | class _UjsonModule(Protocol):
method dumps (line 17) | def dumps(self, __obj: Any, *, ensure_ascii: bool = ...) -> str: ...
class _OrjsonModule (line 20) | class _OrjsonModule(Protocol):
method dumps (line 24) | def dumps(self, __obj: Any, *, option: int = ...) -> bytes: ...
class UJSONResponse (line 48) | class UJSONResponse(JSONResponse):
method render (line 64) | def render(self, content: Any) -> bytes:
class ORJSONResponse (line 78) | class ORJSONResponse(JSONResponse):
method render (line 94) | def render(self, content: Any) -> bytes:
FILE: fastapi/security/api_key.py
class APIKeyBase (line 11) | class APIKeyBase(SecurityBase):
method __init__ (line 14) | def __init__(
method make_not_authenticated_error (line 31) | def make_not_authenticated_error(self) -> HTTPException:
method check_api_key (line 47) | def check_api_key(self, api_key: str | None) -> str | None:
class APIKeyQuery (line 55) | class APIKeyQuery(APIKeyBase):
method __init__ (line 87) | def __init__(
method __call__ (line 142) | async def __call__(self, request: Request) -> str | None:
class APIKeyHeader (line 147) | class APIKeyHeader(APIKeyBase):
method __init__ (line 179) | def __init__(
method __call__ (line 230) | async def __call__(self, request: Request) -> str | None:
class APIKeyCookie (line 235) | class APIKeyCookie(APIKeyBase):
method __init__ (line 267) | def __init__(
method __call__ (line 318) | async def __call__(self, request: Request) -> str | None:
FILE: fastapi/security/base.py
class SecurityBase (line 4) | class SecurityBase:
FILE: fastapi/security/http.py
class HTTPBasicCredentials (line 16) | class HTTPBasicCredentials(BaseModel):
class HTTPAuthorizationCredentials (line 29) | class HTTPAuthorizationCredentials(BaseModel):
class HTTPBase (line 69) | class HTTPBase(SecurityBase):
method __init__ (line 72) | def __init__(
method make_authenticate_headers (line 84) | def make_authenticate_headers(self) -> dict[str, str]:
method make_not_authenticated_error (line 87) | def make_not_authenticated_error(self) -> HTTPException:
method __call__ (line 94) | async def __call__(self, request: Request) -> HTTPAuthorizationCredent...
class HTTPBasic (line 105) | class HTTPBasic(HTTPBase):
method __init__ (line 140) | def __init__(
method make_authenticate_headers (line 197) | def make_authenticate_headers(self) -> dict[str, str]:
method __call__ (line 202) | async def __call__( # type: ignore
class HTTPBearer (line 222) | class HTTPBearer(HTTPBase):
method __init__ (line 254) | def __init__(
method __call__ (line 303) | async def __call__(self, request: Request) -> HTTPAuthorizationCredent...
class HTTPDigest (line 319) | class HTTPDigest(HTTPBase):
method __init__ (line 357) | def __init__(
method __call__ (line 404) | async def __call__(self, request: Request) -> HTTPAuthorizationCredent...
FILE: fastapi/security/oauth2.py
class OAuth2PasswordRequestForm (line 14) | class OAuth2PasswordRequestForm:
method __init__ (line 59) | def __init__(
class OAuth2PasswordRequestFormStrict (line 162) | class OAuth2PasswordRequestFormStrict(OAuth2PasswordRequestForm):
method __init__ (line 226) | def __init__(
class OAuth2 (line 330) | class OAuth2(SecurityBase):
method __init__ (line 343) | def __init__(
method make_not_authenticated_error (line 401) | def make_not_authenticated_error(self) -> HTTPException:
method __call__ (line 423) | async def __call__(self, request: Request) -> str | None:
class OAuth2PasswordBearer (line 433) | class OAuth2PasswordBearer(OAuth2):
method __init__ (line 442) | def __init__(
method __call__ (line 536) | async def __call__(self, request: Request) -> str | None:
class OAuth2AuthorizationCodeBearer (line 547) | class OAuth2AuthorizationCodeBearer(OAuth2):
method __init__ (line 553) | def __init__(
method __call__ (line 642) | async def __call__(self, request: Request) -> str | None:
class SecurityScopes (line 653) | class SecurityScopes:
method __init__ (line 666) | def __init__(
FILE: fastapi/security/open_id_connect_url.py
class OpenIdConnect (line 11) | class OpenIdConnect(SecurityBase):
method __init__ (line 22) | def __init__(
method make_not_authenticated_error (line 80) | def make_not_authenticated_error(self) -> HTTPException:
method __call__ (line 87) | async def __call__(self, request: Request) -> str | None:
FILE: fastapi/security/utils.py
function get_authorization_scheme_param (line 1) | def get_authorization_scheme_param(
FILE: fastapi/sse.py
class EventSourceResponse (line 20) | class EventSourceResponse(StreamingResponse):
function _check_id_no_null (line 36) | def _check_id_no_null(v: str | None) -> str | None:
class ServerSentEvent (line 42) | class ServerSentEvent(BaseModel):
method _check_data_exclusive (line 136) | def _check_data_exclusive(self) -> "ServerSentEvent":
function format_sse_event (line 146) | def format_sse_event(
FILE: fastapi/utils.py
function is_body_allowed_for_status_code (line 26) | def is_body_allowed_for_status_code(status_code: int | str | None) -> bool:
function get_path_param_names (line 43) | def get_path_param_names(path: str) -> set[str]:
function create_model_field (line 58) | def create_model_field(
function generate_operation_id_for_path (line 80) | def generate_operation_id_for_path(
function generate_unique_id (line 95) | def generate_unique_id(route: "APIRoute") -> str:
function deep_dict_update (line 103) | def deep_dict_update(main_dict: dict[Any, Any], update_dict: dict[Any, A...
function get_value_or_default (line 121) | def get_value_or_default(
FILE: scripts/add_latest_release_date.py
function main (line 11) | def main() -> None:
FILE: scripts/contributors.py
class Author (line 59) | class Author(BaseModel):
class LabelNode (line 65) | class LabelNode(BaseModel):
class Labels (line 69) | class Labels(BaseModel):
class ReviewNode (line 73) | class ReviewNode(BaseModel):
class Reviews (line 78) | class Reviews(BaseModel):
class PullRequestNode (line 82) | class PullRequestNode(BaseModel):
class PullRequestEdge (line 94) | class PullRequestEdge(BaseModel):
class PullRequests (line 99) | class PullRequests(BaseModel):
class PRsRepository (line 103) | class PRsRepository(BaseModel):
class PRsResponseData (line 107) | class PRsResponseData(BaseModel):
class PRsResponse (line 111) | class PRsResponse(BaseModel):
class Settings (line 115) | class Settings(BaseSettings):
function get_graphql_response (line 121) | def get_graphql_response(
function get_graphql_pr_edges (line 148) | def get_graphql_pr_edges(
function get_pr_nodes (line 156) | def get_pr_nodes(settings: Settings) -> list[PullRequestNode]:
class ContributorsResults (line 168) | class ContributorsResults(BaseModel):
function get_contributors (line 175) | def get_contributors(pr_nodes: list[PullRequestNode]) -> ContributorsRes...
function get_users_to_write (line 207) | def get_users_to_write(
function update_content (line 226) | def update_content(*, content_path: Path, new_content: Any) -> bool:
function main (line 238) | def main() -> None:
FILE: scripts/deploy_docs_status.py
class Settings (line 10) | class Settings(BaseSettings):
class LinkData (line 19) | class LinkData(BaseModel):
function main (line 25) | def main() -> None:
FILE: scripts/doc_parsing_utils.py
class CodeIncludeInfo (line 37) | class CodeIncludeInfo(TypedDict):
class HeaderPermalinkInfo (line 42) | class HeaderPermalinkInfo(TypedDict):
class MarkdownLinkInfo (line 49) | class MarkdownLinkInfo(TypedDict):
class HTMLLinkAttribute (line 58) | class HTMLLinkAttribute(TypedDict):
class HtmlLinkInfo (line 64) | class HtmlLinkInfo(TypedDict):
class MultilineCodeBlockInfo (line 71) | class MultilineCodeBlockInfo(TypedDict):
function extract_code_includes (line 81) | def extract_code_includes(lines: list[str]) -> list[CodeIncludeInfo]:
function replace_code_includes_with_placeholders (line 97) | def replace_code_includes_with_placeholders(text: list[str]) -> list[str]:
function replace_placeholders_with_code_includes (line 109) | def replace_placeholders_with_code_includes(
function extract_header_permalinks (line 141) | def extract_header_permalinks(lines: list[str]) -> list[HeaderPermalinkI...
function remove_header_permalinks (line 192) | def remove_header_permalinks(lines: list[str]) -> list[str]:
function replace_header_permalinks (line 209) | def replace_header_permalinks(
function extract_markdown_links (line 252) | def extract_markdown_links(lines: list[str]) -> list[MarkdownLinkInfo]:
function _add_lang_code_to_url (line 279) | def _add_lang_code_to_url(url: str, lang_code: str) -> str:
function _construct_markdown_link (line 287) | def _construct_markdown_link(
function replace_markdown_links (line 310) | def replace_markdown_links(
function extract_html_links (line 357) | def extract_html_links(lines: list[str]) -> list[HtmlLinkInfo]:
function _construct_html_link (line 406) | def _construct_html_link(
function replace_html_links (line 433) | def replace_html_links(
function get_code_block_lang (line 475) | def get_code_block_lang(line: str) -> str:
function extract_multiline_code_blocks (line 482) | def extract_multiline_code_blocks(text: list[str]) -> list[MultilineCode...
function _split_hash_comment (line 552) | def _split_hash_comment(line: str) -> tuple[str, str | None]:
function _split_slashes_comment (line 561) | def _split_slashes_comment(line: str) -> tuple[str, str | None]:
function replace_multiline_code_block (line 570) | def replace_multiline_code_block(
function replace_multiline_code_blocks_in_text (line 643) | def replace_multiline_code_blocks_in_text(
function check_translation (line 676) | def check_translation(
FILE: scripts/docs.py
function strip_markdown_links (line 73) | def strip_markdown_links(text: str) -> str:
class VisibleTextExtractor (line 78) | class VisibleTextExtractor(HTMLParser):
method __init__ (line 81) | def __init__(self):
method handle_data (line 85) | def handle_data(self, data):
method extract_visible_text (line 88) | def extract_visible_text(self, html: str) -> str:
function slugify (line 95) | def slugify(text: str) -> str:
function get_en_config (line 107) | def get_en_config() -> dict[str, Any]:
function get_lang_paths (line 111) | def get_lang_paths() -> list[Path]:
function lang_callback (line 115) | def lang_callback(lang: str | None) -> str | None:
function complete_existing_lang (line 122) | def complete_existing_lang(incomplete: str):
function callback (line 130) | def callback() -> None:
function new_lang (line 136) | def new_lang(lang: str = typer.Argument(..., callback=lang_callback)):
function build_lang (line 154) | def build_lang(
function remove_header_permalinks (line 207) | def remove_header_permalinks(content: str):
function generate_readme_content (line 218) | def generate_readme_content() -> str:
function generate_readme (line 250) | def generate_readme() -> None:
function build_all (line 266) | def build_all() -> None:
function update_languages (line 286) | def update_languages() -> None:
function serve (line 304) | def serve() -> None:
function live (line 326) | def live(
function get_updated_config_content (line 354) | def get_updated_config_content() -> dict[str, Any]:
function ensure_non_translated (line 388) | def ensure_non_translated() -> None:
function langs_json (line 415) | def langs_json():
function generate_docs_src_versions_for_file (line 424) | def generate_docs_src_versions_for_file(file_path: Path) -> None:
function generate_docs_src_versions (line 485) | def generate_docs_src_versions() -> None:
function copy_py39_to_py310 (line 495) | def copy_py39_to_py310() -> None:
function update_docs_includes_py39_to_py310 (line 527) | def update_docs_includes_py39_to_py310() -> None:
function remove_unused_docs_src (line 551) | def remove_unused_docs_src() -> None:
function add_permalinks_page (line 661) | def add_permalinks_page(path: Path, update_existing: bool = False):
function add_permalinks_pages (line 725) | def add_permalinks_pages(pages: list[Path], update_existing: bool = Fals...
function add_permalinks (line 734) | def add_permalinks(update_existing: bool = False) -> None:
FILE: scripts/label_approved.py
class LabelSettings (line 10) | class LabelSettings(BaseModel):
class Settings (line 18) | class Settings(BaseSettings):
FILE: scripts/mkdocs_hooks.py
function get_missing_translation_content (line 23) | def get_missing_translation_content(docs_dir: str) -> str:
function get_translation_banner_content (line 30) | def get_translation_banner_content(docs_dir: str) -> str:
function get_mkdocs_material_langs (line 41) | def get_mkdocs_material_langs() -> list[str]:
class EnFile (line 48) | class EnFile(File):
function on_config (line 52) | def on_config(config: MkDocsConfig, **kwargs: Any) -> MkDocsConfig:
function resolve_file (line 63) | def resolve_file(*, item: str, files: Files, config: MkDocsConfig) -> None:
function resolve_files (line 79) | def resolve_files(*, items: list[Any], files: Files, config: MkDocsConfi...
function on_files (line 96) | def on_files(files: Files, *, config: MkDocsConfig) -> Files:
function generate_renamed_section_items (line 107) | def generate_renamed_section_items(
function on_nav (line 132) | def on_nav(
function on_pre_page (line 139) | def on_pre_page(page: Page, *, config: MkDocsConfig, files: Files) -> Page:
function on_page_markdown (line 143) | def on_page_markdown(
FILE: scripts/notify_translations.py
class Comment (line 87) | class Comment(BaseModel):
class UpdateDiscussionComment (line 93) | class UpdateDiscussionComment(BaseModel):
class UpdateCommentData (line 97) | class UpdateCommentData(BaseModel):
class UpdateCommentResponse (line 101) | class UpdateCommentResponse(BaseModel):
class AddDiscussionComment (line 105) | class AddDiscussionComment(BaseModel):
class AddCommentData (line 109) | class AddCommentData(BaseModel):
class AddCommentResponse (line 113) | class AddCommentResponse(BaseModel):
class CommentsEdge (line 117) | class CommentsEdge(BaseModel):
class Comments (line 122) | class Comments(BaseModel):
class CommentsDiscussion (line 126) | class CommentsDiscussion(BaseModel):
class CommentsRepository (line 130) | class CommentsRepository(BaseModel):
class CommentsData (line 134) | class CommentsData(BaseModel):
class CommentsResponse (line 138) | class CommentsResponse(BaseModel):
class AllDiscussionsLabelNode (line 142) | class AllDiscussionsLabelNode(BaseModel):
class AllDiscussionsLabelsEdge (line 147) | class AllDiscussionsLabelsEdge(BaseModel):
class AllDiscussionsDiscussionLabels (line 151) | class AllDiscussionsDiscussionLabels(BaseModel):
class AllDiscussionsDiscussionNode (line 155) | class AllDiscussionsDiscussionNode(BaseModel):
class AllDiscussionsDiscussions (line 162) | class AllDiscussionsDiscussions(BaseModel):
class AllDiscussionsRepository (line 166) | class AllDiscussionsRepository(BaseModel):
class AllDiscussionsData (line 170) | class AllDiscussionsData(BaseModel):
class AllDiscussionsResponse (line 174) | class AllDiscussionsResponse(BaseModel):
class Settings (line 178) | class Settings(BaseSettings):
class PartialGitHubEventIssue (line 190) | class PartialGitHubEventIssue(BaseModel):
class PartialGitHubEvent (line 194) | class PartialGitHubEvent(BaseModel):
function get_graphql_response (line 198) | def get_graphql_response(
function get_graphql_translation_discussions (line 239) | def get_graphql_translation_discussions(
function get_graphql_translation_discussion_comments_edges (line 251) | def get_graphql_translation_discussion_comments_edges(
function get_graphql_translation_discussion_comments (line 264) | def get_graphql_translation_discussion_comments(
function create_comment (line 284) | def create_comment(*, settings: Settings, discussion_id: str, body: str)...
function update_comment (line 295) | def update_comment(*, settings: Settings, comment_id: str, body: str) ->...
function main (line 306) | def main() -> None:
FILE: scripts/people.py
class RateLimiter (line 27) | class RateLimiter:
method __init__ (line 28) | def __init__(self) -> None:
method __enter__ (line 35) | def __enter__(self) -> "RateLimiter":
method __exit__ (line 62) | def __exit__(self, exc_type, exc_val, exc_tb) -> None:
method update_request_info (line 65) | def update_request_info(self, cost: int, remaining: int, reset_at: str...
class Author (line 130) | class Author(BaseModel):
class CommentsNode (line 136) | class CommentsNode(BaseModel):
class Replies (line 142) | class Replies(BaseModel):
class DiscussionsCommentsNode (line 147) | class DiscussionsCommentsNode(CommentsNode):
class DiscussionsComments (line 152) | class DiscussionsComments(BaseModel):
class DiscussionsNode (line 157) | class DiscussionsNode(BaseModel):
class DiscussionsEdge (line 165) | class DiscussionsEdge(BaseModel):
class Discussions (line 170) | class Discussions(BaseModel):
class DiscussionsRepository (line 174) | class DiscussionsRepository(BaseModel):
class DiscussionsResponseData (line 178) | class DiscussionsResponseData(BaseModel):
class DiscussionsResponse (line 182) | class DiscussionsResponse(BaseModel):
class Settings (line 186) | class Settings(BaseSettings):
function get_graphql_response (line 193) | def get_graphql_response(
function get_graphql_question_discussion_edges (line 223) | def get_graphql_question_discussion_edges(
class DiscussionExpertsResults (line 245) | class DiscussionExpertsResults(BaseModel):
function get_discussion_nodes (line 254) | def get_discussion_nodes(settings: Settings) -> list[DiscussionsNode]:
function get_discussions_experts (line 268) | def get_discussions_experts(
function get_top_users (line 337) | def get_top_users(
function get_users_to_write (line 361) | def get_users_to_write(
function update_content (line 383) | def update_content(*, content_path: Path, new_content: Any) -> bool:
function main (line 395) | def main() -> None:
FILE: scripts/playwright/cookie_param_models/image01.py
function run (line 9) | def run(playwright: Playwright) -> None:
FILE: scripts/playwright/header_param_models/image01.py
function run (line 9) | def run(playwright: Playwright) -> None:
FILE: scripts/playwright/json_base64_bytes/image01.py
function run (line 9) | def run(playwright: Playwright) -> None:
FILE: scripts/playwright/query_param_models/image01.py
function run (line 9) | def run(playwright: Playwright) -> None:
FILE: scripts/playwright/request_form_models/image01.py
function run (line 9) | def run(playwright: Playwright) -> None:
FILE: scripts/playwright/separate_openapi_schemas/image01.py
function run (line 7) | def run(playwright: Playwright) -> None:
FILE: scripts/playwright/separate_openapi_schemas/image02.py
function run (line 7) | def run(playwright: Playwright) -> None:
FILE: scripts/playwright/separate_openapi_schemas/image03.py
function run (line 7) | def run(playwright: Playwright) -> None:
FILE: scripts/playwright/separate_openapi_schemas/image04.py
function run (line 7) | def run(playwright: Playwright) -> None:
FILE: scripts/playwright/separate_openapi_schemas/image05.py
function run (line 7) | def run(playwright: Playwright) -> None:
FILE: scripts/playwright/sql_databases/image01.py
function run (line 9) | def run(playwright: Playwright) -> None:
FILE: scripts/playwright/sql_databases/image02.py
function run (line 9) | def run(playwright: Playwright) -> None:
FILE: scripts/sponsors.py
class SponsorEntity (line 48) | class SponsorEntity(BaseModel):
class Tier (line 54) | class Tier(BaseModel):
class SponsorshipAsMaintainerNode (line 59) | class SponsorshipAsMaintainerNode(BaseModel):
class SponsorshipAsMaintainerEdge (line 64) | class SponsorshipAsMaintainerEdge(BaseModel):
class SponsorshipAsMaintainer (line 69) | class SponsorshipAsMaintainer(BaseModel):
class SponsorsUser (line 73) | class SponsorsUser(BaseModel):
class SponsorsResponseData (line 77) | class SponsorsResponseData(BaseModel):
class SponsorsResponse (line 81) | class SponsorsResponse(BaseModel):
class Settings (line 85) | class Settings(BaseSettings):
function get_graphql_response (line 92) | def get_graphql_response(
function get_graphql_sponsor_edges (line 119) | def get_graphql_sponsor_edges(
function get_individual_sponsors (line 127) | def get_individual_sponsors(
function update_content (line 147) | def update_content(*, content_path: Path, new_content: Any) -> bool:
function main (line 159) | def main() -> None:
FILE: scripts/tests/test_translation_fixer/conftest.py
function pytest_collection_modifyitems (line 16) | def pytest_collection_modifyitems(config, items: list[pytest.Item]) -> N...
function get_runner (line 27) | def get_runner():
function prepare_paths (line 34) | def prepare_paths(runner):
function copy_test_files (line 44) | def copy_test_files(root_dir: Path, request: pytest.FixtureRequest):
FILE: scripts/tests/test_translation_fixer/test_code_blocks/test_code_blocks_lines_number_mismatch.py
function test_gt (line 18) | def test_gt(runner: CliRunner, root_dir: Path, copy_test_files):
function test_lt (line 42) | def test_lt(runner: CliRunner, root_dir: Path, copy_test_files):
FILE: scripts/tests/test_translation_fixer/test_code_blocks/test_code_blocks_mermaid.py
function test_translated (line 18) | def test_translated(runner: CliRunner, root_dir: Path, copy_test_files):
function test_not_translated (line 46) | def test_not_translated(runner: CliRunner, root_dir: Path, copy_test_fil...
FILE: scripts/tests/test_translation_fixer/test_code_blocks/test_code_blocks_number_mismatch.py
function test_gt (line 18) | def test_gt(runner: CliRunner, root_dir: Path, copy_test_files):
function test_lt (line 43) | def test_lt(runner: CliRunner, root_dir: Path, copy_test_files):
FILE: scripts/tests/test_translation_fixer/test_code_blocks/test_code_blocks_wrong_lang_code.py
function test_wrong_lang_code_1 (line 18) | def test_wrong_lang_code_1(runner: CliRunner, root_dir: Path, copy_test_...
function test_wrong_lang_code_2 (line 42) | def test_wrong_lang_code_2(runner: CliRunner, root_dir: Path, copy_test_...
FILE: scripts/tests/test_translation_fixer/test_code_includes/test_number_mismatch.py
function test_gt (line 18) | def test_gt(runner: CliRunner, root_dir: Path, copy_test_files):
function test_lt (line 43) | def test_lt(runner: CliRunner, root_dir: Path, copy_test_files):
FILE: scripts/tests/test_translation_fixer/test_complex_doc/test_compex_doc.py
function test_fix (line 18) | def test_fix(runner: CliRunner, root_dir: Path, copy_test_files):
FILE: scripts/tests/test_translation_fixer/test_header_permalinks/test_header_level_mismatch.py
function test_level_mismatch_1 (line 18) | def test_level_mismatch_1(runner: CliRunner, root_dir: Path, copy_test_f...
function test_level_mismatch_2 (line 43) | def test_level_mismatch_2(runner: CliRunner, root_dir: Path, copy_test_f...
FILE: scripts/tests/test_translation_fixer/test_header_permalinks/test_header_number_mismatch.py
function test_gt (line 18) | def test_gt(runner: CliRunner, root_dir: Path, copy_test_files):
function test_lt (line 43) | def test_lt(runner: CliRunner, root_dir: Path, copy_test_files):
FILE: scripts/tests/test_translation_fixer/test_html_links/test_html_links_number_mismatch.py
function test_gt (line 16) | def test_gt(runner: CliRunner, root_dir: Path, copy_test_files):
function test_lt (line 41) | def test_lt(runner: CliRunner, root_dir: Path, copy_test_files):
FILE: scripts/tests/test_translation_fixer/test_markdown_links/test_mkd_links_number_mismatch.py
function test_gt (line 18) | def test_gt(runner: CliRunner, root_dir: Path, copy_test_files):
function test_lt (line 43) | def test_lt(runner: CliRunner, root_dir: Path, copy_test_files):
FILE: scripts/topic_repos.py
class Settings (line 12) | class Settings(BaseSettings):
class Repo (line 17) | class Repo(BaseModel):
function main (line 25) | def main() -> None:
FILE: scripts/translate.py
function get_langs (line 36) | def get_langs() -> dict[str, str]:
function generate_lang_path (line 40) | def generate_lang_path(*, lang: str, path: Path) -> Path:
function generate_en_path (line 50) | def generate_en_path(*, lang: str, path: Path) -> Path:
function get_prompt (line 60) | def get_prompt(
function translate_page (line 106) | def translate_page(
function iter_all_en_paths (line 180) | def iter_all_en_paths() -> Iterable[Path]:
function iter_en_paths_to_translate (line 204) | def iter_en_paths_to_translate() -> Iterable[Path]:
function translate_lang (line 213) | def translate_lang(language: Annotated[str, typer.Option(envvar="LANGUAG...
function get_llm_translatable (line 241) | def get_llm_translatable() -> list[str]:
function list_llm_translatable (line 254) | def list_llm_translatable() -> list[str]:
function llm_translatable_json (line 261) | def llm_translatable_json(
function commands_json (line 275) | def commands_json(
function list_removable (line 301) | def list_removable(language: str) -> list[Path]:
function list_all_removable (line 313) | def list_all_removable() -> list[Path]:
function remove_removable (line 326) | def remove_removable(language: Annotated[str, typer.Option(envvar="LANGU...
function remove_all_removable (line 335) | def remove_all_removable() -> None:
function list_missing (line 344) | def list_missing(language: str) -> list[Path]:
function list_outdated (line 356) | def list_outdated(language: str) -> list[Path]:
function update_outdated (line 379) | def update_outdated(
function add_missing (line 392) | def add_missing(
function update_and_add (line 405) | def update_and_add(
function make_pr (line 417) | def make_pr(
FILE: scripts/translation_fixer.py
function callback (line 26) | def callback():
function iter_all_lang_paths (line 30) | def iter_all_lang_paths(lang_path_root: Path) -> Iterable[Path]:
function get_all_paths (line 55) | def get_all_paths(lang: str):
function process_one_page (line 65) | def process_one_page(path: Path) -> bool:
function fix_all (line 102) | def fix_all(ctx: typer.Context, language: str):
function fix_pages (line 116) | def fix_pages(
FILE: tests/benchmarks/test_general_performance.py
function dep_a (line 41) | def dep_a():
function dep_b (line 45) | def dep_b(a: Annotated[int, Depends(dep_a)]):
class ItemIn (line 49) | class ItemIn(BaseModel):
class ItemOut (line 54) | class ItemOut(BaseModel):
class LargeIn (line 60) | class LargeIn(BaseModel):
class LargeOut (line 65) | class LargeOut(BaseModel):
function sync_validated (line 74) | def sync_validated(item: ItemIn, dep: Annotated[int, Depends(dep_b)]):
function sync_dict_no_response_model (line 79) | def sync_dict_no_response_model():
function sync_dict_with_response_model (line 84) | def sync_dict_with_response_model(
function sync_model_no_response_model (line 91) | def sync_model_no_response_model(dep: Annotated[int, Depends(dep_b)]):
function sync_model_with_response_model (line 96) | def sync_model_with_response_model(dep: Annotated[int, Depends(dep_b)]):
function async_validated (line 101) | async def async_validated(
function sync_large_receive (line 109) | def sync_large_receive(payload: LargeIn):
function async_large_receive (line 114) | async def async_large_receive(payload: LargeIn):
function sync_large_dict_no_response_model (line 119) | def sync_large_dict_no_response_model():
function sync_large_dict_with_response_model (line 124) | def sync_large_dict_with_response_model():
function sync_large_model_no_response_model (line 129) | def sync_large_model_no_response_model():
function sync_large_model_with_response_model (line 134) | def sync_large_model_with_response_model():
function async_large_dict_no_response_model (line 139) | async def async_large_dict_no_response_model():
function async_large_dict_with_response_model (line 144) | async def async_large_dict_with_response_model():
function async_large_model_no_response_model (line 149) | async def async_large_model_no_response_model():
function async_large_model_with_response_model (line 154) | async def async_large_model_with_response_model():
function async_dict_no_response_model (line 159) | async def async_dict_no_response_model():
function async_dict_with_response_model (line 164) | async def async_dict_with_response_model(
function async_model_no_response_model (line 171) | async def async_model_no_response_model(
function async_model_with_response_model (line 178) | async def async_model_with_response_model(
function client (line 185) | def client() -> Iterator[TestClient]:
function _bench_get (line 190) | def _bench_get(benchmark, client: TestClient, path: str) -> tuple[int, b...
function _bench_post_json (line 201) | def _bench_post_json(
function test_sync_receiving_validated_pydantic_model (line 214) | def test_sync_receiving_validated_pydantic_model(benchmark, client: Test...
function test_sync_return_dict_without_response_model (line 225) | def test_sync_return_dict_without_response_model(benchmark, client: Test...
function test_sync_return_dict_with_response_model (line 231) | def test_sync_return_dict_with_response_model(benchmark, client: TestCli...
function test_sync_return_model_without_response_model (line 237) | def test_sync_return_model_without_response_model(
function test_sync_return_model_with_response_model (line 245) | def test_sync_return_model_with_response_model(benchmark, client: TestCl...
function test_async_receiving_validated_pydantic_model (line 251) | def test_async_receiving_validated_pydantic_model(
function test_async_return_dict_without_response_model (line 261) | def test_async_return_dict_without_response_model(
function test_async_return_dict_with_response_model (line 269) | def test_async_return_dict_with_response_model(benchmark, client: TestCl...
function test_async_return_model_without_response_model (line 275) | def test_async_return_model_without_response_model(
function test_async_return_model_with_response_model (line 283) | def test_async_return_model_with_response_model(benchmark, client: TestC...
function test_sync_receiving_large_payload (line 291) | def test_sync_receiving_large_payload(benchmark, client: TestClient) -> ...
function test_async_receiving_large_payload (line 302) | def test_async_receiving_large_payload(benchmark, client: TestClient) ->...
function _expected_large_payload_json_bytes (line 313) | def _expected_large_payload_json_bytes() -> bytes:
function test_sync_return_large_dict_without_response_model (line 322) | def test_sync_return_large_dict_without_response_model(
function test_sync_return_large_dict_with_response_model (line 332) | def test_sync_return_large_dict_with_response_model(
function test_sync_return_large_model_without_response_model (line 342) | def test_sync_return_large_model_without_response_model(
function test_sync_return_large_model_with_response_model (line 352) | def test_sync_return_large_model_with_response_model(
function test_async_return_large_dict_without_response_model (line 362) | def test_async_return_large_dict_without_response_model(
function test_async_return_large_dict_with_response_model (line 372) | def test_async_return_large_dict_with_response_model(
function test_async_return_large_model_without_response_model (line 382) | def test_async_return_large_model_without_response_model(
function test_async_return_large_model_with_response_model (line 392) | def test_async_return_large_model_with_response_model(
FILE: tests/forward_reference_type.py
function forwardref_method (line 4) | def forwardref_method(input: "ForwardRefModel") -> "ForwardRefModel":
class ForwardRefModel (line 8) | class ForwardRefModel(BaseModel):
FILE: tests/main.py
function non_operation (line 14) | def non_operation():
function non_decorated_route (line 18) | def non_decorated_route():
function get_text (line 26) | def get_text():
function get_id (line 31) | def get_id(item_id):
function get_str_id (line 36) | def get_str_id(item_id: str):
function get_int_id (line 41) | def get_int_id(item_id: int):
function get_float_id (line 46) | def get_float_id(item_id: float):
function get_bool_id (line 51) | def get_bool_id(item_id: bool):
function get_path_param_id (line 56) | def get_path_param_id(item_id: str | None = Path()):
function get_path_param_min_length (line 61) | def get_path_param_min_length(item_id: str = Path(min_length=3)):
function get_path_param_max_length (line 66) | def get_path_param_max_length(item_id: str = Path(max_length=3)):
function get_path_param_min_max_length (line 71) | def get_path_param_min_max_length(item_id: str = Path(max_length=3, min_...
function get_path_param_gt (line 76) | def get_path_param_gt(item_id: float = Path(gt=3)):
function get_path_param_gt0 (line 81) | def get_path_param_gt0(item_id: float = Path(gt=0)):
function get_path_param_ge (line 86) | def get_path_param_ge(item_id: float = Path(ge=3)):
function get_path_param_lt (line 91) | def get_path_param_lt(item_id: float = Path(lt=3)):
function get_path_param_lt0 (line 96) | def get_path_param_lt0(item_id: float = Path(lt=0)):
function get_path_param_le (line 101) | def get_path_param_le(item_id: float = Path(le=3)):
function get_path_param_lt_gt (line 106) | def get_path_param_lt_gt(item_id: float = Path(lt=3, gt=1)):
function get_path_param_le_ge (line 111) | def get_path_param_le_ge(item_id: float = Path(le=3, ge=1)):
function get_path_param_lt_int (line 116) | def get_path_param_lt_int(item_id: int = Path(lt=3)):
function get_path_param_gt_int (line 121) | def get_path_param_gt_int(item_id: int = Path(gt=3)):
function get_path_param_le_int (line 126) | def get_path_param_le_int(item_id: int = Path(le=3)):
function get_path_param_ge_int (line 131) | def get_path_param_ge_int(item_id: int = Path(ge=3)):
function get_path_param_lt_gt_int (line 136) | def get_path_param_lt_gt_int(item_id: int = Path(lt=3, gt=1)):
function get_path_param_le_ge_int (line 141) | def get_path_param_le_ge_int(item_id: int = Path(le=3, ge=1)):
function get_query (line 146) | def get_query(query):
function get_query_optional (line 151) | def get_query_optional(query=None):
function get_query_type (line 158) | def get_query_type(query: int):
function get_query_type_optional (line 163) | def get_query_type_optional(query: int | None = None):
function get_query_type_int_default (line 170) | def get_query_type_int_default(query: int = 10):
function get_query_param (line 175) | def get_query_param(query=Query(default=None)):
function get_query_param_required (line 182) | def get_query_param_required(query=Query()):
function get_query_param_required_type (line 187) | def get_query_param_required_type(query: int = Query()):
function get_enum_status_code (line 192) | def get_enum_status_code():
function get_query_type_frozenset (line 197) | def get_query_type_frozenset(query: frozenset[int] = Query(...)):
function get_query_list (line 202) | def get_query_list(device_ids: list[int] = Query()) -> list[int]:
function get_query_list_default (line 207) | def get_query_list_default(device_ids: list[int] = Query(default=[])) ->...
FILE: tests/test_additional_properties.py
class Items (line 9) | class Items(BaseModel):
function foo (line 14) | def foo(items: Items):
function test_additional_properties_post (line 21) | def test_additional_properties_post():
function test_openapi_schema (line 27) | def test_openapi_schema():
FILE: tests/test_additional_properties_bool.py
class FooBaseModel (line 7) | class FooBaseModel(BaseModel):
class Foo (line 11) | class Foo(FooBaseModel):
function post (line 19) | async def post(
function test_call_invalid (line 28) | def test_call_invalid():
function test_call_valid (line 33) | def test_call_valid():
function test_openapi_schema (line 39) | def test_openapi_schema():
FILE: tests/test_additional_response_extra.py
function read_item (line 13) | def read_item():
function test_path_operation (line 24) | def test_path_operation():
function test_openapi_schema (line 30) | def test_openapi_schema():
FILE: tests/test_additional_responses_bad.py
function a (line 9) | async def a():
function test_openapi_schema (line 38) | def test_openapi_schema():
FILE: tests/test_additional_responses_custom_model_in_callback.py
class CustomModel (line 8) | class CustomModel(BaseModel):
function callback_route (line 20) | def callback_route():
function main_route (line 25) | def main_route(callback_url: HttpUrl):
function test_openapi_schema (line 32) | def test_openapi_schema():
FILE: tests/test_additional_responses_custom_validationerror.py
class JsonApiResponse (line 10) | class JsonApiResponse(JSONResponse):
class Error (line 14) | class Error(BaseModel):
class JsonApiError (line 19) | class JsonApiError(BaseModel):
function a (line 28) | async def a(id):
function test_openapi_schema (line 35) | def test_openapi_schema():
FILE: tests/test_additional_responses_default_validationerror.py
function a (line 9) | async def a(id):
function test_openapi_schema (line 16) | def test_openapi_schema():
FILE: tests/test_additional_responses_response_class.py
class JsonApiResponse (line 10) | class JsonApiResponse(JSONResponse):
class Error (line 14) | class Error(BaseModel):
class JsonApiError (line 19) | class JsonApiError(BaseModel):
function a (line 28) | async def a():
function b (line 33) | async def b():
function test_openapi_schema (line 40) | def test_openapi_schema():
FILE: tests/test_additional_responses_router.py
class ResponseModel (line 7) | class ResponseModel(BaseModel):
function a (line 16) | async def a():
function b (line 27) | async def b():
function c (line 39) | async def c():
function d (line 51) | async def d():
function test_a (line 61) | def test_a():
function test_b (line 67) | def test_b():
function test_c (line 73) | def test_c():
function test_d (line 79) | def test_d():
function test_openapi_schema (line 85) | def test_openapi_schema():
FILE: tests/test_additional_responses_union_duplicate_anyof.py
class ModelA (line 13) | class ModelA(BaseModel):
class ModelB (line 17) | class ModelB(BaseModel):
function route1 (line 32) | async def route1():
function route2 (line 37) | async def route2():
function test_openapi_schema (line 44) | def test_openapi_schema():
FILE: tests/test_allow_inf_nan_in_enforcing.py
function get (line 11) | async def get(
function test_allow_inf_nan_param_true (line 34) | def test_allow_inf_nan_param_true(value: str, code: int):
function test_allow_inf_nan_param_false (line 50) | def test_allow_inf_nan_param_false(value: str, code: int):
function test_allow_inf_nan_param_default (line 66) | def test_allow_inf_nan_param_default(value: str, code: int):
function test_allow_inf_nan_body (line 82) | def test_allow_inf_nan_body(value: str, code: int):
FILE: tests/test_ambiguous_params.py
function test_no_annotated_defaults (line 11) | def test_no_annotated_defaults():
function test_multiple_annotations (line 33) | def test_multiple_annotations():
FILE: tests/test_annotated.py
function default (line 12) | async def default(foo: Annotated[str, Query()] = "foo"):
function required (line 17) | async def required(foo: Annotated[str, Query(min_length=1)]):
function multiple (line 22) | async def multiple(foo: Annotated[str, object(), Query(min_length=1)]):
function unrelated (line 27) | async def unrelated(foo: Annotated[str, object()]):
function test_get (line 71) | def test_get(path, expected_status, expected_response):
function test_multiple_path (line 77) | def test_multiple_path():
function test_nested_router (line 103) | def test_nested_router():
function test_openapi_schema (line 121) | def test_openapi_schema():
FILE: tests/test_application.py
function test_get_path (line 18) | def test_get_path(path, expected_status, expected_response):
function test_swagger_ui (line 24) | def test_swagger_ui():
function test_swagger_ui_oauth2_redirect (line 35) | def test_swagger_ui_oauth2_redirect():
function test_redoc (line 42) | def test_redoc():
function test_enum_status_code_response (line 49) | def test_enum_status_code_response():
function test_openapi_schema (line 55) | def test_openapi_schema():
FILE: tests/test_arbitrary_types.py
function get_client (line 10) | def get_client():
function test_get (line 43) | def test_get(client: TestClient):
function test_typeadapter (line 48) | def test_typeadapter():
function test_openapi_schema (line 92) | def test_openapi_schema(client: TestClient):
FILE: tests/test_callable_endpoint.py
function main (line 7) | def main(some_arg, q: str | None = None):
function test_partial (line 21) | def test_partial():
FILE: tests/test_compat.py
function test_model_field_default_required (line 12) | def test_model_field_default_required():
function test_complex (line 21) | def test_complex():
function test_propagates_pydantic2_model_config (line 39) | def test_propagates_pydantic2_model_config():
function test_is_bytes_sequence_annotation_union (line 83) | def test_is_bytes_sequence_annotation_union():
function test_is_uploadfile_sequence_annotation (line 91) | def test_is_uploadfile_sequence_annotation():
function test_serialize_sequence_value_with_optional_list (line 99) | def test_serialize_sequence_value_with_optional_list():
function test_serialize_sequence_value_with_optional_list_pipe_union (line 110) | def test_serialize_sequence_value_with_optional_list_pipe_union():
function test_serialize_sequence_value_with_none_first_in_union (line 121) | def test_serialize_sequence_value_with_none_first_in_union():
FILE: tests/test_computed_fields.py
function get_client (line 8) | def get_client(request):
function test_get (line 37) | def test_get(client: TestClient, path: str):
function test_openapi_schema (line 44) | def test_openapi_schema(client: TestClient):
FILE: tests/test_custom_middleware_exception.py
class ContentSizeLimitMiddleware (line 12) | class ContentSizeLimitMiddleware:
method __init__ (line 19) | def __init__(self, app: APIRouter, max_content_size: int | None = None):
method receive_wrapper (line 23) | def receive_wrapper(self, receive):
method __call__ (line 47) | async def __call__(self, scope, receive, send):
function run_middleware (line 57) | def run_middleware(file: UploadFile = File(..., description="Big File")):
function test_custom_middleware_exception (line 68) | def test_custom_middleware_exception(tmp_path: Path):
function test_custom_middleware_exception_not_raised (line 86) | def test_custom_middleware_exception_not_raised(tmp_path: Path):
FILE: tests/test_custom_route_class.py
class APIRouteA (line 11) | class APIRouteA(APIRoute):
class APIRouteB (line 15) | class APIRouteB(APIRoute):
class APIRouteC (line 19) | class APIRouteC(APIRoute):
function get_a (line 29) | def get_a():
function get_b (line 34) | def get_b():
function get_c (line 39) | def get_c():
function test_get_path (line 59) | def test_get_path(path, expected_status, expected_response):
function test_route_classes (line 65) | def test_route_classes():
function test_openapi_schema (line 75) | def test_openapi_schema():
FILE: tests/test_custom_schema_fields.py
class Item (line 10) | class Item(BaseModel):
function foo (line 25) | def foo():
function test_custom_response_schema (line 52) | def test_custom_response_schema():
function test_response (line 58) | def test_response():
FILE: tests/test_custom_swagger_ui_redirect.py
function read_items (line 10) | async def read_items():
function test_swagger_ui (line 17) | def test_swagger_ui():
function test_swagger_ui_oauth2_redirect (line 29) | def test_swagger_ui_oauth2_redirect():
function test_response (line 36) | def test_response():
FILE: tests/test_datastructures.py
function test_upload_file_invalid_pydantic_v2 (line 10) | def test_upload_file_invalid_pydantic_v2():
function test_default_placeholder_equals (line 15) | def test_default_placeholder_equals():
function test_default_placeholder_bool (line 22) | def test_default_placeholder_bool():
function test_upload_file_is_closed (line 29) | def test_upload_file_is_closed(tmp_path: Path):
function test_upload_file (line 55) | async def test_upload_file():
FILE: tests/test_datetime_custom_encoder.py
function test_pydanticv2 (line 8) | def test_pydanticv2():
FILE: tests/test_default_response_class.py
class ORJSONResponse (line 10) | class ORJSONResponse(JSONResponse):
method render (line 13) | def render(self, content: Any) -> bytes:
class OverrideResponse (line 19) | class OverrideResponse(JSONResponse):
function get_root (line 33) | def get_root():
function get_path_override (line 38) | def get_path_override():
function get_a (line 43) | def get_a():
function get_a_path_override (line 48) | def get_a_path_override():
function get_a_a (line 53) | def get_a_a():
function get_a_a_path_override (line 58) | def get_a_a_path_override():
function get_a_b (line 63) | def get_a_b():
function get_a_b_path_override (line 68) | def get_a_b_path_override():
function get_b (line 73) | def get_b():
function get_b_path_override (line 78) | def get_b_path_override():
function get_b_a (line 83) | def get_b_a():
function get_b_a_path_override (line 88) | def get_b_a_path_override():
function get_b_a_c (line 93) | def get_b_a_c():
function get_b_a_c_path_override (line 98) | def get_b_a_c_path_override():
function test_app (line 125) | def test_app():
function test_app_override (line 132) | def test_app_override():
function test_router_a (line 140) | def test_router_a():
function test_router_a_override (line 147) | def test_router_a_override():
function test_router_a_a (line 155) | def test_router_a_a():
function test_router_a_a_override (line 162) | def test_router_a_a_override():
function test_router_a_b (line 169) | def test_router_a_b():
function test_router_a_b_override (line 176) | def test_router_a_b_override():
function test_router_b (line 183) | def test_router_b():
function test_router_b_override (line 190) | def test_router_b_override():
function test_router_b_a (line 197) | def test_router_b_a():
function test_router_b_a_override (line 204) | def test_router_b_a_override():
function test_router_b_a_c (line 211) | def test_router_b_a_c():
function test_router_b_a_c_override (line 218) | def test_router_b_a_c_override():
FILE: tests/test_default_response_class_router.py
class OverrideResponse (line 6) | class OverrideResponse(JSONResponse):
function get_root (line 20) | def get_root():
function get_path_override (line 25) | def get_path_override():
function get_a (line 30) | def get_a():
function get_a_path_override (line 35) | def get_a_path_override():
function get_a_a (line 40) | def get_a_a():
function get_a_a_path_override (line 45) | def get_a_a_path_override():
function get_a_b (line 50) | def get_a_b():
function get_a_b_path_override (line 55) | def get_a_b_path_override():
function get_b (line 60) | def get_b():
function get_b_path_override (line 65) | def get_b_path_override():
function get_b_a (line 70) | def get_b_a():
function get_b_a_path_override (line 75) | def get_b_a_path_override():
function get_b_a_c (line 80) | def get_b_a_c():
function get_b_a_c_path_override (line 85) | def get_b_a_c_path_override():
function test_app (line 111) | def test_app():
function test_app_override (line 118) | def test_app_override():
function test_router_a (line 125) | def test_router_a():
function test_router_a_override (line 132) | def test_router_a_override():
function test_router_a_a (line 139) | def test_router_a_a():
function test_router_a_a_override (line 146) | def test_router_a_a_override():
function test_router_a_b (line 153) | def test_router_a_b():
function test_router_a_b_override (line 160) | def test_router_a_b_override():
function test_router_b (line 167) | def test_router_b():
function test_router_b_override (line 174) | def test_router_b_override():
function test_router_b_a (line 181) | def test_router_b_a():
function test_router_b_a_override (line 188) | def test_router_b_a_override():
function test_router_b_a_c (line 195) | def test_router_b_a_c():
function test_router_b_a_c_override (line 202) | def test_router_b_a_c_override():
FILE: tests/test_dependencies_utils.py
function test_get_typed_annotation (line 4) | def test_get_typed_annotation():
FILE: tests/test_dependency_after_yield_raise.py
class CustomError (line 8) | class CustomError(Exception):
function catching_dep (line 12) | def catching_dep() -> Any:
function broken_dep (line 19) | def broken_dep() -> Any:
function catching (line 28) | def catching(d: Annotated[str, Depends(catching_dep)]) -> Any:
function broken (line 33) | def broken(d: Annotated[str, Depends(broken_dep)]) -> Any:
function test_catching (line 40) | def test_catching():
function test_broken_raise (line 46) | def test_broken_raise():
function test_broken_no_raise (line 51) | def test_broken_no_raise():
function test_broken_return_finishes (line 64) | def test_broken_return_finishes():
FILE: tests/test_dependency_after_yield_streaming.py
class Session (line 11) | class Session:
method __init__ (line 12) | def __init__(self) -> None:
method __iter__ (line 16) | def __iter__(self) -> Generator[str, None, None]:
function acquire_session (line 25) | def acquire_session() -> Generator[Session, None, None]:
function dep_session (line 33) | def dep_session() -> Any:
function broken_dep_session (line 38) | def broken_dep_session() -> Any:
function get_data (line 51) | def get_data(session: SessionDep) -> Any:
function get_stream_simple (line 57) | def get_stream_simple(session: SessionDep) -> Any:
function get_stream_session (line 65) | def get_stream_session(session: SessionDep) -> Any:
function get_broken_session_data (line 73) | def get_broken_session_data(session: BrokenSessionDep) -> Any:
function get_broken_session_stream (line 78) | def get_broken_session_stream(session: BrokenSessionDep) -> Any:
function test_regular_no_stream (line 88) | def test_regular_no_stream():
function test_stream_simple (line 93) | def test_stream_simple():
function test_stream_session (line 98) | def test_stream_session():
function test_broken_session_data (line 103) | def test_broken_session_data():
function test_broken_session_data_no_raise (line 108) | def test_broken_session_data_no_raise():
function test_broken_session_stream_raise (line 115) | def test_broken_session_stream_raise():
function test_broken_session_stream_no_raise (line 121) | def test_broken_session_stream_no_raise():
FILE: tests/test_dependency_after_yield_websockets.py
class Session (line 10) | class Session:
method __init__ (line 11) | def __init__(self) -> None:
method __iter__ (line 15) | def __iter__(self) -> Generator[str, None, None]:
function acquire_session (line 24) | def acquire_session() -> Generator[Session, None, None]:
function dep_session (line 32) | def dep_session() -> Any:
function broken_dep_session (line 37) | def broken_dep_session() -> Any:
function websocket_endpoint (line 50) | async def websocket_endpoint(websocket: WebSocket, session: SessionDep):
function websocket_endpoint_broken (line 57) | async def websocket_endpoint_broken(websocket: WebSocket, session: Broke...
function test_websocket_dependency_after_yield (line 66) | def test_websocket_dependency_after_yield():
function test_websocket_dependency_after_yield_broken (line 76) | def test_websocket_dependency_after_yield_broken():
FILE: tests/test_dependency_cache.py
function dep_counter (line 9) | async def dep_counter():
function super_dep (line 14) | async def super_dep(count: int = Depends(dep_counter)):
function get_counter (line 19) | async def get_counter(count: int = Depends(dep_counter)):
function get_sub_counter (line 24) | async def get_sub_counter(
function get_sub_counter_no_cache (line 31) | async def get_sub_counter_no_cache(
function get_scope_counter (line 39) | async def get_scope_counter(
function test_normal_counter (line 54) | def test_normal_counter():
function test_sub_counter (line 64) | def test_sub_counter():
function test_sub_counter_no_cache (line 74) | def test_sub_counter_no_cache():
function test_security_cache (line 84) | def test_security_cache():
FILE: tests/test_dependency_class.py
class CallableDependency (line 10) | class CallableDependency:
method __call__ (line 11) | def __call__(self, value: str) -> str:
class CallableGenDependency (line 15) | class CallableGenDependency:
method __call__ (line 16) | def __call__(self, value: str) -> Generator[str, None, None]:
class AsyncCallableDependency (line 20) | class AsyncCallableDependency:
method __call__ (line 21) | async def __call__(self, value: str) -> str:
class AsyncCallableGenDependency (line 25) | class AsyncCallableGenDependency:
method __call__ (line 26) | async def __call__(self, value: str) -> AsyncGenerator[str, None]:
class MethodsDependency (line 30) | class MethodsDependency:
method synchronous (line 31) | def synchronous(self, value: str) -> str:
method asynchronous (line 34) | async def asynchronous(self, value: str) -> str:
method synchronous_gen (line 37) | def synchronous_gen(self, value: str) -> Generator[str, None, None]:
method asynchronous_gen (line 40) | async def asynchronous_gen(self, value: str) -> AsyncGenerator[str, No...
function get_callable_dependency_class (line 52) | async def get_callable_dependency_class(
function get_callable_gen_dependency_class (line 59) | async def get_callable_gen_dependency_class(
function get_async_callable_dependency_class (line 66) | async def get_async_callable_dependency_class(
function get_async_callable_gen_dependency_class (line 73) | async def get_async_callable_gen_dependency_class(
function get_callable_dependency (line 80) | async def get_callable_dependency(value: str = Depends(callable_dependen...
function get_callable_gen_dependency (line 85) | async def get_callable_gen_dependency(value: str = Depends(callable_gen_...
function get_async_callable_dependency (line 90) | async def get_async_callable_dependency(
function get_async_callable_gen_dependency (line 97) | async def get_async_callable_gen_dependency(
function get_synchronous_method_dependency (line 104) | async def get_synchronous_method_dependency(
function get_synchronous_method_gen_dependency (line 111) | async def get_synchronous_method_gen_dependency(
function get_asynchronous_method_dependency (line 118) | async def get_asynchronous_method_dependency(
function get_asynchronous_method_gen_dependency (line 125) | async def get_asynchronous_method_gen_dependency(
function test_class_dependency (line 151) | def test_class_dependency(route, value):
FILE: tests/test_dependency_contextmanager.py
function get_state (line 23) | async def get_state():
class AsyncDependencyError (line 27) | class AsyncDependencyError(Exception):
class SyncDependencyError (line 31) | class SyncDependencyError(Exception):
class OtherDependencyError (line 35) | class OtherDependencyError(Exception):
function asyncgen_state (line 39) | async def asyncgen_state(state: dict[str, str] = Depends(get_state)):
function generator_state (line 45) | def generator_state(state: dict[str, str] = Depends(get_state)):
function asyncgen_state_try (line 51) | async def asyncgen_state_try(state: dict[str, str] = Depends(get_state)):
function generator_state_try (line 62) | def generator_state_try(state: dict[str, str] = Depends(get_state)):
function context_a (line 73) | async def context_a(state: dict = Depends(get_state)):
function context_b (line 81) | async def context_b(state: dict = Depends(context_a)):
function get_async (line 90) | async def get_async(state: str = Depends(asyncgen_state)):
function get_sync (line 95) | async def get_sync(state: str = Depends(generator_state)):
function get_async_raise (line 100) | async def get_async_raise(state: str = Depends(asyncgen_state_try)):
function get_sync_raise (line 106) | async def get_sync_raise(state: str = Depends(generator_state_try)):
function get_async_raise_other (line 112) | async def get_async_raise_other(state: str = Depends(asyncgen_state_try)):
function get_sync_raise_other (line 118) | async def get_sync_raise_other(state: str = Depends(generator_state_try)):
function get_context_b (line 124) | async def get_context_b(state: dict = Depends(context_b)):
function get_context_b_raise (line 129) | async def get_context_b_raise(state: dict = Depends(context_b)):
function get_context_b_bg (line 136) | async def get_context_b_bg(tasks: BackgroundTasks, state: dict = Depends...
function get_sync_async (line 148) | def get_sync_async(state: str = Depends(asyncgen_state)):
function get_sync_sync (line 153) | def get_sync_sync(state: str = Depends(generator_state)):
function get_sync_async_raise (line 158) | def get_sync_async_raise(state: str = Depends(asyncgen_state_try)):
function get_sync_sync_raise (line 164) | def get_sync_sync_raise(state: str = Depends(generator_state_try)):
function get_sync_async_raise_other (line 170) | def get_sync_async_raise_other(state: str = Depends(asyncgen_state_try)):
function get_sync_sync_raise_other (line 176) | def get_sync_sync_raise_other(state: str = Depends(generator_state_try)):
function get_sync_context_b (line 182) | def get_sync_context_b(state: dict = Depends(context_b)):
function get_sync_context_b_raise (line 187) | def get_sync_context_b_raise(state: dict = Depends(context_b)):
function get_sync_context_b_bg (line 194) | async def get_sync_context_b_bg(
function middleware (line 207) | async def middleware(request, call_next):
function test_async_state (line 216) | def test_async_state():
function test_sync_state (line 224) | def test_sync_state():
function test_async_raise_other (line 232) | def test_async_raise_other():
function test_sync_raise_other (line 240) | def test_sync_raise_other():
function test_async_raise_raises (line 248) | def test_async_raise_raises():
function test_async_raise_server_error (line 256) | def test_async_raise_server_error():
function test_context_b (line 265) | def test_context_b():
function test_context_b_raise (line 274) | def test_context_b_raise():
function test_background_tasks (line 281) | def test_background_tasks():
function test_sync_raise_raises (line 296) | def test_sync_raise_raises():
function test_sync_raise_server_error (line 304) | def test_sync_raise_server_error():
function test_sync_async_state (line 313) | def test_sync_async_state():
function test_sync_sync_state (line 320) | def test_sync_sync_state():
function test_sync_async_raise_other (line 327) | def test_sync_async_raise_other():
function test_sync_sync_raise_other (line 334) | def test_sync_sync_raise_other():
function test_sync_async_raise_raises (line 341) | def test_sync_async_raise_raises():
function test_sync_async_raise_server_error (line 349) | def test_sync_async_raise_server_error():
function test_sync_sync_raise_raises (line 358) | def test_sync_sync_raise_raises():
function test_sync_sync_raise_server_error (line 366) | def test_sync_sync_raise_server_error():
function test_sync_context_b (line 375) | def test_sync_context_b():
function test_sync_context_b_raise (line 384) | def test_sync_context_b_raise():
function test_sync_background_tasks (line 391) | def test_sync_background_tasks():
FILE: tests/test_dependency_contextvars.py
function set_up_request_state_dependency (line 15) | async def set_up_request_state_dependency():
function custom_middleware (line 23) | async def custom_middleware(
function get_user (line 32) | def get_user():
function test_dependency_contextvars (line 41) | def test_dependency_contextvars():
FILE: tests/test_dependency_duplicates.py
class Item (line 11) | class Item(BaseModel):
function duplicate_dependency (line 15) | def duplicate_dependency(item: Item):
function dependency (line 19) | def dependency(item2: Item):
function sub_duplicate_dependency (line 23) | def sub_duplicate_dependency(
function with_duplicates (line 30) | async def with_duplicates(item: Item, item2: Item = Depends(duplicate_de...
function no_duplicates (line 35) | async def no_duplicates(item: Item, item2: Item = Depends(dependency)):
function no_duplicates_sub (line 40) | async def no_duplicates_sub(
function test_no_duplicates_invalid (line 46) | def test_no_duplicates_invalid():
function test_no_duplicates (line 61) | def test_no_duplicates():
function test_duplicates (line 70) | def test_duplicates():
function test_sub_duplicates (line 76) | def test_sub_duplicates():
function test_openapi_schema (line 85) | def test_openapi_schema():
FILE: tests/test_dependency_overrides.py
function common_parameters (line 10) | async def common_parameters(q: str, skip: int = 0, limit: int = 100):
function main_depends (line 15) | async def main_depends(commons: dict = Depends(common_parameters)):
function decorator_depends (line 20) | async def decorator_depends():
function router_depends (line 25) | async def router_depends(commons: dict = Depends(common_parameters)):
function router_decorator_depends (line 30) | async def router_decorator_depends():
function overrider_dependency_simple (line 39) | async def overrider_dependency_simple(q: str | None = None):
function overrider_sub_dependency (line 43) | async def overrider_sub_dependency(k: str):
function overrider_dependency_with_sub (line 47) | async def overrider_dependency_with_sub(msg: dict = Depends(overrider_su...
function test_main_depends (line 51) | def test_main_depends():
function test_main_depends_q_foo (line 66) | def test_main_depends_q_foo():
function test_main_depends_q_foo_skip_100_limit_200 (line 75) | def test_main_depends_q_foo_skip_100_limit_200():
function test_decorator_depends (line 84) | def test_decorator_depends():
function test_decorator_depends_q_foo (line 99) | def test_decorator_depends_q_foo():
function test_decorator_depends_q_foo_skip_100_limit_200 (line 105) | def test_decorator_depends_q_foo_skip_100_limit_200():
function test_router_depends (line 111) | def test_router_depends():
function test_router_depends_q_foo (line 126) | def test_router_depends_q_foo():
function test_router_depends_q_foo_skip_100_limit_200 (line 135) | def test_router_depends_q_foo_skip_100_limit_200():
function test_router_decorator_depends (line 144) | def test_router_decorator_depends():
function test_router_decorator_depends_q_foo (line 159) | def test_router_decorator_depends_q_foo():
function test_router_decorator_depends_q_foo_skip_100_limit_200 (line 165) | def test_router_decorator_depends_q_foo_skip_100_limit_200():
function test_override_simple (line 208) | def test_override_simple(url, status_code, expected):
function test_override_with_sub_main_depends (line 216) | def test_override_with_sub_main_depends():
function test_override_with_sub__main_depends_q_foo (line 234) | def test_override_with_sub__main_depends_q_foo():
function test_override_with_sub_main_depends_k_bar (line 252) | def test_override_with_sub_main_depends_k_bar():
function test_override_with_sub_decorator_depends (line 260) | def test_override_with_sub_decorator_depends():
function test_override_with_sub_decorator_depends_q_foo (line 278) | def test_override_with_sub_decorator_depends_q_foo():
function test_override_with_sub_decorator_depends_k_bar (line 296) | def test_override_with_sub_decorator_depends_k_bar():
function test_override_with_sub_router_depends (line 304) | def test_override_with_sub_router_depends():
function test_override_with_sub_router_depends_q_foo (line 322) | def test_override_with_sub_router_depends_q_foo():
function test_override_with_sub_router_depends_k_bar (line 340) | def test_override_with_sub_router_depends_k_bar():
function test_override_with_sub_router_decorator_depends (line 348) | def test_override_with_sub_router_decorator_depends():
function test_override_with_sub_router_decorator_depends_q_foo (line 366) | def test_override_with_sub_router_decorator_depends_q_foo():
function test_override_with_sub_router_decorator_depends_k_bar (line 384) | def test_override_with_sub_router_decorator_depends_k_bar():
FILE: tests/test_dependency_paramless.py
function process_auth (line 15) | def process_auth(
function get_credentials (line 29) | def get_credentials(
function get_parameterless_with_scopes (line 39) | def get_parameterless_with_scopes():
function get_parameterless_without_scopes (line 47) | def get_parameterless_without_scopes():
function test_get_credentials (line 54) | def test_get_credentials():
function test_parameterless_with_scopes (line 60) | def test_parameterless_with_scopes():
function test_parameterless_without_scopes (line 68) | def test_parameterless_without_scopes():
function test_call_get_parameterless_without_scopes_for_coverage (line 76) | def test_call_get_parameterless_without_scopes_for_coverage():
FILE: tests/test_dependency_partial.py
function function_dependency (line 12) | def function_dependency(value: str) -> str:
function async_function_dependency (line 16) | async def async_function_dependency(value: str) -> str:
function gen_dependency (line 20) | def gen_dependency(value: str) -> Generator[str, None, None]:
function async_gen_dependency (line 24) | async def async_gen_dependency(value: str) -> AsyncGenerator[str, None]:
class CallableDependency (line 28) | class CallableDependency:
method __call__ (line 29) | def __call__(self, value: str) -> str:
class CallableGenDependency (line 33) | class CallableGenDependency:
method __call__ (line 34) | def __call__(self, value: str) -> Generator[str, None, None]:
class AsyncCallableDependency (line 38) | class AsyncCallableDependency:
method __call__ (line 39) | async def __call__(self, value: str) -> str:
class AsyncCallableGenDependency (line 43) | class AsyncCallableGenDependency:
method __call__ (line 44) | async def __call__(self, value: str) -> AsyncGenerator[str, None]:
class MethodsDependency (line 48) | class MethodsDependency:
method synchronous (line 49) | def synchronous(self, value: str) -> str:
method asynchronous (line 52) | async def asynchronous(self, value: str) -> str:
method synchronous_gen (line 55) | def synchronous_gen(self, value: str) -> Generator[str, None, None]:
method asynchronous_gen (line 58) | async def asynchronous_gen(self, value: str) -> AsyncGenerator[str, No...
function get_partial_function_dependency (line 70) | async def get_partial_function_dependency(
function get_partial_async_function_dependency (line 79) | async def get_partial_async_function_dependency(
function get_partial_gen_dependency (line 91) | async def get_partial_gen_dependency(
function get_partial_async_gen_dependency (line 98) | async def get_partial_async_gen_dependency(
function get_partial_callable_dependency (line 107) | async def get_partial_callable_dependency(
function get_partial_callable_gen_dependency (line 116) | async def get_partial_callable_gen_dependency(
function get_partial_async_callable_dependency (line 126) | async def get_partial_async_callable_dependency(
function get_partial_async_callable_gen_dependency (line 138) | async def get_partial_async_callable_gen_dependency(
function get_partial_synchronous_method_dependency (line 152) | async def get_partial_synchronous_method_dependency(
function get_partial_synchronous_method_gen_dependency (line 166) | async def get_partial_synchronous_method_gen_dependency(
function get_partial_asynchronous_method_dependency (line 181) | async def get_partial_asynchronous_method_dependency(
function get_partial_asynchronous_method_gen_dependency (line 196) | async def get_partial_asynchronous_method_gen_dependency(
function test_dependency_types_with_partial (line 248) | def test_dependency_types_with_partial(route: str, value: str) -> None:
FILE: tests/test_dependency_pep695.py
function some_value (line 8) | async def some_value() -> int:
function test_pep695_type_dependencies (line 17) | def test_pep695_type_dependencies():
FILE: tests/test_dependency_security_overrides.py
function get_user (line 8) | def get_user(required_scopes: SecurityScopes):
function get_user_override (line 12) | def get_user_override(required_scopes: SecurityScopes):
function get_data (line 16) | def get_data():
function get_data_override (line 20) | def get_data_override():
function read_user (line 25) | def read_user(
function test_normal (line 35) | def test_normal():
function test_override_data (line 44) | def test_override_data():
function test_override_security (line 55) | def test_override_security():
FILE: tests/test_dependency_wrapped.py
function noop_wrap (line 17) | def noop_wrap(func):
function noop_wrap_async (line 25) | def noop_wrap_async(func):
class ClassInstanceDep (line 58) | class ClassInstanceDep:
method __call__ (line 59) | def __call__(self):
class ClassInstanceGenDep (line 68) | class ClassInstanceGenDep:
method __call__ (line 69) | def __call__(self):
class ClassInstanceWrappedDep (line 77) | class ClassInstanceWrappedDep:
method __call__ (line 79) | def __call__(self):
class ClassInstanceWrappedAsyncDep (line 86) | class ClassInstanceWrappedAsyncDep:
method __call__ (line 88) | def __call__(self):
class ClassInstanceWrappedGenDep (line 95) | class ClassInstanceWrappedGenDep:
method __call__ (line 97) | def __call__(self):
class ClassInstanceWrappedAsyncGenDep (line 104) | class ClassInstanceWrappedAsyncGenDep:
method __call__ (line 106) | def __call__(self):
class ClassDep (line 113) | class ClassDep:
method __init__ (line 114) | def __init__(self):
class ClassInstanceAsyncDep (line 122) | class ClassInstanceAsyncDep:
method __call__ (line 123) | async def __call__(self):
class ClassInstanceAsyncGenDep (line 134) | class ClassInstanceAsyncGenDep:
method __call__ (line 135) | async def __call__(self):
class ClassInstanceAsyncWrappedDep (line 143) | class ClassInstanceAsyncWrappedDep:
method __call__ (line 145) | async def __call__(self):
class ClassInstanceAsyncWrappedAsyncDep (line 152) | class ClassInstanceAsyncWrappedAsyncDep:
method __call__ (line 154) | async def __call__(self):
class ClassInstanceAsyncWrappedGenDep (line 161) | class ClassInstanceAsyncWrappedGenDep:
method __call__ (line 163) | async def __call__(self):
class ClassInstanceAsyncWrappedGenAsyncDep (line 170) | class ClassInstanceAsyncWrappedGenAsyncDep:
method __call__ (line 172) | async def __call__(self):
function wrapped_dependency (line 184) | def wrapped_dependency() -> bool:
function wrapped_gen_dependency (line 189) | def wrapped_gen_dependency() -> Generator[bool, None, None]:
function async_wrapped_dependency (line 194) | async def async_wrapped_dependency() -> bool:
function async_wrapped_gen_dependency (line 199) | async def async_wrapped_gen_dependency() -> AsyncGenerator[bool, None]:
function get_wrapped_dependency (line 204) | async def get_wrapped_dependency(value: bool = Depends(wrapped_dependenc...
function get_wrapped_gen_dependency (line 209) | async def get_wrapped_gen_dependency(value: bool = Depends(wrapped_gen_d...
function get_async_wrapped_dependency (line 214) | async def get_async_wrapped_dependency(value: bool = Depends(async_wrapp...
function get_async_wrapped_gen_dependency (line 219) | async def get_async_wrapped_gen_dependency(
function get_wrapped_class_instance_dependency (line 226) | async def get_wrapped_class_instance_dependency(
function get_wrapped_class_instance_async_dependency (line 233) | async def get_wrapped_class_instance_async_dependency(
function get_wrapped_class_instance_gen_dependency (line 240) | async def get_wrapped_class_instance_gen_dependency(
function get_wrapped_class_instance_async_gen_dependency (line 247) | async def get_wrapped_class_instance_async_gen_dependency(
function get_class_instance_wrapped_dependency (line 254) | async def get_class_instance_wrapped_dependency(
function get_class_instance_wrapped_async_dependency (line 261) | async def get_class_instance_wrapped_async_dependency(
function get_class_instance_async_wrapped_dependency (line 268) | async def get_class_instance_async_wrapped_dependency(
function get_class_instance_async_wrapped_async_dependency (line 275) | async def get_class_instance_async_wrapped_async_dependency(
function get_class_instance_wrapped_gen_dependency (line 282) | async def get_class_instance_wrapped_gen_dependency(
function get_class_instance_wrapped_async_gen_dependency (line 289) | async def get_class_instance_wrapped_async_gen_dependency(
function get_class_instance_async_wrapped_gen_dependency (line 296) | async def get_class_instance_async_wrapped_gen_dependency(
function get_class_instance_async_wrapped_gen_async_dependency (line 303) | async def get_class_instance_async_wrapped_gen_async_dependency(
function get_wrapped_class_dependency (line 310) | async def get_wrapped_class_dependency(value: ClassDep = Depends(wrapped...
function get_wrapped_endpoint (line 316) | def get_wrapped_endpoint():
function get_async_wrapped_endpoint (line 322) | async def get_async_wrapped_endpoint():
function wrapped_dependency_async_wrapper (line 330) | def wrapped_dependency_async_wrapper() -> bool:
function wrapped_gen_dependency_async_wrapper (line 335) | def wrapped_gen_dependency_async_wrapper() -> Generator[bool, None, None]:
function async_wrapped_dependency_async_wrapper (line 340) | async def async_wrapped_dependency_async_wrapper() -> bool:
function async_wrapped_gen_dependency_async_wrapper (line 345) | async def async_wrapped_gen_dependency_async_wrapper() -> AsyncGenerator...
function get_wrapped_dependency_async_wrapper (line 350) | async def get_wrapped_dependency_async_wrapper(
function get_wrapped_gen_dependency_async_wrapper (line 357) | async def get_wrapped_gen_dependency_async_wrapper(
function get_async_wrapped_dependency_async_wrapper (line 364) | async def get_async_wrapped_dependency_async_wrapper(
function get_async_wrapped_gen_dependency_async_wrapper (line 371) | async def get_async_wrapped_gen_dependency_async_wrapper(
function get_wrapped_class_instance_dependency_async_wrapper (line 378) | async def get_wrapped_class_instance_dependency_async_wrapper(
function get_wrapped_class_instance_async_dependency_async_wrapper (line 385) | async def get_wrapped_class_instance_async_dependency_async_wrapper(
function get_wrapped_class_dependency_async_wrapper (line 392) | async def get_wrapped_class_dependency_async_wrapper(
function get_wrapped_endpoint_async_wrapper (line 400) | def get_wrapped_endpoint_async_wrapper():
function get_async_wrapped_endpoint_async_wrapper (line 406) | async def get_async_wrapped_endpoint_async_wrapper():
function test_class_dependency (line 446) | def test_class_dependency(route):
FILE: tests/test_dependency_yield_except_httpexception.py
function get_database (line 16) | async def get_database():
function put_invalid_user (line 29) | def put_invalid_user(
function put_user (line 37) | def put_user(user_id: str, name: str = Body(), db: dict = Depends(get_da...
function reset_state_and_db (line 43) | def reset_state_and_db():
function test_dependency_gets_exception (line 53) | def test_dependency_gets_exception():
function test_dependency_no_exception (line 64) | def test_dependency_no_exception():
FILE: tests/test_dependency_yield_scope.py
class Session (line 11) | class Session:
method __init__ (line 12) | def __init__(self) -> None:
function dep_session (line 16) | def dep_session() -> Any:
function raise_after_yield (line 22) | def raise_after_yield() -> Any:
class NamedSession (line 32) | class NamedSession:
method __init__ (line 33) | def __init__(self, name: str = "default") -> None:
function get_named_session (line 38) | def get_named_session(session: SessionRequestDep, session_b: SessionDefa...
function get_named_func_session (line 48) | def get_named_func_session(session: SessionFuncDep) -> Any:
function get_named_regular_func_session (line 54) | def get_named_regular_func_session(session: SessionFuncDep) -> Any:
function get_index (line 75) | def get_index():
function function_scope (line 80) | def function_scope(session: SessionFuncDep) -> Any:
function request_scope (line 88) | def request_scope(session: SessionRequestDep) -> Any:
function get_stream_session (line 96) | def get_stream_session(
function get_sub (line 108) | def get_sub(sessions: NamedSessionsDep) -> Any:
function get_named_function_scope (line 118) | def get_named_function_scope(sessions: NamedSessionsFuncDep) -> Any:
function get_regular_function_scope (line 128) | def get_regular_function_scope(sessions: RegularSessionsDep) -> Any:
function test_function_scope (line 152) | def test_function_scope() -> None:
function test_request_scope (line 159) | def test_request_scope() -> None:
function test_two_scopes (line 166) | def test_two_scopes() -> None:
function test_sub (line 174) | def test_sub() -> None:
function test_broken_scope (line 182) | def test_broken_scope() -> None:
function test_named_function_scope (line 193) | def test_named_function_scope() -> None:
function test_regular_function_scope (line 201) | def test_regular_function_scope() -> None:
function test_router_level_dep_scope_function (line 209) | def test_router_level_dep_scope_function() -> None:
function test_router_level_dep_scope_request (line 215) | def test_router_level_dep_scope_request() -> None:
function test_app_level_dep_scope_function (line 222) | def test_app_level_dep_scope_function() -> None:
function test_app_level_dep_scope_request (line 235) | def test_app_level_dep_scope_request() -> None:
FILE: tests/test_dependency_yield_scope_websockets.py
class Session (line 12) | class Session:
method __init__ (line 13) | def __init__(self) -> None:
function dep_session (line 17) | async def dep_session() -> Any:
class NamedSession (line 30) | class NamedSession:
method __init__ (line 31) | def __init__(self, name: str = "default") -> None:
function get_named_session (line 36) | def get_named_session(session: SessionRequestDep, session_b: SessionDefa...
function get_named_func_session (line 48) | def get_named_func_session(session: SessionFuncDep) -> Any:
function get_named_regular_func_session (line 56) | def get_named_regular_func_session(session: SessionFuncDep) -> Any:
function function_scope (line 76) | async def function_scope(websocket: WebSocket, session: SessionFuncDep) ...
function request_scope (line 82) | async def request_scope(websocket: WebSocket, session: SessionRequestDep...
function get_stream_session (line 88) | async def get_stream_session(
function get_sub (line 100) | async def get_sub(websocket: WebSocket, sessions: NamedSessionsDep) -> Any:
function get_named_function_scope (line 108) | async def get_named_function_scope(
function get_regular_function_scope (line 118) | async def get_regular_function_scope(
function test_function_scope (line 130) | def test_function_scope() -> None:
function test_request_scope (line 139) | def test_request_scope() -> None:
function test_two_scopes (line 148) | def test_two_scopes() -> None:
function test_sub (line 158) | def test_sub() -> None:
function test_broken_scope (line 169) | def test_broken_scope() -> None:
function test_named_function_scope (line 182) | def test_named_function_scope() -> None:
function test_regular_function_scope (line 193) | def test_regular_function_scope() -> None:
FILE: tests/test_depends_hashable.py
function dep (line 8) | def dep():
function test_depends_hashable (line 12) | def test_depends_hashable():
FILE: tests/test_deprecated_openapi_prefix.py
function read_main (line 9) | def read_main(request: Request):
function test_main (line 16) | def test_main():
function test_openapi (line 22) | def test_openapi():
FILE: tests/test_deprecated_responses.py
class Item (line 13) | class Item(BaseModel):
function _make_orjson_app (line 21) | def _make_orjson_app() -> FastAPI:
function test_orjson_response_returns_correct_data (line 34) | def test_orjson_response_returns_correct_data():
function test_orjson_response_emits_deprecation_warning (line 45) | def test_orjson_response_emits_deprecation_warning():
function _make_ujson_app (line 53) | def _make_ujson_app() -> FastAPI:
function test_ujson_response_returns_correct_data (line 66) | def test_ujson_response_returns_correct_data():
function test_ujson_response_emits_deprecation_warning (line 77) | def test_ujson_response_emits_deprecation_warning():
FILE: tests/test_dump_json_fast_path.py
class Item (line 9) | class Item(BaseModel):
function get_default (line 18) | def get_default() -> Item:
function get_explicit (line 23) | def get_explicit() -> Item:
function test_default_response_class_skips_json_dumps (line 30) | def test_default_response_class_skips_json_dumps():
function test_explicit_response_class_uses_json_dumps (line 42) | def test_explicit_response_class_uses_json_dumps():
FILE: tests/test_duplicate_models_openapi.py
class Model (line 9) | class Model(BaseModel):
class Model2 (line 13) | class Model2(BaseModel):
class Model3 (line 17) | class Model3(BaseModel):
function f (line 23) | def f():
function test_get_api_route (line 30) | def test_get_api_route():
function test_openapi_schema (line 36) | def test_openapi_schema():
FILE: tests/test_empty_router.py
function get_empty (line 12) | def get_empty():
function test_use_empty (line 22) | def test_use_empty():
function test_include_empty (line 33) | def test_include_empty():
FILE: tests/test_enforce_once_required_parameter.py
function _get_client_key (line 8) | def _get_client_key(client_id: str = Query(...)) -> str:
function _get_client_tag (line 12) | def _get_client_tag(client_id: str | None = Query(None)) -> str | None:
function foo_handler (line 19) | def foo_handler(
function test_get_invalid (line 29) | def test_get_invalid():
function test_get_valid (line 34) | def test_get_valid():
function test_openapi_schema (line 40) | def test_openapi_schema():
FILE: tests/test_exception_handlers.py
function http_exception_handler (line 8) | def http_exception_handler(request, exception):
function request_validation_exception_handler (line 12) | def request_validation_exception_handler(request, exception):
function server_error_exception_handler (line 16) | def server_error_exception_handler(request, exception):
function raise_value_error (line 31) | def raise_value_error():
function dependency_with_yield (line 35) | def dependency_with_yield():
function with_yield (line 40) | def with_yield(): ...
function route_with_http_exception (line 44) | def route_with_http_exception():
function route_with_request_validation_exception (line 49) | def route_with_request_validation_exception(param: int):
function route_with_server_error (line 54) | def route_with_server_error():
function test_override_http_exception (line 58) | def test_override_http_exception():
function test_override_request_validation_exception (line 64) | def test_override_request_validation_exception():
function test_override_server_error_exception_raises (line 70) | def test_override_server_error_exception_raises():
function test_override_server_error_exception_response (line 75) | def test_override_server_error_exception_response():
function test_traceback_for_dependency_with_yield (line 82) | def test_traceback_for_dependency_with_yield():
FILE: tests/test_extra_routes.py
class Item (line 10) | class Item(BaseModel):
function get_items (line 16) | def get_items(item_id: str):
function get_not_decorated (line 20) | def get_not_decorated(item_id: str):
function delete_item (line 28) | def delete_item(item_id: str, item: Item):
function head_item (line 33) | def head_item(item_id: str):
function options_item (line 38) | def options_item(item_id: str):
function patch_item (line 43) | def patch_item(item_id: str, item: Item):
function trace_item (line 48) | def trace_item(item_id: str):
function test_get_api_route (line 55) | def test_get_api_route():
function test_get_api_route_not_decorated (line 61) | def test_get_api_route_not_decorated():
function test_delete (line 67) | def test_delete():
function test_head (line 73) | def test_head():
function test_options (line 79) | def test_options():
function test_patch (line 85) | def test_patch():
function test_trace (line 91) | def test_trace():
function test_openapi_schema (line 97) | def test_openapi_schema():
FILE: tests/test_fastapi_cli.py
function test_fastapi_cli (line 10) | def test_fastapi_cli():
function test_fastapi_cli_not_installed (line 30) | def test_fastapi_cli_not_installed():
FILE: tests/test_file_and_form_order_issue_9116.py
function file_before_form (line 17) | def file_before_form(
function file_after_form (line 25) | def file_after_form(
function file_list_before_form (line 33) | def file_list_before_form(
function file_list_after_form (line 41) | def file_list_after_form(
function tmp_file_1 (line 52) | def tmp_file_1(tmp_path: Path) -> Path:
function tmp_file_2 (line 59) | def tmp_file_2(tmp_path: Path) -> Path:
function test_file_form_order (line 66) | def test_file_form_order(endpoint_path: str, tmp_file_1: Path):
function test_file_list_form_order (line 79) | def test_file_list_form_order(endpoint_path: str, tmp_file_1: Path, tmp_...
FILE: tests/test_filter_pydantic_sub_model_pv2.py
function get_client (line 10) | def get_client():
function test_filter_sub_model (line 49) | def test_filter_sub_model(client: TestClient):
function test_validator_is_cloned (line 60) | def test_validator_is_cloned(client: TestClient):
function test_openapi_schema (line 74) | def test_openapi_schema(client: TestClient):
FILE: tests/test_form_default.py
function post_url_encoded (line 10) | async def post_url_encoded(age: Annotated[int | None, Form()] = None):
function post_multi_part (line 15) | async def post_multi_part(
function test_form_default_url_encoded (line 25) | def test_form_default_url_encoded():
function test_form_default_multi_part (line 31) | def test_form_default_multi_part():
FILE: tests/test_forms_from_non_typing_sequences.py
function post_form_param_list (line 8) | def post_form_param_list(items: list = Form()):
function post_form_param_set (line 13) | def post_form_param_set(items: set = Form()):
function post_form_param_tuple (line 18) | def post_form_param_tuple(items: tuple = Form()):
function test_python_list_param_as_form (line 25) | def test_python_list_param_as_form():
function test_python_set_param_as_form (line 33) | def test_python_set_param_as_form():
function test_python_tuple_param_as_form (line 41) | def test_python_tuple_param_as_form():
FILE: tests/test_forms_single_model.py
class FormModel (line 10) | class FormModel(BaseModel):
class FormModelExtraAllow (line 18) | class FormModelExtraAllow(BaseModel):
function post_form (line 25) | def post_form(user: Annotated[FormModel, Form()]):
function post_form_extra_allow (line 30) | def post_form_extra_allow(params: Annotated[FormModelExtraAllow, Form()]):
function test_send_all_data (line 37) | def test_send_all_data():
function test_defaults (line 58) | def test_defaults():
function test_invalid_data (line 70) | def test_invalid_data():
function test_no_data (line 93) | def test_no_data():
function test_extra_param_single (line 114) | def test_extra_param_single():
function test_extra_param_list (line 129) | def test_extra_param_list():
FILE: tests/test_forms_single_param.py
function post_form (line 11) | def post_form(username: Annotated[str, Form()]):
function test_single_form_field (line 18) | def test_single_form_field():
function test_openapi_schema (line 24) | def test_openapi_schema():
FILE: tests/test_generate_unique_id_function.py
function custom_generate_unique_id (line 10) | def custom_generate_unique_id(route: APIRoute):
function custom_generate_unique_id2 (line 14) | def custom_generate_unique_id2(route: APIRoute):
function custom_generate_unique_id3 (line 18) | def custom_generate_unique_id3(route: APIRoute):
class Item (line 22) | class Item(BaseModel):
class Message (line 27) | class Message(BaseModel):
function test_top_level_generate_unique_id (line 32) | def test_top_level_generate_unique_id():
function test_router_overrides_generate_unique_id (line 242) | def test_router_overrides_generate_unique_id():
function test_router_include_overrides_generate_unique_id (line 452) | def test_router_include_overrides_generate_unique_id():
function test_subrouter_top_level_include_overrides_generate_unique_id (line 662) | def test_subrouter_top_level_include_overrides_generate_unique_id():
function test_router_path_operation_overrides_generate_unique_id (line 947) | def test_router_path_operation_overrides_generate_unique_id():
function test_app_path_operation_overrides_generate_unique_id (line 1160) | def test_app_path_operation_overrides_generate_unique_id():
function test_callback_override_generate_unique_id (line 1377) | def test_callback_override_generate_unique_id():
function test_warn_duplicate_operation_id (line 1672) | def test_warn_duplicate_operation_id():
FILE: tests/test_generic_parameterless_depends.py
class A (line 14) | class A:
class B (line 18) | class B:
function a (line 23) | async def a(dep: Dep[A]):
function b (line 28) | async def b(dep: Dep[B]):
function test_generic_parameterless_depends (line 35) | def test_generic_parameterless_depends():
function test_openapi_schema (line 45) | def test_openapi_schema():
FILE: tests/test_get_model_definitions_formfeed_escape.py
function client_fixture (line 8) | def client_fixture() -> TestClient:
function test_get (line 39) | def test_get(client: TestClient):
function test_openapi_schema (line 52) | def test_openapi_schema(client: TestClient):
FILE: tests/test_get_request_body.py
class Product (line 9) | class Product(BaseModel):
function create_item (line 16) | async def create_item(product: Product):
function test_get_with_body (line 23) | def test_get_with_body():
function test_openapi_schema (line 29) | def test_openapi_schema():
FILE: tests/test_http_connection_injection.py
function extract_value_from_http_connection (line 10) | async def extract_value_from_http_connection(conn: HTTPConnection):
function get_value_by_http (line 15) | async def get_value_by_http(value: int = Depends(extract_value_from_http...
function get_value_by_ws (line 20) | async def get_value_by_ws(
function test_value_extracting_by_http (line 31) | def test_value_extracting_by_http():
function test_value_extracting_by_ws (line 37) | def test_value_extracting_by_ws():
FILE: tests/test_include_route.py
function read_items (line 10) | def read_items(request: Request):
function test_sub_router (line 19) | def test_sub_router():
FILE: tests/test_infer_param_optionality.py
function get_users (line 13) | def get_users():
function get_user (line 18) | def get_user(user_id: str):
function get_items (line 23) | def get_items(user_id: str | None = None):
function get_item (line 31) | def get_item(item_id: str, user_id: str | None = None):
function test_get_users (line 47) | def test_get_users():
function test_get_user (line 54) | def test_get_user():
function test_get_items_1 (line 61) | def test_get_items_1():
function test_get_items_2 (line 71) | def test_get_items_2():
function test_get_item_1 (line 78) | def test_get_item_1():
function test_get_item_2 (line 85) | def test_get_item_2():
function test_get_users_items (line 92) | def test_get_users_items():
function test_get_users_item (line 99) | def test_get_users_item():
function test_openapi_schema (line 106) | def test_openapi_schema():
FILE: tests/test_inherited_custom_class.py
class MyUuid (line 9) | class MyUuid:
method __init__ (line 10) | def __init__(self, uuid_string: str):
method __str__ (line 13) | def __str__(self):
method __class__ (line 17) | def __class__(self):
method __dict__ (line 21) | def __dict__(self):
function test_pydanticv2 (line 27) | def test_pydanticv2():
FILE: tests/test_invalid_path_param.py
function test_invalid_sequence (line 6) | def test_invalid_sequence():
function test_invalid_tuple (line 18) | def test_invalid_tuple():
function test_invalid_dict (line 30) | def test_invalid_dict():
function test_invalid_simple_list (line 42) | def test_invalid_simple_list():
function test_invalid_simple_tuple (line 51) | def test_invalid_simple_tuple():
function test_invalid_simple_set (line 60) | def test_invalid_simple_set():
function test_invalid_simple_dict (line 69) | def test_invalid_simple_dict():
FILE: tests/test_invalid_sequence_param.py
function test_invalid_sequence (line 6) | def test_invalid_sequence():
function test_invalid_tuple (line 21) | def test_invalid_tuple():
function test_invalid_dict (line 36) | def test_invalid_dict():
function test_invalid_simple_dict (line 51) | def test_invalid_simple_dict():
FILE: tests/test_json_type.py
function form_json_list (line 12) | def form_json_list(items: Annotated[Json[list[str]], Form()]) -> list[str]:
function query_json_list (line 17) | def query_json_list(items: Annotated[Json[list[str]], Query()]) -> list[...
function header_json_list (line 22) | def header_json_list(x_items: Annotated[Json[list[str]], Header()]) -> l...
function cookie_json_list (line 27) | def cookie_json_list(items: Annotated[Json[list[str]], Cookie()]) -> lis...
function test_form_json_list (line 34) | def test_form_json_list():
function test_query_json_list (line 42) | def test_query_json_list():
function test_header_json_list (line 50) | def test_header_json_list():
function test_cookie_json_list (line 58) | def test_cookie_json_list():
FILE: tests/test_jsonable_encoder.py
class Person (line 18) | class Person:
method __init__ (line 19) | def __init__(self, name: str):
class Pet (line 23) | class Pet:
method __init__ (line 24) | def __init__(self, owner: Person, name: str):
class Item (line 30) | class Item:
class DictablePerson (line 35) | class DictablePerson(Person):
method __iter__ (line 36) | def __iter__(self):
class DictablePet (line 40) | class DictablePet(Pet):
method __iter__ (line 41) | def __iter__(self):
class Unserializable (line 45) | class Unserializable:
method __iter__ (line 46) | def __iter__(self):
method __dict__ (line 50) | def __dict__(self):
class RoleEnum (line 54) | class RoleEnum(Enum):
class ModelWithConfig (line 59) | class ModelWithConfig(BaseModel):
class ModelWithAlias (line 65) | class ModelWithAlias(BaseModel):
class ModelWithDefault (line 69) | class ModelWithDefault(BaseModel):
function test_encode_dict (line 75) | def test_encode_dict():
function test_encode_dict_include_exclude_list (line 87) | def test_encode_dict_include_exclude_list():
function test_encode_class (line 99) | def test_encode_class():
function test_encode_dictable (line 112) | def test_encode_dictable():
function test_encode_dataclass (line 125) | def test_encode_dataclass():
function test_encode_unsupported (line 134) | def test_encode_unsupported():
function test_encode_custom_json_encoders_model_pydanticv2 (line 140) | def test_encode_custom_json_encoders_model_pydanticv2():
function test_json_encoder_error_with_pydanticv1 (line 159) | def test_json_encoder_error_with_pydanticv1():
function test_encode_model_with_config (line 172) | def test_encode_model_with_config():
function test_encode_model_with_alias_raises (line 177) | def test_encode_model_with_alias_raises():
function test_encode_model_with_alias (line 182) | def test_encode_model_with_alias():
function test_encode_model_with_default (line 187) | def test_encode_model_with_default():
function test_custom_encoders (line 205) | def test_custom_encoders():
function test_custom_enum_encoders (line 228) | def test_custom_enum_encoders():
function test_encode_model_with_pure_path (line 243) | def test_encode_model_with_pure_path():
function test_encode_model_with_pure_posix_path (line 254) | def test_encode_model_with_pure_posix_path():
function test_encode_model_with_pure_windows_path (line 264) | def test_encode_model_with_pure_windows_path():
function test_encode_pure_path (line 274) | def test_encode_pure_path():
function test_decimal_encoder_float (line 280) | def test_decimal_encoder_float():
function test_dec
Copy disabled (too large)
Download .json
Condensed preview — 2746 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (14,926K chars).
[
{
"path": ".github/DISCUSSION_TEMPLATE/questions.yml",
"chars": 5949,
"preview": "labels: [question]\nbody:\n - type: markdown\n attributes:\n value: |\n Thanks for your interest in FastAPI! "
},
{
"path": ".github/DISCUSSION_TEMPLATE/translations.yml",
"chars": 1679,
"preview": "labels: [lang-all]\nbody:\n - type: markdown\n attributes:\n value: |\n Thanks for your interest in helping t"
},
{
"path": ".github/FUNDING.yml",
"chars": 19,
"preview": "github: [tiangolo]\n"
},
{
"path": ".github/ISSUE_TEMPLATE/config.yml",
"chars": 926,
"preview": "blank_issues_enabled: false\ncontact_links:\n - name: Security Contact\n about: Please report security vulnerabilities "
},
{
"path": ".github/ISSUE_TEMPLATE/privileged.yml",
"chars": 882,
"preview": "name: Privileged\ndescription: You are @tiangolo or he asked you directly to create an issue here. If not, check the othe"
},
{
"path": ".github/dependabot.yml",
"chars": 556,
"preview": "version: 2\nupdates:\n # GitHub Actions\n - package-ecosystem: \"github-actions\"\n directory: \"/\"\n schedule:\n in"
},
{
"path": ".github/labeler.yml",
"chars": 888,
"preview": "docs:\n - all:\n - changed-files:\n - any-glob-to-any-file:\n - docs/en/docs/**\n - docs_src/**\n "
},
{
"path": ".github/workflows/add-to-project.yml",
"chars": 503,
"preview": "name: Add to Project\n\non:\n pull_request_target: # zizmor: ignore[dangerous-triggers]\n issues:\n types:\n - opene"
},
{
"path": ".github/workflows/build-docs.yml",
"chars": 4142,
"preview": "name: Build Docs\non:\n push:\n branches:\n - master\n pull_request:\n types:\n - opened\n - synchronize\n"
},
{
"path": ".github/workflows/contributors.yml",
"chars": 1916,
"preview": "name: FastAPI People Contributors\n\non:\n schedule:\n - cron: \"0 3 1 * *\"\n workflow_dispatch:\n inputs:\n debug_"
},
{
"path": ".github/workflows/deploy-docs.yml",
"chars": 3194,
"preview": "name: Deploy Docs\non:\n workflow_run: # zizmor: ignore[dangerous-triggers]\n workflows:\n - Build Docs\n types:\n"
},
{
"path": ".github/workflows/detect-conflicts.yml",
"chars": 600,
"preview": "name: \"Conflict detector\"\non:\n push:\n pull_request_target: # zizmor: ignore[dangerous-triggers]\n types: [synchroniz"
},
{
"path": ".github/workflows/issue-manager.yml",
"chars": 1977,
"preview": "name: Issue Manager\n\non:\n schedule:\n - cron: \"13 22 * * *\"\n issue_comment:\n types:\n - created\n issues:\n "
},
{
"path": ".github/workflows/label-approved.yml",
"chars": 1330,
"preview": "name: Label Approved\n\non:\n schedule:\n - cron: \"0 12 * * *\"\n workflow_dispatch:\n\npermissions: {}\n\njobs:\n label-appr"
},
{
"path": ".github/workflows/labeler.yml",
"chars": 951,
"preview": "name: Labels\non:\n pull_request_target: # zizmor: ignore[dangerous-triggers]\n types:\n - opened\n - synchroni"
},
{
"path": ".github/workflows/latest-changes.yml",
"chars": 1739,
"preview": "name: Latest Changes\n\non:\n pull_request_target: # zizmor: ignore[dangerous-triggers]\n branches:\n - master\n t"
},
{
"path": ".github/workflows/notify-translations.yml",
"chars": 2027,
"preview": "name: Notify Translations\n\non:\n pull_request_target: # zizmor: ignore[dangerous-triggers]\n types:\n - labeled\n "
},
{
"path": ".github/workflows/people.yml",
"chars": 1941,
"preview": "name: FastAPI People\n\non:\n schedule:\n - cron: \"0 14 1 * *\"\n workflow_dispatch:\n inputs:\n debug_enabled:\n "
},
{
"path": ".github/workflows/pre-commit.yml",
"chars": 3444,
"preview": "name: pre-commit\n\non:\n pull_request:\n types:\n - opened\n - synchronize\n\npermissions: {}\n\nenv:\n # Forks and"
},
{
"path": ".github/workflows/publish.yml",
"chars": 880,
"preview": "name: Publish\n\non:\n release:\n types:\n - created\n\npermissions: {}\n\njobs:\n publish:\n runs-on: ubuntu-latest\n "
},
{
"path": ".github/workflows/smokeshow.yml",
"chars": 2021,
"preview": "name: Smokeshow\n\non:\n workflow_run: # zizmor: ignore[dangerous-triggers]\n workflows: [Test]\n types: [completed]\n\n"
},
{
"path": ".github/workflows/sponsors.yml",
"chars": 1883,
"preview": "name: FastAPI People Sponsors\n\non:\n schedule:\n - cron: \"0 6 1 * *\"\n workflow_dispatch:\n inputs:\n debug_enab"
},
{
"path": ".github/workflows/test-redistribute.yml",
"chars": 1867,
"preview": "name: Test Redistribute\n\non:\n push:\n branches:\n - master\n pull_request:\n types:\n - opened\n - sync"
},
{
"path": ".github/workflows/test.yml",
"chars": 8558,
"preview": "name: Test\n\non:\n push:\n branches:\n - master\n pull_request:\n types:\n - opened\n - synchronize\n sch"
},
{
"path": ".github/workflows/topic-repos.yml",
"chars": 1289,
"preview": "name: Update Topic Repos\n\non:\n schedule:\n - cron: \"0 12 1 * *\"\n workflow_dispatch:\n\npermissions: {}\n\njobs:\n topic-"
},
{
"path": ".github/workflows/translate.yml",
"chars": 4752,
"preview": "name: Translate\n\non:\n schedule:\n - cron: \"0 5 1,15 * *\" # Run at 05:00 on the 1st and 15th of every month\n\n workfl"
},
{
"path": ".gitignore",
"chars": 280,
"preview": ".idea\n.ipynb_checkpoints\n.mypy_cache\n.vscode\n__pycache__\n.pytest_cache\nhtmlcov\ndist\nsite\n.coverage*\ncoverage.xml\n.netlif"
},
{
"path": ".pre-commit-config.yaml",
"chars": 3089,
"preview": "# See https://pre-commit.com for more information\n# See https://pre-commit.com/hooks.html for more hooks\nrepos:\n - repo"
},
{
"path": ".python-version",
"chars": 5,
"preview": "3.11\n"
},
{
"path": "CITATION.cff",
"chars": 612,
"preview": "# This CITATION.cff file was generated with cffinit.\n# Visit https://bit.ly/cffinit to generate yours today!\n\ncff-versio"
},
{
"path": "CONTRIBUTING.md",
"chars": 127,
"preview": "Please read the [Development - Contributing](https://fastapi.tiangolo.com/contributing/) guidelines in the documentation"
},
{
"path": "LICENSE",
"chars": 1084,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2018 Sebastián Ramírez\n\nPermission is hereby granted, free of charge, to any person"
},
{
"path": "README.md",
"chars": 23541,
"preview": "<p align=\"center\">\n <a href=\"https://fastapi.tiangolo.com\"><img src=\"https://fastapi.tiangolo.com/img/logo-margin/logo-"
},
{
"path": "SECURITY.md",
"chars": 1308,
"preview": "# Security Policy\n\nSecurity is very important for FastAPI and its community. 🔒\n\nLearn more about it below. 👇\n\n## Version"
},
{
"path": "docs/de/docs/_llm-test.md",
"chars": 12387,
"preview": "# LLM-Testdatei { #llm-test-file }\n\nDieses Dokument testet, ob das <abbr title=\"Large Language Model – Großes Sprachmode"
},
{
"path": "docs/de/docs/about/index.md",
"chars": 76,
"preview": "# Über { #about }\n\nÜber FastAPI, sein Design, seine Inspiration und mehr. 🤓\n"
},
{
"path": "docs/de/docs/advanced/additional-responses.md",
"chars": 10032,
"preview": "# Zusätzliche Responses in OpenAPI { #additional-responses-in-openapi }\n\n/// warning | Achtung\n\nDies ist ein eher fortge"
},
{
"path": "docs/de/docs/advanced/additional-status-codes.md",
"chars": 2364,
"preview": "# Zusätzliche Statuscodes { #additional-status-codes }\n\nStandardmäßig liefert **FastAPI** die <abbr title=\"Response – An"
},
{
"path": "docs/de/docs/advanced/advanced-dependencies.md",
"chars": 10374,
"preview": "# Fortgeschrittene Abhängigkeiten { #advanced-dependencies }\n\n## Parametrisierte Abhängigkeiten { #parameterized-depende"
},
{
"path": "docs/de/docs/advanced/advanced-python-types.md",
"chars": 2296,
"preview": "# Fortgeschrittene Python-Typen { #advanced-python-types }\n\nHier sind einige zusätzliche Ideen, die beim Arbeiten mit Py"
},
{
"path": "docs/de/docs/advanced/async-tests.md",
"chars": 4370,
"preview": "# Asynchrone Tests { #async-tests }\n\nSie haben bereits gesehen, wie Sie Ihre **FastAPI**-Anwendungen mit dem bereitgeste"
},
{
"path": "docs/de/docs/advanced/behind-a-proxy.md",
"chars": 18241,
"preview": "# Hinter einem Proxy { #behind-a-proxy }\n\nIn vielen Situationen würden Sie einen **Proxy** wie Traefik oder Nginx vor Ih"
},
{
"path": "docs/de/docs/advanced/custom-response.md",
"chars": 12666,
"preview": "# Benutzerdefinierte Response – HTML, Stream, Datei, andere { #custom-response-html-stream-file-others }\n\nStandardmäßig "
},
{
"path": "docs/de/docs/advanced/dataclasses.md",
"chars": 4836,
"preview": "# Datenklassen verwenden { #using-dataclasses }\n\nFastAPI basiert auf **Pydantic**, und ich habe Ihnen gezeigt, wie Sie P"
},
{
"path": "docs/de/docs/advanced/events.md",
"chars": 9503,
"preview": "# Lifespan-Events { #lifespan-events }\n\nSie können Logik (Code) definieren, die ausgeführt werden soll, bevor die Anwend"
},
{
"path": "docs/de/docs/advanced/generate-clients.md",
"chars": 11406,
"preview": "# SDKs generieren { #generating-sdks }\n\nDa **FastAPI** auf der **OpenAPI**-Spezifikation basiert, können dessen APIs in "
},
{
"path": "docs/de/docs/advanced/index.md",
"chars": 876,
"preview": "# Handbuch für fortgeschrittene Benutzer { #advanced-user-guide }\n\n## Zusatzfunktionen { #additional-features }\n\nDas Hau"
},
{
"path": "docs/de/docs/advanced/json-base64-bytes.md",
"chars": 2785,
"preview": "# JSON mit Bytes als base64 { #json-with-bytes-as-base64 }\n\nWenn Ihre App JSON-Daten empfangen und senden muss, Sie dari"
},
{
"path": "docs/de/docs/advanced/middleware.md",
"chars": 4922,
"preview": "# Fortgeschrittene Middleware { #advanced-middleware }\n\nIm Haupttutorial haben Sie gelesen, wie Sie Ihrer Anwendung [ben"
},
{
"path": "docs/de/docs/advanced/openapi-callbacks.md",
"chars": 9079,
"preview": "# OpenAPI-Callbacks { #openapi-callbacks }\n\nSie könnten eine API mit einer *Pfadoperation* erstellen, die einen <abbr ti"
},
{
"path": "docs/de/docs/advanced/openapi-webhooks.md",
"chars": 3554,
"preview": "# OpenAPI Webhooks { #openapi-webhooks }\n\nEs gibt Fälle, in denen Sie Ihren API-**Benutzern** mitteilen möchten, dass Ih"
},
{
"path": "docs/de/docs/advanced/path-operation-advanced-configuration.md",
"chars": 8283,
"preview": "# Fortgeschrittene Konfiguration der Pfadoperation { #path-operation-advanced-configuration }\n\n## OpenAPI operationId { "
},
{
"path": "docs/de/docs/advanced/response-change-status-code.md",
"chars": 1976,
"preview": "# Response – Statuscode ändern { #response-change-status-code }\n\nSie haben wahrscheinlich schon vorher gelesen, dass Sie"
},
{
"path": "docs/de/docs/advanced/response-cookies.md",
"chars": 2637,
"preview": "# Response-Cookies { #response-cookies }\n\n## Einen `Response`-Parameter verwenden { #use-a-response-parameter }\n\nSie kön"
},
{
"path": "docs/de/docs/advanced/response-directly.md",
"chars": 4812,
"preview": "# Eine Response direkt zurückgeben { #return-a-response-directly }\n\nWenn Sie eine **FastAPI** *Pfadoperation* erstellen,"
},
{
"path": "docs/de/docs/advanced/response-headers.md",
"chars": 2648,
"preview": "# Response-Header { #response-headers }\n\n## Einen `Response`-Parameter verwenden { #use-a-response-parameter }\n\nSie könn"
},
{
"path": "docs/de/docs/advanced/security/http-basic-auth.md",
"chars": 6170,
"preview": "# HTTP Basic Auth { #http-basic-auth }\n\nFür die einfachsten Fälle können Sie <abbr title=\"HTTP-Basisauthentifizierung\">H"
},
{
"path": "docs/de/docs/advanced/security/index.md",
"chars": 780,
"preview": "# Fortgeschrittene Sicherheit { #advanced-security }\n\n## Zusatzfunktionen { #additional-features }\n\nNeben den in [Tutori"
},
{
"path": "docs/de/docs/advanced/security/oauth2-scopes.md",
"chars": 15803,
"preview": "# OAuth2-Scopes { #oauth2-scopes }\n\nSie können OAuth2-<abbr title=\"Geltungsbereiche\">Scopes</abbr> direkt in **FastAPI**"
},
{
"path": "docs/de/docs/advanced/settings.md",
"chars": 12665,
"preview": "# Einstellungen und Umgebungsvariablen { #settings-and-environment-variables }\n\nIn vielen Fällen benötigt Ihre Anwendung"
},
{
"path": "docs/de/docs/advanced/stream-data.md",
"chars": 6039,
"preview": "# Daten streamen { #stream-data }\n\nWenn Sie Daten streamen möchten, die als JSON strukturiert werden können, sollten Sie"
},
{
"path": "docs/de/docs/advanced/strict-content-type.md",
"chars": 3658,
"preview": "# Strikte Content-Type-Prüfung { #strict-content-type-checking }\n\nStandardmäßig verwendet **FastAPI** eine strikte Prüfu"
},
{
"path": "docs/de/docs/advanced/sub-applications.md",
"chars": 3241,
"preview": "# Unteranwendungen – Mounts { #sub-applications-mounts }\n\nWenn Sie zwei unabhängige FastAPI-Anwendungen mit deren eigene"
},
{
"path": "docs/de/docs/advanced/templates.md",
"chars": 4252,
"preview": "# Templates { #templates }\n\nSie können jede gewünschte Template-Engine mit **FastAPI** verwenden.\n\nEine häufige Wahl ist"
},
{
"path": "docs/de/docs/advanced/testing-dependencies.md",
"chars": 3218,
"preview": "# Testen mit Überschreibungen für Abhängigkeiten { #testing-dependencies-with-overrides }\n\n## Abhängigkeiten beim Testen"
},
{
"path": "docs/de/docs/advanced/testing-events.md",
"chars": 727,
"preview": "# Events testen: Lifespan und Startup – Shutdown { #testing-events-lifespan-and-startup-shutdown }\n\nWenn Sie `lifespan` "
},
{
"path": "docs/de/docs/advanced/testing-websockets.md",
"chars": 470,
"preview": "# WebSockets testen { #testing-websockets }\n\nSie können denselben `TestClient` zum Testen von WebSockets verwenden.\n\nDaz"
},
{
"path": "docs/de/docs/advanced/using-request-directly.md",
"chars": 2610,
"preview": "# Den Request direkt verwenden { #using-the-request-directly }\n\nBisher haben Sie die Teile des <abbr title=\"Request – An"
},
{
"path": "docs/de/docs/advanced/websockets.md",
"chars": 6166,
"preview": "# WebSockets { #websockets }\n\nSie können [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) m"
},
{
"path": "docs/de/docs/advanced/wsgi.md",
"chars": 1760,
"preview": "# WSGI inkludieren – Flask, Django und andere { #including-wsgi-flask-django-others }\n\nSie können WSGI-Anwendungen mount"
},
{
"path": "docs/de/docs/alternatives.md",
"chars": 26342,
"preview": "# Alternativen, Inspiration und Vergleiche { #alternatives-inspiration-and-comparisons }\n\nWas hat **FastAPI** inspiriert"
},
{
"path": "docs/de/docs/async.md",
"chars": 27159,
"preview": "# Nebenläufigkeit und async / await { #concurrency-and-async-await }\n\nDetails zur `async def`-Syntax für *Pfadoperation-"
},
{
"path": "docs/de/docs/benchmarks.md",
"chars": 4020,
"preview": "# Benchmarks { #benchmarks }\n\nUnabhängige TechEmpower-Benchmarks zeigen **FastAPI**-Anwendungen, die unter Uvicorn ausge"
},
{
"path": "docs/de/docs/deployment/cloud.md",
"chars": 1272,
"preview": "# FastAPI bei Cloudanbietern deployen { #deploy-fastapi-on-cloud-providers }\n\nSie können praktisch **jeden Cloudanbieter"
},
{
"path": "docs/de/docs/deployment/concepts.md",
"chars": 21505,
"preview": "# Deployment-Konzepte { #deployments-concepts }\n\nBei dem Deployment – der Bereitstellung – einer **FastAPI**-Anwendung, "
},
{
"path": "docs/de/docs/deployment/docker.md",
"chars": 32739,
"preview": "# FastAPI in Containern – Docker { #fastapi-in-containers-docker }\n\nBeim Deployment von FastAPI-Anwendungen besteht ein "
},
{
"path": "docs/de/docs/deployment/fastapicloud.md",
"chars": 2069,
"preview": "# FastAPI Cloud { #fastapi-cloud }\n\nSie können Ihre FastAPI-App in der [FastAPI Cloud](https://fastapicloud.com) mit **e"
},
{
"path": "docs/de/docs/deployment/https.md",
"chars": 15969,
"preview": "# Über HTTPS { #about-https }\n\nEs ist leicht anzunehmen, dass HTTPS etwas ist, was einfach nur „aktiviert“ wird oder nic"
},
{
"path": "docs/de/docs/deployment/index.md",
"chars": 1775,
"preview": "# Deployment { #deployment }\n\nDas Deployment einer **FastAPI**-Anwendung ist relativ einfach.\n\n## Was bedeutet Deploymen"
},
{
"path": "docs/de/docs/deployment/manually.md",
"chars": 7391,
"preview": "# Einen Server manuell ausführen { #run-a-server-manually }\n\n## Den `fastapi run`-Befehl verwenden { #use-the-fastapi-ru"
},
{
"path": "docs/de/docs/deployment/server-workers.md",
"chars": 8844,
"preview": "# Serverworker – Uvicorn mit Workern { #server-workers-uvicorn-with-workers }\n\nSchauen wir uns die Deployment-Konzepte v"
},
{
"path": "docs/de/docs/deployment/versions.md",
"chars": 4005,
"preview": "# Über FastAPI-Versionen { #about-fastapi-versions }\n\n**FastAPI** wird bereits in vielen Anwendungen und Systemen produk"
},
{
"path": "docs/de/docs/editor-support.md",
"chars": 2702,
"preview": "# Editor-Unterstützung { #editor-support }\n\nDie offizielle [FastAPI-Erweiterung](https://marketplace.visualstudio.com/it"
},
{
"path": "docs/de/docs/environment-variables.md",
"chars": 8915,
"preview": "# Umgebungsvariablen { #environment-variables }\n\n/// tip | Tipp\n\nWenn Sie bereits wissen, was „Umgebungsvariablen“ sind "
},
{
"path": "docs/de/docs/fastapi-cli.md",
"chars": 6277,
"preview": "# FastAPI CLI { #fastapi-cli }\n\n**FastAPI <abbr title=\"command line interface - Kommandozeileninterface\">CLI</abbr>** is"
},
{
"path": "docs/de/docs/features.md",
"chars": 10412,
"preview": "# Merkmale { #features }\n\n## FastAPI Merkmale { #fastapi-features }\n\n**FastAPI** ermöglicht Ihnen Folgendes:\n\n### Basier"
},
{
"path": "docs/de/docs/help-fastapi.md",
"chars": 14826,
"preview": "# FastAPI helfen – Hilfe erhalten { #help-fastapi-get-help }\n\nMögen Sie **FastAPI**?\n\nMöchten Sie FastAPI, anderen Benut"
},
{
"path": "docs/de/docs/history-design-future.md",
"chars": 4734,
"preview": "# Geschichte, Design und Zukunft { #history-design-and-future }\n\nVor einiger Zeit fragte [ein **FastAPI**-Benutzer](http"
},
{
"path": "docs/de/docs/how-to/authentication-error-status-code.md",
"chars": 1290,
"preview": "# Alte 403-Authentifizierungsfehler-Statuscodes verwenden { #use-old-403-authentication-error-status-codes }\n\nVor FastAP"
},
{
"path": "docs/de/docs/how-to/conditional-openapi.md",
"chars": 2987,
"preview": "# Bedingte OpenAPI { #conditional-openapi }\n\nBei Bedarf können Sie OpenAPI mithilfe von Einstellungen und Umgebungsvaria"
},
{
"path": "docs/de/docs/how-to/configure-swagger-ui.md",
"chars": 3478,
"preview": "# Swagger-Oberfläche konfigurieren { #configure-swagger-ui }\n\nSie können einige zusätzliche [Parameter der Swagger-Oberf"
},
{
"path": "docs/de/docs/how-to/custom-docs-ui-assets.md",
"chars": 9214,
"preview": "# Statische Assets der Dokumentationsoberfläche (Selbst-Hosting) { #custom-docs-ui-static-assets-self-hosting }\n\nDie API"
},
{
"path": "docs/de/docs/how-to/custom-request-and-route.md",
"chars": 5673,
"preview": "# Benutzerdefinierte Request- und APIRoute-Klasse { #custom-request-and-apiroute-class }\n\nIn einigen Fällen möchten Sie "
},
{
"path": "docs/de/docs/how-to/extending-openapi.md",
"chars": 3974,
"preview": "# OpenAPI erweitern { #extending-openapi }\n\nEs gibt einige Fälle, in denen Sie das generierte OpenAPI-Schema ändern müss"
},
{
"path": "docs/de/docs/how-to/general.md",
"chars": 3494,
"preview": "# Allgemeines – How-To – Rezepte { #general-how-to-recipes }\n\nHier finden Sie mehrere Verweise auf andere Stellen in der"
},
{
"path": "docs/de/docs/how-to/graphql.md",
"chars": 3127,
"preview": "# GraphQL { #graphql }\n\nDa **FastAPI** auf dem **ASGI**-Standard basiert, ist es sehr einfach, jede **GraphQL**-Biblioth"
},
{
"path": "docs/de/docs/how-to/index.md",
"chars": 608,
"preview": "# How-To – Rezepte { #how-to-recipes }\n\nHier finden Sie verschiedene Rezepte und „How-To“-Anleitungen zu **verschiedenen"
},
{
"path": "docs/de/docs/how-to/migrate-from-pydantic-v1-to-pydantic-v2.md",
"chars": 6176,
"preview": "# Von Pydantic v1 zu Pydantic v2 migrieren { #migrate-from-pydantic-v1-to-pydantic-v2 }\n\nWenn Sie eine ältere FastAPI-Ap"
},
{
"path": "docs/de/docs/how-to/separate-openapi-schemas.md",
"chars": 5203,
"preview": "# Separate OpenAPI-Schemas für Eingabe und Ausgabe oder nicht { #separate-openapi-schemas-for-input-and-output-or-not }\n"
},
{
"path": "docs/de/docs/how-to/testing-database.md",
"chars": 439,
"preview": "# Eine Datenbank testen { #testing-a-database }\n\nSie können sich über Datenbanken, SQL und SQLModel in der [SQLModel-Dok"
},
{
"path": "docs/de/docs/index.md",
"chars": 23747,
"preview": "# FastAPI { #fastapi }\n\n<style>\n.md-content .md-typeset h1 { display: none; }\n</style>\n\n<p align=\"center\">\n <a href=\"ht"
},
{
"path": "docs/de/docs/learn/index.md",
"chars": 227,
"preview": "# Lernen { #learn }\n\nHier sind die einführenden Abschnitte und Tutorials, um **FastAPI** zu lernen.\n\nSie könnten dies al"
},
{
"path": "docs/de/docs/project-generation.md",
"chars": 2151,
"preview": "# Full Stack FastAPI Template { #full-stack-fastapi-template }\n\nVorlagen, die normalerweise mit einem bestimmten Setup g"
},
{
"path": "docs/de/docs/python-types.md",
"chars": 12706,
"preview": "# Einführung in Python-Typen { #python-types-intro }\n\nPython hat Unterstützung für optionale „Typhinweise“ (auch „Typann"
},
{
"path": "docs/de/docs/resources/index.md",
"chars": 80,
"preview": "# Ressourcen { #resources }\n\nZusätzliche Ressourcen, externe Links und mehr. ✈️\n"
},
{
"path": "docs/de/docs/translation-banner.md",
"chars": 441,
"preview": "/// details | 🌐 Übersetzung durch KI und Menschen\n\nDiese Übersetzung wurde von KI erstellt, angeleitet von Menschen. 🤝\n\n"
},
{
"path": "docs/de/docs/tutorial/background-tasks.md",
"chars": 5732,
"preview": "# Hintergrundtasks { #background-tasks }\n\nSie können <abbr title=\"Hintergrund-Aufgaben\">Hintergrundtasks</abbr> definier"
},
{
"path": "docs/de/docs/tutorial/bigger-applications.md",
"chars": 21904,
"preview": "# Größere Anwendungen – mehrere Dateien { #bigger-applications-multiple-files }\n\nWenn Sie eine Anwendung oder eine Web-A"
},
{
"path": "docs/de/docs/tutorial/body-fields.md",
"chars": 2740,
"preview": "# Body – Felder { #body-fields }\n\nSo wie Sie zusätzliche Validierung und Metadaten in Parametern der *Pfadoperation-Funk"
},
{
"path": "docs/de/docs/tutorial/body-multiple-params.md",
"chars": 5507,
"preview": "# Body – Mehrere Parameter { #body-multiple-parameters }\n\nNun, da wir gesehen haben, wie `Path` und `Query` verwendet we"
},
{
"path": "docs/de/docs/tutorial/body-nested-models.md",
"chars": 7626,
"preview": "# Body – Verschachtelte Modelle { #body-nested-models }\n\nMit **FastAPI** können Sie (dank Pydantic) beliebig tief versch"
},
{
"path": "docs/de/docs/tutorial/body-updates.md",
"chars": 5050,
"preview": "# Body – Aktualisierungen { #body-updates }\n\n## Ersetzendes Aktualisieren mit `PUT` { #update-replacing-with-put }\n\nUm e"
},
{
"path": "docs/de/docs/tutorial/body.md",
"chars": 7632,
"preview": "# Requestbody { #request-body }\n\nWenn Sie Daten von einem <abbr title=\"Client: Eine Software, die sich mit einem Server "
},
{
"path": "docs/de/docs/tutorial/cookie-param-models.md",
"chars": 3780,
"preview": "# Cookie-Parameter-Modelle { #cookie-parameter-models }\n\nWenn Sie eine Gruppe von **Cookies** haben, die zusammengehören"
},
{
"path": "docs/de/docs/tutorial/cookie-params.md",
"chars": 1807,
"preview": "# Cookie-Parameter { #cookie-parameters }\n\nSie können Cookie-Parameter auf die gleiche Weise definieren wie `Query`- und"
},
{
"path": "docs/de/docs/tutorial/cors.md",
"chars": 6095,
"preview": "# CORS (Cross-Origin Resource Sharing) { #cors-cross-origin-resource-sharing }\n\n[CORS oder <abbr title=\"Ressourcenfreiga"
},
{
"path": "docs/de/docs/tutorial/debugging.md",
"chars": 2702,
"preview": "# Debugging { #debugging }\n\nSie können den Debugger in Ihrem Editor verbinden, zum Beispiel mit Visual Studio Code oder "
},
{
"path": "docs/de/docs/tutorial/dependencies/classes-as-dependencies.md",
"chars": 7663,
"preview": "# Klassen als Abhängigkeiten { #classes-as-dependencies }\n\nBevor wir tiefer in das **Dependency Injection** System einta"
},
{
"path": "docs/de/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md",
"chars": 3485,
"preview": "# Abhängigkeiten in Pfadoperation-Dekoratoren { #dependencies-in-path-operation-decorators }\n\nManchmal benötigen Sie den"
},
{
"path": "docs/de/docs/tutorial/dependencies/dependencies-with-yield.md",
"chars": 14439,
"preview": "# Abhängigkeiten mit `yield` { #dependencies-with-yield }\n\nFastAPI unterstützt Abhängigkeiten, die einige <dfn title=\"ma"
},
{
"path": "docs/de/docs/tutorial/dependencies/global-dependencies.md",
"chars": 1127,
"preview": "# Globale Abhängigkeiten { #global-dependencies }\n\nBei einigen Anwendungstypen möchten Sie möglicherweise Abhängigkeiten"
},
{
"path": "docs/de/docs/tutorial/dependencies/index.md",
"chars": 11330,
"preview": "# Abhängigkeiten { #dependencies }\n\n**FastAPI** hat ein sehr mächtiges, aber intuitives **<dfn title=\"auch bekannt als K"
},
{
"path": "docs/de/docs/tutorial/dependencies/sub-dependencies.md",
"chars": 4470,
"preview": "# Unterabhängigkeiten { #sub-dependencies }\n\nSie können Abhängigkeiten erstellen, die **Unterabhängigkeiten** haben.\n\nDi"
},
{
"path": "docs/de/docs/tutorial/encoder.md",
"chars": 1777,
"preview": "# JSON-kompatibler Encoder { #json-compatible-encoder }\n\nEs gibt Fälle, da möchten Sie einen Datentyp (etwa ein Pydantic"
},
{
"path": "docs/de/docs/tutorial/extra-data-types.md",
"chars": 3121,
"preview": "# Zusätzliche Datentypen { #extra-data-types }\n\nBisher haben Sie gängige Datentypen verwendet, wie zum Beispiel:\n\n* `int"
},
{
"path": "docs/de/docs/tutorial/extra-models.md",
"chars": 7838,
"preview": "# Extramodelle { #extra-models }\n\nIm Anschluss an das vorherige Beispiel ist es üblich, mehr als ein zusammenhängendes M"
},
{
"path": "docs/de/docs/tutorial/first-steps.md",
"chars": 15047,
"preview": "# Erste Schritte { #first-steps }\n\nDie einfachste FastAPI-Datei könnte wie folgt aussehen:\n\n{* ../../docs_src/first_step"
},
{
"path": "docs/de/docs/tutorial/handling-errors.md",
"chars": 10405,
"preview": "# Fehler behandeln { #handling-errors }\n\nEs gibt viele Situationen, in denen Sie einem Client, der Ihre API nutzt, einen"
},
{
"path": "docs/de/docs/tutorial/header-param-models.md",
"chars": 3165,
"preview": "# Header-Parameter-Modelle { #header-parameter-models }\n\nWenn Sie eine Gruppe verwandter **Header-Parameter** haben, kön"
},
{
"path": "docs/de/docs/tutorial/header-params.md",
"chars": 3512,
"preview": "# Header-Parameter { #header-parameters }\n\nSie können Header-Parameter genauso definieren, wie Sie `Query`-, `Path`- und"
},
{
"path": "docs/de/docs/tutorial/index.md",
"chars": 5903,
"preview": "# Tutorial – Benutzerhandbuch { #tutorial-user-guide }\n\nDieses Tutorial zeigt Ihnen Schritt für Schritt, wie Sie **FastA"
},
{
"path": "docs/de/docs/tutorial/metadata.md",
"chars": 6910,
"preview": "# Metadaten und Dokumentations-URLs { #metadata-and-docs-urls }\n\nSie können mehrere Metadaten-Konfigurationen in Ihrer *"
},
{
"path": "docs/de/docs/tutorial/middleware.md",
"chars": 4682,
"preview": "# Middleware { #middleware }\n\nSie können Middleware zu **FastAPI**-Anwendungen hinzufügen.\n\nEine „Middleware“ ist eine F"
},
{
"path": "docs/de/docs/tutorial/path-operation-configuration.md",
"chars": 4715,
"preview": "# Pfadoperation-Konfiguration { #path-operation-configuration }\n\nEs gibt mehrere Parameter, die Sie Ihrem *Pfadoperation"
},
{
"path": "docs/de/docs/tutorial/path-params-numeric-validations.md",
"chars": 7136,
"preview": "# Pfad-Parameter und Validierung von Zahlen { #path-parameters-and-numeric-validations }\n\nSo wie Sie mit `Query` für Que"
},
{
"path": "docs/de/docs/tutorial/path-params.md",
"chars": 10171,
"preview": "# Pfad-Parameter { #path-parameters }\n\nSie können Pfad-„Parameter“ oder -„Variablen“ mit der gleichen Syntax deklarieren"
},
{
"path": "docs/de/docs/tutorial/query-param-models.md",
"chars": 2656,
"preview": "# Query-Parameter-Modelle { #query-parameter-models }\n\nWenn Sie eine Gruppe von **Query-Parametern** haben, die miteinan"
},
{
"path": "docs/de/docs/tutorial/query-params-str-validations.md",
"chars": 18902,
"preview": "# Query-Parameter und String-Validierungen { #query-parameters-and-string-validations }\n\n**FastAPI** ermöglicht es Ihnen"
},
{
"path": "docs/de/docs/tutorial/query-params.md",
"chars": 5029,
"preview": "# Query-Parameter { #query-parameters }\n\nWenn Sie in Ihrer Funktion andere Parameter deklarieren, die nicht Teil der Pfa"
},
{
"path": "docs/de/docs/tutorial/request-files.md",
"chars": 8448,
"preview": "# Dateien im Request { #request-files }\n\nSie können Dateien, die vom Client hochgeladen werden, mithilfe von `File` defi"
},
{
"path": "docs/de/docs/tutorial/request-form-models.md",
"chars": 2670,
"preview": "# Formularmodelle { #form-models }\n\nSie können **Pydantic-Modelle** verwenden, um **Formularfelder** in FastAPI zu dekla"
},
{
"path": "docs/de/docs/tutorial/request-forms-and-files.md",
"chars": 1723,
"preview": "# Formulardaten und Dateien im Request { #request-forms-and-files }\n\nSie können gleichzeitig Dateien und Formulardaten m"
},
{
"path": "docs/de/docs/tutorial/request-forms.md",
"chars": 3103,
"preview": "# Formulardaten { #form-data }\n\nWenn Sie Felder aus Formularen statt JSON empfangen müssen, können Sie `Form` verwenden."
},
{
"path": "docs/de/docs/tutorial/response-model.md",
"chars": 17728,
"preview": "# Responsemodell – Rückgabetyp { #response-model-return-type }\n\nSie können den Typ der <abbr title=\"Response – Antwort: "
},
{
"path": "docs/de/docs/tutorial/response-status-code.md",
"chars": 4718,
"preview": "# Response-Statuscode { #response-status-code }\n\nGenauso wie Sie ein Responsemodell angeben können, können Sie auch den "
},
{
"path": "docs/de/docs/tutorial/schema-extra-example.md",
"chars": 10499,
"preview": "# Beispiel-Request-Daten deklarieren { #declare-request-example-data }\n\nSie können Beispiele für die Daten deklarieren, "
},
{
"path": "docs/de/docs/tutorial/security/first-steps.md",
"chars": 9833,
"preview": "# Sicherheit – Erste Schritte { #security-first-steps }\n\nStellen wir uns vor, dass Sie Ihre **Backend**-API auf einer Do"
},
{
"path": "docs/de/docs/tutorial/security/get-current-user.md",
"chars": 4842,
"preview": "# Aktuellen Benutzer abrufen { #get-current-user }\n\nIm vorherigen Kapitel hat das Sicherheitssystem (das auf dem Depende"
},
{
"path": "docs/de/docs/tutorial/security/index.md",
"chars": 5230,
"preview": "# Sicherheit { #security }\n\nEs gibt viele Wege, Sicherheit, Authentifizierung und Autorisierung zu handhaben.\n\nUnd norma"
},
{
"path": "docs/de/docs/tutorial/security/oauth2-jwt.md",
"chars": 13031,
"preview": "# OAuth2 mit Passwort (und Hashing), Bearer mit JWT-Tokens { #oauth2-with-password-and-hashing-bearer-with-jwt-tokens }\n"
},
{
"path": "docs/de/docs/tutorial/security/simple-oauth2.md",
"chars": 11212,
"preview": "# Einfaches OAuth2 mit Password und Bearer { #simple-oauth2-with-password-and-bearer }\n\nLassen Sie uns nun auf dem vorhe"
},
{
"path": "docs/de/docs/tutorial/server-sent-events.md",
"chars": 5177,
"preview": "# Server-Sent Events (SSE) { #server-sent-events-sse }\n\nSie können Daten mithilfe von **Server-Sent Events** (SSE) an de"
},
{
"path": "docs/de/docs/tutorial/sql-databases.md",
"chars": 17907,
"preview": "# SQL (Relationale) Datenbanken { #sql-relational-databases }\n\n**FastAPI** erfordert nicht, dass Sie eine SQL (relationa"
},
{
"path": "docs/de/docs/tutorial/static-files.md",
"chars": 1935,
"preview": "# Statische Dateien { #static-files }\n\nMit `StaticFiles` können Sie statische Dateien aus einem Verzeichnis automatisch "
},
{
"path": "docs/de/docs/tutorial/stream-json-lines.md",
"chars": 4957,
"preview": "# JSON Lines streamen { #stream-json-lines }\n\nSie könnten eine Folge von Daten haben, die Sie in einem „Stream“ senden m"
},
{
"path": "docs/de/docs/tutorial/testing.md",
"chars": 6629,
"preview": "# Testen { #testing }\n\nDank [Starlette](https://www.starlette.dev/testclient/) ist das Testen von **FastAPI**-Anwendunge"
},
{
"path": "docs/de/docs/virtual-environments.md",
"chars": 25145,
"preview": "# Virtuelle Umgebungen { #virtual-environments }\n\nWenn Sie an Python-Projekten arbeiten, sollten Sie wahrscheinlich eine"
},
{
"path": "docs/de/llm-prompt.md",
"chars": 9926,
"preview": "### Target language\n\nTranslate to German (Deutsch).\n\nLanguage code: de.\n\n### Grammar to use when talking to the reader\n\n"
},
{
"path": "docs/de/mkdocs.yml",
"chars": 26,
"preview": "INHERIT: ../en/mkdocs.yml\n"
},
{
"path": "docs/en/data/contributors.yml",
"chars": 21250,
"preview": "tiangolo:\n login: tiangolo\n count: 942\n avatarUrl: https://avatars.githubusercontent.com/u/1326112?u=cb5d06e73a9e1998"
},
{
"path": "docs/en/data/github_sponsors.yml",
"chars": 20195,
"preview": "sponsors:\n- - login: renderinc\n avatarUrl: https://avatars.githubusercontent.com/u/36424661?v=4\n url: https://gith"
},
{
"path": "docs/en/data/members.yml",
"chars": 819,
"preview": "members:\n- login: tiangolo\n avatar_url: https://avatars.githubusercontent.com/u/1326112\n url: https://github.com/tiang"
},
{
"path": "docs/en/data/people.yml",
"chars": 30876,
"preview": "maintainers:\n- login: tiangolo\n answers: 1927\n avatarUrl: https://avatars.githubusercontent.com/u/1326112?u=cb5d06e73a"
},
{
"path": "docs/en/data/skip_users.yml",
"chars": 67,
"preview": "- tiangolo\n- codecov\n- github-actions\n- pre-commit-ci\n- dependabot\n"
},
{
"path": "docs/en/data/sponsors.yml",
"chars": 4375,
"preview": "keystone:\n - url: https://fastapicloud.com\n title: FastAPI Cloud. By the same team behind FastAPI. You code. We Clou"
},
{
"path": "docs/en/data/sponsors_badge.yml",
"chars": 739,
"preview": "logins:\n - jina-ai\n - deta\n - investsuite\n - mikeckennedy\n - deepset-ai\n - cryptapi\n - xoflare\n - DropbaseHQ\n -"
},
{
"path": "docs/en/data/topic_repos.yml",
"chars": 16368,
"preview": "- name: full-stack-fastapi-template\n html_url: https://github.com/fastapi/full-stack-fastapi-template\n stars: 42944\n "
},
{
"path": "docs/en/data/translation_reviewers.yml",
"chars": 67628,
"preview": "s111d:\n login: s111d\n count: 147\n avatarUrl: https://avatars.githubusercontent.com/u/4954856?v=4\n url: https://githu"
},
{
"path": "docs/en/data/translators.yml",
"chars": 20090,
"preview": "nilslindemann:\n login: nilslindemann\n count: 130\n avatarUrl: https://avatars.githubusercontent.com/u/6892179?u=1dca6a"
},
{
"path": "docs/en/docs/_llm-test.md",
"chars": 11284,
"preview": "# LLM test file { #llm-test-file }\n\nThis document tests if the <abbr title=\"Large Language Model\">LLM</abbr>, which tran"
},
{
"path": "docs/en/docs/about/index.md",
"chars": 71,
"preview": "# About { #about }\n\nAbout FastAPI, its design, inspiration and more. 🤓\n"
},
{
"path": "docs/en/docs/advanced/additional-responses.md",
"chars": 9055,
"preview": "# Additional Responses in OpenAPI { #additional-responses-in-openapi }\n\n/// warning\n\nThis is a rather advanced topic.\n\nI"
},
{
"path": "docs/en/docs/advanced/additional-status-codes.md",
"chars": 2003,
"preview": "# Additional Status Codes { #additional-status-codes }\n\nBy default, **FastAPI** will return the responses using a `JSONR"
},
{
"path": "docs/en/docs/advanced/advanced-dependencies.md",
"chars": 9254,
"preview": "# Advanced Dependencies { #advanced-dependencies }\n\n## Parameterized dependencies { #parameterized-dependencies }\n\nAll t"
},
{
"path": "docs/en/docs/advanced/advanced-python-types.md",
"chars": 2075,
"preview": "# Advanced Python Types { #advanced-python-types }\n\nHere are some additional ideas that might be useful when working wit"
},
{
"path": "docs/en/docs/advanced/async-tests.md",
"chars": 3830,
"preview": "# Async Tests { #async-tests }\n\nYou have already seen how to test your **FastAPI** applications using the provided `Test"
},
{
"path": "docs/en/docs/advanced/behind-a-proxy.md",
"chars": 16163,
"preview": "# Behind a Proxy { #behind-a-proxy }\n\nIn many situations, you would use a **proxy** like Traefik or Nginx in front of yo"
},
{
"path": "docs/en/docs/advanced/custom-response.md",
"chars": 11288,
"preview": "# Custom Response - HTML, Stream, File, others { #custom-response-html-stream-file-others }\n\nBy default, **FastAPI** wil"
},
{
"path": "docs/en/docs/advanced/dataclasses.md",
"chars": 4075,
"preview": "# Using Dataclasses { #using-dataclasses }\n\nFastAPI is built on top of **Pydantic**, and I have been showing you how to "
},
{
"path": "docs/en/docs/advanced/events.md",
"chars": 7975,
"preview": "# Lifespan Events { #lifespan-events }\n\nYou can define logic (code) that should be executed before the application **sta"
},
{
"path": "docs/en/docs/advanced/generate-clients.md",
"chars": 9801,
"preview": "# Generating SDKs { #generating-sdks }\n\nBecause **FastAPI** is based on the **OpenAPI** specification, its APIs can be d"
},
{
"path": "docs/en/docs/advanced/index.md",
"chars": 757,
"preview": "# Advanced User Guide { #advanced-user-guide }\n\n## Additional Features { #additional-features }\n\nThe main [Tutorial - Us"
},
{
"path": "docs/en/docs/advanced/json-base64-bytes.md",
"chars": 2489,
"preview": "# JSON with Bytes as Base64 { #json-with-bytes-as-base64 }\n\nIf your app needs to receive and send JSON data, but you nee"
},
{
"path": "docs/en/docs/advanced/middleware.md",
"chars": 4206,
"preview": "# Advanced Middleware { #advanced-middleware }\n\nIn the main tutorial you read how to add [Custom Middleware](../tutorial"
},
{
"path": "docs/en/docs/advanced/openapi-callbacks.md",
"chars": 7862,
"preview": "# OpenAPI Callbacks { #openapi-callbacks }\n\nYou could create an API with a *path operation* that could trigger a request"
},
{
"path": "docs/en/docs/advanced/openapi-webhooks.md",
"chars": 2948,
"preview": "# OpenAPI Webhooks { #openapi-webhooks }\n\nThere are cases where you want to tell your API **users** that your app could "
},
{
"path": "docs/en/docs/advanced/path-operation-advanced-configuration.md",
"chars": 7234,
"preview": "# Path Operation Advanced Configuration { #path-operation-advanced-configuration }\n\n## OpenAPI operationId { #openapi-op"
},
{
"path": "docs/en/docs/advanced/response-change-status-code.md",
"chars": 1556,
"preview": "# Response - Change Status Code { #response-change-status-code }\n\nYou probably read before that you can set a default [R"
},
{
"path": "docs/en/docs/advanced/response-cookies.md",
"chars": 2230,
"preview": "# Response Cookies { #response-cookies }\n\n## Use a `Response` parameter { #use-a-response-parameter }\n\nYou can declare a"
},
{
"path": "docs/en/docs/advanced/response-directly.md",
"chars": 4137,
"preview": "# Return a Response Directly { #return-a-response-directly }\n\nWhen you create a **FastAPI** *path operation* you can nor"
},
{
"path": "docs/en/docs/advanced/response-headers.md",
"chars": 2202,
"preview": "# Response Headers { #response-headers }\n\n## Use a `Response` parameter { #use-a-response-parameter }\n\nYou can declare a"
},
{
"path": "docs/en/docs/advanced/security/http-basic-auth.md",
"chars": 5116,
"preview": "# HTTP Basic Auth { #http-basic-auth }\n\nFor the simplest cases, you can use HTTP Basic Auth.\n\nIn HTTP Basic Auth, the ap"
},
{
"path": "docs/en/docs/advanced/security/index.md",
"chars": 648,
"preview": "# Advanced Security { #advanced-security }\n\n## Additional Features { #additional-features }\n\nThere are some extra featur"
},
{
"path": "docs/en/docs/advanced/security/oauth2-scopes.md",
"chars": 13771,
"preview": "# OAuth2 scopes { #oauth2-scopes }\n\nYou can use OAuth2 scopes directly with **FastAPI**, they are integrated to work sea"
},
{
"path": "docs/en/docs/advanced/settings.md",
"chars": 11128,
"preview": "# Settings and Environment Variables { #settings-and-environment-variables }\n\nIn many cases your application could need "
},
{
"path": "docs/en/docs/advanced/stream-data.md",
"chars": 5489,
"preview": "# Stream Data { #stream-data }\n\nIf you want to stream data that can be structured as JSON, you should [Stream JSON Lines"
},
{
"path": "docs/en/docs/advanced/strict-content-type.md",
"chars": 3289,
"preview": "# Strict Content-Type Checking { #strict-content-type-checking }\n\nBy default, **FastAPI** uses strict `Content-Type` hea"
},
{
"path": "docs/en/docs/advanced/sub-applications.md",
"chars": 2949,
"preview": "# Sub Applications - Mounts { #sub-applications-mounts }\n\nIf you need to have two independent FastAPI applications, with"
},
{
"path": "docs/en/docs/advanced/templates.md",
"chars": 3503,
"preview": "# Templates { #templates }\n\nYou can use any template engine you want with **FastAPI**.\n\nA common choice is Jinja2, the s"
},
{
"path": "docs/en/docs/advanced/testing-dependencies.md",
"chars": 2413,
"preview": "# Testing Dependencies with Overrides { #testing-dependencies-with-overrides }\n\n## Overriding dependencies during testin"
}
]
// ... and 2546 more files (download for full content)
About this extraction
This page contains the full source code of the tiangolo/fastapi GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 2746 files (12.7 MB), approximately 3.1M tokens, and a symbol index with 4861 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.