site_name: FastAPI site_description: FastAPI framework, high performance, easy to learn, fast to code, ready for production site_url: https://fastapi.tiangolo.com/ theme: name: 'material' palette: primary: 'teal' accent: 'amber' logo: 'img/icon-white.svg' favicon: 'img/favicon.png' repo_name: tiangolo/fastapi repo_url: https://github.com/tiangolo/fastapi edit_uri: '' google_analytics: - 'UA-133183413-1' - 'auto' nav: - FastAPI: 'index.md' - Features: 'features.md' - Python types intro: 'python-types.md' - Tutorial - User Guide: - Tutorial - User Guide - Intro: 'tutorial/index.md' - First Steps: 'tutorial/first-steps.md' - Path Parameters: 'tutorial/path-params.md' - Query Parameters: 'tutorial/query-params.md' - Request Body: 'tutorial/body.md' - Query Parameters and String Validations: 'tutorial/query-params-str-validations.md' - Path Parameters and Numeric Validations: 'tutorial/path-params-numeric-validations.md' - Body - Multiple Parameters: 'tutorial/body-multiple-params.md' - Body - Fields: 'tutorial/body-fields.md' - Body - Nested Models: 'tutorial/body-nested-models.md' - Extra data types: 'tutorial/extra-data-types.md' - Cookie Parameters: 'tutorial/cookie-params.md' - Header Parameters: 'tutorial/header-params.md' - Response Model: 'tutorial/response-model.md' - Extra Models: 'tutorial/extra-models.md' - Response Status Code: 'tutorial/response-status-code.md' - Form Data: 'tutorial/request-forms.md' - Request Files: 'tutorial/request-files.md' - Request Forms and Files: 'tutorial/request-forms-and-files.md' - Handling Errors: 'tutorial/handling-errors.md' - Path Operation Configuration: 'tutorial/path-operation-configuration.md' - JSON Compatible Encoder: 'tutorial/encoder.md' - Body - updates: 'tutorial/body-updates.md' - Dependencies: - First Steps: 'tutorial/dependencies/index.md' - Classes as Dependencies: 'tutorial/dependencies/classes-as-dependencies.md' - Sub-dependencies: 'tutorial/dependencies/sub-dependencies.md' - Dependencies in path operation decorators: 'tutorial/dependencies/dependencies-in-path-operation-decorators.md' - Dependencies with yield: 'tutorial/dependencies/dependencies-with-yield.md' - Security: - Security Intro: 'tutorial/security/index.md' - First Steps: 'tutorial/security/first-steps.md' - Get Current User: 'tutorial/security/get-current-user.md' - Simple OAuth2 with Password and Bearer: 'tutorial/security/simple-oauth2.md' - OAuth2 with Password (and hashing), Bearer with JWT tokens: 'tutorial/security/oauth2-jwt.md' - Middleware: 'tutorial/middleware.md' - CORS (Cross-Origin Resource Sharing): 'tutorial/cors.md' - SQL (Relational) Databases: 'tutorial/sql-databases.md' - Bigger Applications - Multiple Files: 'tutorial/bigger-applications.md' - Background Tasks: 'tutorial/background-tasks.md' - Application Configuration: 'tutorial/application-configuration.md' - Static Files: 'tutorial/static-files.md' - Testing: 'tutorial/testing.md' - Debugging: 'tutorial/debugging.md' - Advanced User Guide: - Advanced User Guide - Intro: 'advanced/index.md' - Path Operation Advanced Configuration: 'advanced/path-operation-advanced-configuration.md' - Additional Status Codes: 'advanced/additional-status-codes.md' - Return a Response Directly: 'advanced/response-directly.md' - Custom Response - HTML, Stream, File, others: 'advanced/custom-response.md' - Additional Responses in OpenAPI: 'advanced/additional-responses.md' - Response Cookies: 'advanced/response-cookies.md' - Response Headers: 'advanced/response-headers.md' - Response - Change Status Code: 'advanced/response-change-status-code.md' - Advanced Dependencies: 'advanced/advanced-dependencies.md' - Advanced Security: - Advanced Security - Intro: 'advanced/security/index.md' - OAuth2 scopes: 'advanced/security/oauth2-scopes.md' - HTTP Basic Auth: 'advanced/security/http-basic-auth.md' - Using the Request Directly: 'advanced/using-request-directly.md' - Advanced Middleware: 'advanced/middleware.md' - SQL (Relational) Databases with Peewee: 'advanced/sql-databases-peewee.md' - Async SQL (Relational) Databases: 'advanced/async-sql-databases.md' - NoSQL (Distributed / Big Data) Databases: 'advanced/nosql-databases.md' - Sub Applications - Behind a Proxy, Mounts: 'advanced/sub-applications-proxy.md' - Templates: 'advanced/templates.md' - GraphQL: 'advanced/graphql.md' - WebSockets: 'advanced/websockets.md' - 'Events: startup - shutdown': 'advanced/events.md' - Custom Request and APIRoute class: 'advanced/custom-request-and-route.md' - Testing WebSockets: 'advanced/testing-websockets.md' - 'Testing Events: startup - shutdown': 'advanced/testing-events.md' - Testing Dependencies with Overrides: 'advanced/testing-dependencies.md' - Extending OpenAPI: 'advanced/extending-openapi.md' - OpenAPI Callbacks: 'advanced/openapi-callbacks.md' - Including WSGI - Flask, Django, others: 'advanced/wsgi.md' - Concurrency and async / await: 'async.md' - Deployment: 'deployment.md' - Project Generation - Template: 'project-generation.md' - Alternatives, Inspiration and Comparisons: 'alternatives.md' - History, Design and Future: 'history-design-future.md' - External Links and Articles: 'external-links.md' - Benchmarks: 'benchmarks.md' - Help FastAPI - Get Help: 'help-fastapi.md' - Development - Contributing: 'contributing.md' - Release Notes: 'release-notes.md' markdown_extensions: - toc: permalink: true - markdown.extensions.codehilite: guess_lang: false - markdown_include.include: base_path: docs - admonition - codehilite - extra - pymdownx.superfences: custom_fences: - name: mermaid class: mermaid format: !!python/name:pymdownx.superfences.fence_div_format extra: social: - type: 'github' link: 'https://github.com/tiangolo/typer' - type: 'twitter' link: 'https://twitter.com/tiangolo' - type: 'linkedin' link: 'https://www.linkedin.com/in/tiangolo' - type: 'rss' link: 'https://dev.to/tiangolo' - type: 'medium' link: 'https://medium.com/@tiangolo' - type: 'globe' link: 'https://tiangolo.com' extra_css: - 'css/custom.css' extra_javascript: - 'https://unpkg.com/mermaid@8.4.6/dist/mermaid.min.js' - 'js/custom.js'