]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
⬆️ Drop support for Python 3.7, require Python 3.8 or above (#10442)
authorSebastián Ramírez <tiangolo@gmail.com>
Tue, 17 Oct 2023 05:59:11 +0000 (09:59 +0400)
committerGitHub <noreply@github.com>
Tue, 17 Oct 2023 05:59:11 +0000 (09:59 +0400)
* 📝 Update docs, require Python 3.8+, drop 3.7

* 🔧 Update pyproject.toml, drop support for Python 3.7, require Python 3.8+

* 👷 Update CI GitHub Actions, drop support for Python 3.7, require 3.8+

* 📝 Update docs' references to Python 3.6 and 3.7, use Python 3.8

120 files changed:
.github/workflows/publish.yml
.github/workflows/test.yml
README.md
docs/de/docs/features.md
docs/en/docs/advanced/additional-status-codes.md
docs/en/docs/advanced/advanced-dependencies.md
docs/en/docs/advanced/generate-clients.md
docs/en/docs/advanced/security/http-basic-auth.md
docs/en/docs/advanced/security/oauth2-scopes.md
docs/en/docs/advanced/settings.md
docs/en/docs/advanced/testing-dependencies.md
docs/en/docs/advanced/websockets.md
docs/en/docs/how-to/separate-openapi-schemas.md
docs/en/docs/index.md
docs/en/docs/python-types.md
docs/en/docs/tutorial/background-tasks.md
docs/en/docs/tutorial/bigger-applications.md
docs/en/docs/tutorial/body-fields.md
docs/en/docs/tutorial/body-multiple-params.md
docs/en/docs/tutorial/body-nested-models.md
docs/en/docs/tutorial/body-updates.md
docs/en/docs/tutorial/body.md
docs/en/docs/tutorial/cookie-params.md
docs/en/docs/tutorial/dependencies/classes-as-dependencies.md
docs/en/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md
docs/en/docs/tutorial/dependencies/dependencies-with-yield.md
docs/en/docs/tutorial/dependencies/global-dependencies.md
docs/en/docs/tutorial/dependencies/index.md
docs/en/docs/tutorial/dependencies/sub-dependencies.md
docs/en/docs/tutorial/encoder.md
docs/en/docs/tutorial/extra-data-types.md
docs/en/docs/tutorial/extra-models.md
docs/en/docs/tutorial/header-params.md
docs/en/docs/tutorial/path-operation-configuration.md
docs/en/docs/tutorial/path-params-numeric-validations.md
docs/en/docs/tutorial/query-params-str-validations.md
docs/en/docs/tutorial/query-params.md
docs/en/docs/tutorial/request-files.md
docs/en/docs/tutorial/request-forms-and-files.md
docs/en/docs/tutorial/request-forms.md
docs/en/docs/tutorial/response-model.md
docs/en/docs/tutorial/schema-extra-example.md
docs/en/docs/tutorial/security/first-steps.md
docs/en/docs/tutorial/security/get-current-user.md
docs/en/docs/tutorial/security/oauth2-jwt.md
docs/en/docs/tutorial/security/simple-oauth2.md
docs/en/docs/tutorial/sql-databases.md
docs/en/docs/tutorial/testing.md
docs/es/docs/features.md
docs/es/docs/index.md
docs/fr/docs/features.md
docs/fr/docs/index.md
docs/ja/docs/features.md
docs/ja/docs/index.md
docs/ko/docs/index.md
docs/pl/docs/features.md
docs/pl/docs/index.md
docs/pt/docs/features.md
docs/pt/docs/index.md
docs/pt/docs/tutorial/body-multiple-params.md
docs/pt/docs/tutorial/encoder.md
docs/pt/docs/tutorial/extra-models.md
docs/pt/docs/tutorial/header-params.md
docs/pt/docs/tutorial/path-operation-configuration.md
docs/pt/docs/tutorial/path-params-numeric-validations.md
docs/pt/docs/tutorial/query-params.md
docs/ru/docs/features.md
docs/ru/docs/index.md
docs/ru/docs/tutorial/background-tasks.md
docs/ru/docs/tutorial/body-fields.md
docs/ru/docs/tutorial/body-multiple-params.md
docs/ru/docs/tutorial/body-nested-models.md
docs/ru/docs/tutorial/cookie-params.md
docs/ru/docs/tutorial/dependencies/global-dependencies.md
docs/ru/docs/tutorial/extra-data-types.md
docs/ru/docs/tutorial/extra-models.md
docs/ru/docs/tutorial/header-params.md
docs/ru/docs/tutorial/path-operation-configuration.md
docs/ru/docs/tutorial/path-params-numeric-validations.md
docs/ru/docs/tutorial/query-params-str-validations.md
docs/ru/docs/tutorial/query-params.md
docs/ru/docs/tutorial/request-forms.md
docs/ru/docs/tutorial/response-model.md
docs/ru/docs/tutorial/schema-extra-example.md
docs/ru/docs/tutorial/testing.md
docs/tr/docs/features.md
docs/tr/docs/index.md
docs/uk/docs/python-types.md
docs/uk/docs/tutorial/body.md
docs/uk/docs/tutorial/cookie-params.md
docs/uk/docs/tutorial/encoder.md
docs/uk/docs/tutorial/extra-data-types.md
docs/vi/docs/features.md
docs/vi/docs/index.md
docs/vi/docs/python-types.md
docs/yo/docs/index.md
docs/zh/docs/advanced/generate-clients.md
docs/zh/docs/advanced/settings.md
docs/zh/docs/advanced/websockets.md
docs/zh/docs/index.md
docs/zh/docs/tutorial/background-tasks.md
docs/zh/docs/tutorial/body-fields.md
docs/zh/docs/tutorial/body-multiple-params.md
docs/zh/docs/tutorial/body-nested-models.md
docs/zh/docs/tutorial/body.md
docs/zh/docs/tutorial/cookie-params.md
docs/zh/docs/tutorial/dependencies/classes-as-dependencies.md
docs/zh/docs/tutorial/encoder.md
docs/zh/docs/tutorial/extra-data-types.md
docs/zh/docs/tutorial/extra-models.md
docs/zh/docs/tutorial/header-params.md
docs/zh/docs/tutorial/path-params-numeric-validations.md
docs/zh/docs/tutorial/query-params-str-validations.md
docs/zh/docs/tutorial/request-files.md
docs/zh/docs/tutorial/response-model.md
docs/zh/docs/tutorial/schema-extra-example.md
docs/zh/docs/tutorial/security/first-steps.md
docs/zh/docs/tutorial/sql-databases.md
docs/zh/docs/tutorial/testing.md
pyproject.toml

index b84c5bf17ad9d4fb94b11ef8976009afd08d2032..5ab0603b99daa7718703c32bb3d22eabef5716b8 100644 (file)
@@ -17,7 +17,7 @@ jobs:
       - name: Set up Python
         uses: actions/setup-python@v4
         with:
-          python-version: "3.7"
+          python-version: "3.10"
           # Issue ref: https://github.com/actions/setup-python/issues/436
           # cache: "pip"
           cache-dependency-path: pyproject.toml
index 4ebc64a14dde56af3b31dd6ee4635d2ed9b5bee5..769b520219ed94e171253345a1dc53b1d9917852 100644 (file)
@@ -42,7 +42,7 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
+        python-version: ["3.8", "3.9", "3.10", "3.11"]
         pydantic-version: ["pydantic-v1", "pydantic-v2"]
       fail-fast: false
     steps:
index 3f125e60e33ccf9113d67a39b70c0c4bc662c1e8..aeb29b5874e55985a90b17c0f009051505fe5b2a 100644 (file)
--- a/README.md
+++ b/README.md
@@ -27,7 +27,7 @@
 
 ---
 
-FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.7+ based on standard Python type hints.
+FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.8+ based on standard Python type hints.
 
 The key features are:
 
@@ -120,7 +120,7 @@ If you are building a <abbr title="Command Line Interface">CLI</abbr> app to be
 
 ## Requirements
 
-Python 3.7+
+Python 3.8+
 
 FastAPI stands on the shoulders of giants:
 
@@ -336,7 +336,7 @@ 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 3.7+**.
+Just standard **Python 3.8+**.
 
 For example, for an `int`:
 
index f281afd1edc5b71741c262bc718de4588ea0b73d..64fa8092d39ec4c4f6f3350f588432c1a4d253e3 100644 (file)
@@ -25,7 +25,7 @@ Mit einer interaktiven API-Dokumentation und explorativen webbasierten Benutzers
 
 ### Nur modernes Python
 
-Alles basiert auf **Python 3.6 Typ**-Deklarationen (dank Pydantic). Es muss keine neue Syntax gelernt werden, nur standardisiertes modernes Python.
+Alles basiert auf **Python 3.8 Typ**-Deklarationen (dank Pydantic). Es muss keine neue Syntax gelernt werden, nur standardisiertes modernes Python.
 
 
 
index 416444d3bdaae4350dbd6508076dd7a243ee665b..0ce27534310c57f43f7b5024c60b3a3c1a6d890a 100644 (file)
@@ -26,7 +26,7 @@ To achieve that, import `JSONResponse`, and return your content there directly,
     {!> ../../../docs_src/additional_status_codes/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="4  26"
     {!> ../../../docs_src/additional_status_codes/tutorial001_an.py!}
@@ -41,7 +41,7 @@ To achieve that, import `JSONResponse`, and return your content there directly,
     {!> ../../../docs_src/additional_status_codes/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index 402c5d7553f9b78b1eade3b3e2a31c63cb53be22..0cffab56db9be49e3cefff0fcc2e617d15ca90c0 100644 (file)
@@ -24,13 +24,13 @@ To do that, we declare a method `__call__`:
     {!> ../../../docs_src/dependencies/tutorial011_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="11"
     {!> ../../../docs_src/dependencies/tutorial011_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -51,13 +51,13 @@ And now, we can use `__init__` to declare the parameters of the instance that we
     {!> ../../../docs_src/dependencies/tutorial011_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="8"
     {!> ../../../docs_src/dependencies/tutorial011_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -78,13 +78,13 @@ We could create an instance of this class with:
     {!> ../../../docs_src/dependencies/tutorial011_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="17"
     {!> ../../../docs_src/dependencies/tutorial011_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -113,13 +113,13 @@ checker(q="somequery")
     {!> ../../../docs_src/dependencies/tutorial011_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="21"
     {!> ../../../docs_src/dependencies/tutorial011_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index f439ed93ab54b5bbee4fda74b93bc4e0e8ec7852..07a8f039f6a085942b1721f46801353520c52bc8 100644 (file)
@@ -35,7 +35,7 @@ Let's start with a simple FastAPI application:
     {!> ../../../docs_src/generate_clients/tutorial001_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9-11  14-15  18  19  23"
     {!> ../../../docs_src/generate_clients/tutorial001.py!}
@@ -147,7 +147,7 @@ For example, you could have a section for **items** and another section for **us
     {!> ../../../docs_src/generate_clients/tutorial002_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="23  28  36"
     {!> ../../../docs_src/generate_clients/tutorial002.py!}
@@ -204,7 +204,7 @@ You can then pass that custom function to **FastAPI** as the `generate_unique_id
     {!> ../../../docs_src/generate_clients/tutorial003_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="8-9  12"
     {!> ../../../docs_src/generate_clients/tutorial003.py!}
index 8177a4b289209264f9fd4a01aede17f1da490033..6f9002f608022420b0b997196168de51c4a54eb2 100644 (file)
@@ -26,13 +26,13 @@ Then, when you type that username and password, the browser sends them in the he
     {!> ../../../docs_src/security/tutorial006_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="2  7  11"
     {!> ../../../docs_src/security/tutorial006_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -65,13 +65,13 @@ Then we can use `secrets.compare_digest()` to ensure that `credentials.username`
     {!> ../../../docs_src/security/tutorial007_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1  12-24"
     {!> ../../../docs_src/security/tutorial007_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -148,13 +148,13 @@ After detecting that the credentials are incorrect, return an `HTTPException` wi
     {!> ../../../docs_src/security/tutorial007_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="26-30"
     {!> ../../../docs_src/security/tutorial007_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index 41cd61683dbb3717d9a3f5559ae4909c150e6189..304a46090e1d7008a148b96deccda9ff1bca91c8 100644 (file)
@@ -68,7 +68,7 @@ First, let's quickly see the parts that change from the examples in the main **T
     {!> ../../../docs_src/security/tutorial005_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="2  4  8  12  47  65  106  108-116  122-125  129-135  140  156"
     {!> ../../../docs_src/security/tutorial005_an.py!}
@@ -92,7 +92,7 @@ First, let's quickly see the parts that change from the examples in the main **T
     {!> ../../../docs_src/security/tutorial005_py39.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -121,7 +121,7 @@ The `scopes` parameter receives a `dict` with each scope as a key and the descri
     {!> ../../../docs_src/security/tutorial005_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="63-66"
     {!> ../../../docs_src/security/tutorial005_an.py!}
@@ -146,7 +146,7 @@ The `scopes` parameter receives a `dict` with each scope as a key and the descri
     {!> ../../../docs_src/security/tutorial005_py39.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -188,7 +188,7 @@ And we return the scopes as part of the JWT token.
     {!> ../../../docs_src/security/tutorial005_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="156"
     {!> ../../../docs_src/security/tutorial005_an.py!}
@@ -212,7 +212,7 @@ And we return the scopes as part of the JWT token.
     {!> ../../../docs_src/security/tutorial005_py39.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -254,7 +254,7 @@ In this case, it requires the scope `me` (it could require more than one scope).
     {!> ../../../docs_src/security/tutorial005_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="4  140  171"
     {!> ../../../docs_src/security/tutorial005_an.py!}
@@ -278,7 +278,7 @@ In this case, it requires the scope `me` (it could require more than one scope).
     {!> ../../../docs_src/security/tutorial005_py39.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -320,7 +320,7 @@ This `SecurityScopes` class is similar to `Request` (`Request` was used to get t
     {!> ../../../docs_src/security/tutorial005_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="8  106"
     {!> ../../../docs_src/security/tutorial005_an.py!}
@@ -344,7 +344,7 @@ This `SecurityScopes` class is similar to `Request` (`Request` was used to get t
     {!> ../../../docs_src/security/tutorial005_py39.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -377,7 +377,7 @@ In this exception, we include the scopes required (if any) as a string separated
     {!> ../../../docs_src/security/tutorial005_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="106  108-116"
     {!> ../../../docs_src/security/tutorial005_an.py!}
@@ -401,7 +401,7 @@ In this exception, we include the scopes required (if any) as a string separated
     {!> ../../../docs_src/security/tutorial005_py39.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -436,7 +436,7 @@ We also verify that we have a user with that username, and if not, we raise that
     {!> ../../../docs_src/security/tutorial005_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="47  117-128"
     {!> ../../../docs_src/security/tutorial005_an.py!}
@@ -460,7 +460,7 @@ We also verify that we have a user with that username, and if not, we raise that
     {!> ../../../docs_src/security/tutorial005_py39.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -487,7 +487,7 @@ For this, we use `security_scopes.scopes`, that contains a `list` with all these
     {!> ../../../docs_src/security/tutorial005_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="129-135"
     {!> ../../../docs_src/security/tutorial005_an.py!}
@@ -511,7 +511,7 @@ For this, we use `security_scopes.scopes`, that contains a `list` with all these
     {!> ../../../docs_src/security/tutorial005_py39.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index 8f6c7da93ae47eea13c27e9b673279193ff388cb..d39130777f92af8195f67680156b1db52858c1de 100644 (file)
@@ -260,13 +260,13 @@ Now we create a dependency that returns a new `config.Settings()`.
     {!> ../../../docs_src/settings/app02_an_py39/main.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="6  12-13"
     {!> ../../../docs_src/settings/app02_an/main.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -288,13 +288,13 @@ And then we can require it from the *path operation function* as a dependency an
     {!> ../../../docs_src/settings/app02_an_py39/main.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="17  19-21"
     {!> ../../../docs_src/settings/app02_an/main.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -396,13 +396,13 @@ But as we are using the `@lru_cache()` decorator on top, the `Settings` object w
     {!> ../../../docs_src/settings/app03_an_py39/main.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1  11"
     {!> ../../../docs_src/settings/app03_an/main.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index ee48a735d8b3de758b442260f7e37f5747c1fea9..57dd87f5696325f546711b996456561ec142d223 100644 (file)
@@ -40,7 +40,7 @@ And then **FastAPI** will call that override instead of the original dependency.
     {!> ../../../docs_src/dependency_testing/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="29-30  33"
     {!> ../../../docs_src/dependency_testing/tutorial001_an.py!}
@@ -55,7 +55,7 @@ And then **FastAPI** will call that override instead of the original dependency.
     {!> ../../../docs_src/dependency_testing/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index 94cf191d2705095e2bfe003d708d92b81b1c8d74..49b8fba899015e8c9e2ef8ced12fcc552a8e0391 100644 (file)
@@ -124,7 +124,7 @@ They work the same way as for other FastAPI endpoints/*path operations*:
     {!> ../../../docs_src/websockets/tutorial002_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="69-70  83"
     {!> ../../../docs_src/websockets/tutorial002_an.py!}
@@ -139,7 +139,7 @@ They work the same way as for other FastAPI endpoints/*path operations*:
     {!> ../../../docs_src/websockets/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -191,7 +191,7 @@ When a WebSocket connection is closed, the `await websocket.receive_text()` will
     {!> ../../../docs_src/websockets/tutorial003_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="81-83"
     {!> ../../../docs_src/websockets/tutorial003.py!}
index d38be3c592ccb2918f98f996ba6406244ccbc467..10be1071a93a07c72ba6a2daf56a436371531a9e 100644 (file)
@@ -44,7 +44,7 @@ Let's say you have a Pydantic model with default values, like this one:
 
     </details>
 
-=== "Python 3.7+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/separate_openapi_schemas/tutorial001.py[ln:1-9]!}
@@ -99,7 +99,7 @@ If you use this model as an input like here:
 
     </details>
 
-=== "Python 3.7+"
+=== "Python 3.8+"
 
     ```Python hl_lines="16"
     {!> ../../../docs_src/separate_openapi_schemas/tutorial001.py[ln:1-17]!}
@@ -142,7 +142,7 @@ But if you use the same model as an output, like here:
     {!> ../../../docs_src/separate_openapi_schemas/tutorial001_py39.py!}
     ```
 
-=== "Python 3.7+"
+=== "Python 3.8+"
 
     ```Python hl_lines="21"
     {!> ../../../docs_src/separate_openapi_schemas/tutorial001.py!}
@@ -214,7 +214,7 @@ In that case, you can disable this feature in **FastAPI**, with the parameter `s
     {!> ../../../docs_src/separate_openapi_schemas/tutorial002_py39.py!}
     ```
 
-=== "Python 3.7+"
+=== "Python 3.8+"
 
     ```Python hl_lines="12"
     {!> ../../../docs_src/separate_openapi_schemas/tutorial002.py!}
index ebd74bc8f00d2e4a9bd161236518f6d0a022ae72..cd3f3e00070f4b5c1ac383802f2202191dd067f8 100644 (file)
@@ -27,7 +27,7 @@
 
 ---
 
-FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.7+ based on standard Python type hints.
+FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.8+ based on standard Python type hints.
 
 The key features are:
 
@@ -115,7 +115,7 @@ If you are building a <abbr title="Command Line Interface">CLI</abbr> app to be
 
 ## Requirements
 
-Python 3.7+
+Python 3.8+
 
 FastAPI stands on the shoulders of giants:
 
@@ -331,7 +331,7 @@ 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 3.7+**.
+Just standard **Python 3.8+**.
 
 For example, for an `int`:
 
index 693613a36fa8d70d20ac5278e537b13e726a661a..cdd22ea4a2e3394fe24600d82b4150ec2695640f 100644 (file)
@@ -182,7 +182,7 @@ For example, let's define a variable to be a `list` of `str`.
     {!> ../../../docs_src/python_types/tutorial006_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     From `typing`, import `List` (with a capital `L`):
 
@@ -230,7 +230,7 @@ You would do the same to declare `tuple`s and `set`s:
     {!> ../../../docs_src/python_types/tutorial007_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1  4"
     {!> ../../../docs_src/python_types/tutorial007.py!}
@@ -255,7 +255,7 @@ The second type parameter is for the values of the `dict`:
     {!> ../../../docs_src/python_types/tutorial008_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1  4"
     {!> ../../../docs_src/python_types/tutorial008.py!}
@@ -281,7 +281,7 @@ In Python 3.10 there's also a **new syntax** where you can put the possible type
     {!> ../../../docs_src/python_types/tutorial008b_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1  4"
     {!> ../../../docs_src/python_types/tutorial008b.py!}
@@ -311,13 +311,13 @@ This also means that in Python 3.10, you can use `Something | None`:
     {!> ../../../docs_src/python_types/tutorial009_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1  4"
     {!> ../../../docs_src/python_types/tutorial009.py!}
     ```
 
-=== "Python 3.6+ alternative"
+=== "Python 3.8+ alternative"
 
     ```Python hl_lines="1  4"
     {!> ../../../docs_src/python_types/tutorial009b.py!}
@@ -375,10 +375,10 @@ These types that take type parameters in square brackets are called **Generic ty
     * `set`
     * `dict`
 
-    And the same as with Python 3.6, from the `typing` module:
+    And the same as with Python 3.8, from the `typing` module:
 
     * `Union`
-    * `Optional` (the same as with Python 3.6)
+    * `Optional` (the same as with Python 3.8)
     * ...and others.
 
     In Python 3.10, as an alternative to using the generics `Union` and `Optional`, you can use the <abbr title='also called "bitwise or operator", but that meaning is not relevant here'>vertical bar (`|`)</abbr> to declare unions of types, that's a lot better and simpler.
@@ -392,13 +392,13 @@ These types that take type parameters in square brackets are called **Generic ty
     * `set`
     * `dict`
 
-    And the same as with Python 3.6, from the `typing` module:
+    And the same as with Python 3.8, from the `typing` module:
 
     * `Union`
     * `Optional`
     * ...and others.
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     * `List`
     * `Tuple`
@@ -458,7 +458,7 @@ An example from the official Pydantic docs:
     {!> ../../../docs_src/python_types/tutorial011_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python
     {!> ../../../docs_src/python_types/tutorial011.py!}
@@ -486,7 +486,7 @@ Python also has a feature that allows putting **additional metadata** in these t
     {!> ../../../docs_src/python_types/tutorial013_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     In versions below Python 3.9, you import `Annotated` from `typing_extensions`.
 
index 1782971922ab2fae5c4724ecb269f7f71b196f41..bc8e2af6a08d9da3614c7ce3d2328d1706dcb3c4 100644 (file)
@@ -69,7 +69,7 @@ Using `BackgroundTasks` also works with the dependency injection system, you can
     {!> ../../../docs_src/background_tasks/tutorial002_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="14  16  23  26"
     {!> ../../../docs_src/background_tasks/tutorial002_an.py!}
@@ -84,7 +84,7 @@ Using `BackgroundTasks` also works with the dependency injection system, you can
     {!> ../../../docs_src/background_tasks/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index 26d26475f2f52b9e45427b10e3d69a17cee8beac..1cf7e50e02c508ede3ac4c2b9a995fd769a13a73 100644 (file)
@@ -118,13 +118,13 @@ We will now use a simple dependency to read a custom `X-Token` header:
     {!> ../../../docs_src/bigger_applications/app_an_py39/dependencies.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1  5-7"
     {!> ../../../docs_src/bigger_applications/app_an/dependencies.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index 8966032ff1473d7c7bfb0441b3b96c2514239725..55e67fdd638d7711f0421b058163198baa840aa0 100644 (file)
@@ -18,7 +18,7 @@ First, you have to import it:
     {!> ../../../docs_src/body_fields/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="4"
     {!> ../../../docs_src/body_fields/tutorial001_an.py!}
@@ -33,7 +33,7 @@ First, you have to import it:
     {!> ../../../docs_src/body_fields/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -61,7 +61,7 @@ You can then use `Field` with model attributes:
     {!> ../../../docs_src/body_fields/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="12-15"
     {!> ../../../docs_src/body_fields/tutorial001_an.py!}
@@ -76,7 +76,7 @@ You can then use `Field` with model attributes:
     {!> ../../../docs_src/body_fields/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index b214092c9b175b8bc9d52b9302c53ab4f1263998..ebef8eeaa93528f762797e86ec5c488433f7bfa8 100644 (file)
@@ -20,7 +20,7 @@ And you can also declare body parameters as optional, by setting the default to
     {!> ../../../docs_src/body_multiple_params/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="19-21"
     {!> ../../../docs_src/body_multiple_params/tutorial001_an.py!}
@@ -35,7 +35,7 @@ And you can also declare body parameters as optional, by setting the default to
     {!> ../../../docs_src/body_multiple_params/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -68,7 +68,7 @@ But you can also declare multiple body parameters, e.g. `item` and `user`:
     {!> ../../../docs_src/body_multiple_params/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="22"
     {!> ../../../docs_src/body_multiple_params/tutorial002.py!}
@@ -123,7 +123,7 @@ But you can instruct **FastAPI** to treat it as another body key using `Body`:
     {!> ../../../docs_src/body_multiple_params/tutorial003_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="24"
     {!> ../../../docs_src/body_multiple_params/tutorial003_an.py!}
@@ -138,7 +138,7 @@ But you can instruct **FastAPI** to treat it as another body key using `Body`:
     {!> ../../../docs_src/body_multiple_params/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -197,7 +197,7 @@ For example:
     {!> ../../../docs_src/body_multiple_params/tutorial004_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="28"
     {!> ../../../docs_src/body_multiple_params/tutorial004_an.py!}
@@ -212,7 +212,7 @@ For example:
     {!> ../../../docs_src/body_multiple_params/tutorial004_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -250,7 +250,7 @@ as in:
     {!> ../../../docs_src/body_multiple_params/tutorial005_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="18"
     {!> ../../../docs_src/body_multiple_params/tutorial005_an.py!}
@@ -265,7 +265,7 @@ as in:
     {!> ../../../docs_src/body_multiple_params/tutorial005_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index ffa0c0d0ef74fb7e8a39df75a2a7af88c8250f82..3a1052397910cf82edab230c50f50d3bb707dc5c 100644 (file)
@@ -12,7 +12,7 @@ You can define an attribute to be a subtype. For example, a Python `list`:
     {!> ../../../docs_src/body_nested_models/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="14"
     {!> ../../../docs_src/body_nested_models/tutorial001.py!}
@@ -73,7 +73,7 @@ So, in our example, we can make `tags` be specifically a "list of strings":
     {!> ../../../docs_src/body_nested_models/tutorial002_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="14"
     {!> ../../../docs_src/body_nested_models/tutorial002.py!}
@@ -99,7 +99,7 @@ Then we can declare `tags` as a set of strings:
     {!> ../../../docs_src/body_nested_models/tutorial003_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1  14"
     {!> ../../../docs_src/body_nested_models/tutorial003.py!}
@@ -137,7 +137,7 @@ For example, we can define an `Image` model:
     {!> ../../../docs_src/body_nested_models/tutorial004_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9-11"
     {!> ../../../docs_src/body_nested_models/tutorial004.py!}
@@ -159,7 +159,7 @@ And then we can use it as the type of an attribute:
     {!> ../../../docs_src/body_nested_models/tutorial004_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="20"
     {!> ../../../docs_src/body_nested_models/tutorial004.py!}
@@ -208,7 +208,7 @@ For example, as in the `Image` model we have a `url` field, we can declare it to
     {!> ../../../docs_src/body_nested_models/tutorial005_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="4  10"
     {!> ../../../docs_src/body_nested_models/tutorial005.py!}
@@ -232,7 +232,7 @@ You can also use Pydantic models as subtypes of `list`, `set`, etc:
     {!> ../../../docs_src/body_nested_models/tutorial006_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="20"
     {!> ../../../docs_src/body_nested_models/tutorial006.py!}
@@ -283,7 +283,7 @@ You can define arbitrarily deeply nested models:
     {!> ../../../docs_src/body_nested_models/tutorial007_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9  14  20  23  27"
     {!> ../../../docs_src/body_nested_models/tutorial007.py!}
@@ -314,7 +314,7 @@ as in:
     {!> ../../../docs_src/body_nested_models/tutorial008_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="15"
     {!> ../../../docs_src/body_nested_models/tutorial008.py!}
@@ -354,7 +354,7 @@ In this case, you would accept any `dict` as long as it has `int` keys with `flo
     {!> ../../../docs_src/body_nested_models/tutorial009_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/body_nested_models/tutorial009.py!}
index a32948db1a104bb6dffb86ce4a888291b6484ed9..3341f2d5d88b49637433f959e9c596535a496f00 100644 (file)
@@ -18,7 +18,7 @@ You can use the `jsonable_encoder` to convert the input data to data that can be
     {!> ../../../docs_src/body_updates/tutorial001_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="30-35"
     {!> ../../../docs_src/body_updates/tutorial001.py!}
@@ -79,7 +79,7 @@ Then you can use this to generate a `dict` with only the data that was set (sent
     {!> ../../../docs_src/body_updates/tutorial002_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="34"
     {!> ../../../docs_src/body_updates/tutorial002.py!}
@@ -103,7 +103,7 @@ Like `stored_item_model.copy(update=update_data)`:
     {!> ../../../docs_src/body_updates/tutorial002_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="35"
     {!> ../../../docs_src/body_updates/tutorial002.py!}
@@ -136,7 +136,7 @@ In summary, to apply partial updates you would:
     {!> ../../../docs_src/body_updates/tutorial002_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="30-37"
     {!> ../../../docs_src/body_updates/tutorial002.py!}
index 172b91fdfa61e30eb081ab20225b9cafdcf03a73..67ba48f1e679aec327b6881072b724a9f1ba0b64 100644 (file)
@@ -25,7 +25,7 @@ First, you need to import `BaseModel` from `pydantic`:
     {!> ../../../docs_src/body/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="4"
     {!> ../../../docs_src/body/tutorial001.py!}
@@ -43,7 +43,7 @@ Use standard Python types for all the attributes:
     {!> ../../../docs_src/body/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="7-11"
     {!> ../../../docs_src/body/tutorial001.py!}
@@ -81,7 +81,7 @@ To add it to your *path operation*, declare it the same way you declared path an
     {!> ../../../docs_src/body/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="18"
     {!> ../../../docs_src/body/tutorial001.py!}
@@ -155,7 +155,7 @@ Inside of the function, you can access all the attributes of the model object di
     {!> ../../../docs_src/body/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="21"
     {!> ../../../docs_src/body/tutorial002.py!}
@@ -173,7 +173,7 @@ You can declare path parameters and request body at the same time.
     {!> ../../../docs_src/body/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="17-18"
     {!> ../../../docs_src/body/tutorial003.py!}
@@ -191,7 +191,7 @@ You can also declare **body**, **path** and **query** parameters, all at the sam
     {!> ../../../docs_src/body/tutorial004_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="18"
     {!> ../../../docs_src/body/tutorial004.py!}
index 111e93458e686c670d229c371a5670b2714f336c..3436a7df397f8ca3dc926767fb8b63e40ac66743 100644 (file)
@@ -18,7 +18,7 @@ First import `Cookie`:
     {!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="3"
     {!> ../../../docs_src/cookie_params/tutorial001_an.py!}
@@ -33,7 +33,7 @@ First import `Cookie`:
     {!> ../../../docs_src/cookie_params/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -60,7 +60,7 @@ The first value is the default value, you can pass all the extra validation or a
     {!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10"
     {!> ../../../docs_src/cookie_params/tutorial001_an.py!}
@@ -75,7 +75,7 @@ The first value is the default value, you can pass all the extra validation or a
     {!> ../../../docs_src/cookie_params/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index 498d935fe70dd10c1f9e4d0578f5d778fc1cf1d6..842f2adf6ba272fd1e40f4b5b513c36b78b45ae1 100644 (file)
@@ -18,7 +18,7 @@ In the previous example, we were returning a `dict` from our dependency ("depend
     {!> ../../../docs_src/dependencies/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="12"
     {!> ../../../docs_src/dependencies/tutorial001_an.py!}
@@ -33,7 +33,7 @@ In the previous example, we were returning a `dict` from our dependency ("depend
     {!> ../../../docs_src/dependencies/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -115,7 +115,7 @@ Then, we can change the dependency "dependable" `common_parameters` from above t
     {!> ../../../docs_src/dependencies/tutorial002_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="12-16"
     {!> ../../../docs_src/dependencies/tutorial002_an.py!}
@@ -130,7 +130,7 @@ Then, we can change the dependency "dependable" `common_parameters` from above t
     {!> ../../../docs_src/dependencies/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -153,7 +153,7 @@ Pay attention to the `__init__` method used to create the instance of the class:
     {!> ../../../docs_src/dependencies/tutorial002_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="13"
     {!> ../../../docs_src/dependencies/tutorial002_an.py!}
@@ -168,7 +168,7 @@ Pay attention to the `__init__` method used to create the instance of the class:
     {!> ../../../docs_src/dependencies/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -191,7 +191,7 @@ Pay attention to the `__init__` method used to create the instance of the class:
     {!> ../../../docs_src/dependencies/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10"
     {!> ../../../docs_src/dependencies/tutorial001_an.py!}
@@ -206,7 +206,7 @@ Pay attention to the `__init__` method used to create the instance of the class:
     {!> ../../../docs_src/dependencies/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -241,7 +241,7 @@ Now you can declare your dependency using this class.
     {!> ../../../docs_src/dependencies/tutorial002_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="20"
     {!> ../../../docs_src/dependencies/tutorial002_an.py!}
@@ -256,7 +256,7 @@ Now you can declare your dependency using this class.
     {!> ../../../docs_src/dependencies/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -271,7 +271,7 @@ Now you can declare your dependency using this class.
 
 Notice how we write `CommonQueryParams` twice in the above code:
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -280,7 +280,7 @@ Notice how we write `CommonQueryParams` twice in the above code:
     commons: CommonQueryParams = Depends(CommonQueryParams)
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python
     commons: Annotated[CommonQueryParams, Depends(CommonQueryParams)]
@@ -300,13 +300,13 @@ From it is that FastAPI will extract the declared parameters and that is what Fa
 
 In this case, the first `CommonQueryParams`, in:
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python
     commons: Annotated[CommonQueryParams, ...
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -319,13 +319,13 @@ In this case, the first `CommonQueryParams`, in:
 
 You could actually write just:
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python
     commons: Annotated[Any, Depends(CommonQueryParams)]
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -348,7 +348,7 @@ You could actually write just:
     {!> ../../../docs_src/dependencies/tutorial003_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="20"
     {!> ../../../docs_src/dependencies/tutorial003_an.py!}
@@ -363,7 +363,7 @@ You could actually write just:
     {!> ../../../docs_src/dependencies/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -380,7 +380,7 @@ But declaring the type is encouraged as that way your editor will know what will
 
 But you see that we are having some code repetition here, writing `CommonQueryParams` twice:
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -389,7 +389,7 @@ But you see that we are having some code repetition here, writing `CommonQueryPa
     commons: CommonQueryParams = Depends(CommonQueryParams)
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python
     commons: Annotated[CommonQueryParams, Depends(CommonQueryParams)]
@@ -401,13 +401,13 @@ For those specific cases, you can do the following:
 
 Instead of writing:
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python
     commons: Annotated[CommonQueryParams, Depends(CommonQueryParams)]
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -418,13 +418,13 @@ Instead of writing:
 
 ...you write:
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python
     commons: Annotated[CommonQueryParams, Depends()]
     ```
 
-=== "Python 3.6 non-Annotated"
+=== "Python 3.8 non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -449,7 +449,7 @@ The same example would then look like:
     {!> ../../../docs_src/dependencies/tutorial004_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="20"
     {!> ../../../docs_src/dependencies/tutorial004_an.py!}
@@ -464,7 +464,7 @@ The same example would then look like:
     {!> ../../../docs_src/dependencies/tutorial004_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index ccef5aef4b27fdcef1c6e42e458c60295ef96ed7..eaab51d1b1f389c979378a5d6b9b5021cfcbef14 100644 (file)
@@ -20,13 +20,13 @@ It should be a `list` of `Depends()`:
     {!> ../../../docs_src/dependencies/tutorial006_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="18"
     {!> ../../../docs_src/dependencies/tutorial006_an.py!}
     ```
 
-=== "Python 3.6 non-Annotated"
+=== "Python 3.8 non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -63,13 +63,13 @@ They can declare request requirements (like headers) or other sub-dependencies:
     {!> ../../../docs_src/dependencies/tutorial006_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="7  12"
     {!> ../../../docs_src/dependencies/tutorial006_an.py!}
     ```
 
-=== "Python 3.6 non-Annotated"
+=== "Python 3.8 non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -88,13 +88,13 @@ These dependencies can `raise` exceptions, the same as normal dependencies:
     {!> ../../../docs_src/dependencies/tutorial006_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9  14"
     {!> ../../../docs_src/dependencies/tutorial006_an.py!}
     ```
 
-=== "Python 3.6 non-Annotated"
+=== "Python 3.8 non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -115,13 +115,13 @@ So, you can re-use a normal dependency (that returns a value) you already use so
     {!> ../../../docs_src/dependencies/tutorial006_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10  15"
     {!> ../../../docs_src/dependencies/tutorial006_an.py!}
     ```
 
-=== "Python 3.6 non-Annotated"
+=== "Python 3.8 non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index 8a5422ac862e4139cad0c41d624e045b6b293788..fe18f1f1d9afe92bae75f2cc6e93d5d12983dcac 100644 (file)
@@ -72,13 +72,13 @@ For example, `dependency_c` can have a dependency on `dependency_b`, and `depend
     {!> ../../../docs_src/dependencies/tutorial008_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="5  13  21"
     {!> ../../../docs_src/dependencies/tutorial008_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -99,13 +99,13 @@ And, in turn, `dependency_b` needs the value from `dependency_a` (here named `de
     {!> ../../../docs_src/dependencies/tutorial008_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="17-18  25-26"
     {!> ../../../docs_src/dependencies/tutorial008_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index 0989b31d46205f5c89c001713b9923f00283ed2d..0dcf73176ffb695e51ce0e0a6b45767920bfe6a2 100644 (file)
@@ -12,13 +12,13 @@ In that case, they will be applied to all the *path operations* in the applicati
     {!> ../../../docs_src/dependencies/tutorial012_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="16"
     {!> ../../../docs_src/dependencies/tutorial012_an.py!}
     ```
 
-=== "Python 3.6 non-Annotated"
+=== "Python 3.8 non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index f6f4bced08a76dfb7584eab33896e48070b9cb07..bc98cb26edc5423ec65b8ca75e78cae35bc1108c 100644 (file)
@@ -43,7 +43,7 @@ It is just a function that can take all the same parameters that a *path operati
     {!> ../../../docs_src/dependencies/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9-12"
     {!> ../../../docs_src/dependencies/tutorial001_an.py!}
@@ -58,7 +58,7 @@ It is just a function that can take all the same parameters that a *path operati
     {!> ../../../docs_src/dependencies/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -106,7 +106,7 @@ And then it just returns a `dict` containing those values.
     {!> ../../../docs_src/dependencies/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="3"
     {!> ../../../docs_src/dependencies/tutorial001_an.py!}
@@ -121,7 +121,7 @@ And then it just returns a `dict` containing those values.
     {!> ../../../docs_src/dependencies/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -146,7 +146,7 @@ The same way you use `Body`, `Query`, etc. with your *path operation function* p
     {!> ../../../docs_src/dependencies/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="16  21"
     {!> ../../../docs_src/dependencies/tutorial001_an.py!}
@@ -161,7 +161,7 @@ The same way you use `Body`, `Query`, etc. with your *path operation function* p
     {!> ../../../docs_src/dependencies/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -231,7 +231,7 @@ But because we are using `Annotated`, we can store that `Annotated` value in a v
     {!> ../../../docs_src/dependencies/tutorial001_02_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="15  19  24"
     {!> ../../../docs_src/dependencies/tutorial001_02_an.py!}
index b50de1a46cce35679b8751a4c19e6bd9c3592453..1cb469a805120296954ec16f7c80432cfe913def 100644 (file)
@@ -22,7 +22,7 @@ You could create a first dependency ("dependable") like:
     {!> ../../../docs_src/dependencies/tutorial005_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9-10"
     {!> ../../../docs_src/dependencies/tutorial005_an.py!}
@@ -37,7 +37,7 @@ You could create a first dependency ("dependable") like:
     {!> ../../../docs_src/dependencies/tutorial005_py310.py!}
     ```
 
-=== "Python 3.6 non-Annotated"
+=== "Python 3.8 non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -66,7 +66,7 @@ Then you can create another dependency function (a "dependable") that at the sam
     {!> ../../../docs_src/dependencies/tutorial005_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="14"
     {!> ../../../docs_src/dependencies/tutorial005_an.py!}
@@ -81,7 +81,7 @@ Then you can create another dependency function (a "dependable") that at the sam
     {!> ../../../docs_src/dependencies/tutorial005_py310.py!}
     ```
 
-=== "Python 3.6 non-Annotated"
+=== "Python 3.8 non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -113,7 +113,7 @@ Then we can use the dependency with:
     {!> ../../../docs_src/dependencies/tutorial005_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="24"
     {!> ../../../docs_src/dependencies/tutorial005_an.py!}
@@ -128,7 +128,7 @@ Then we can use the dependency with:
     {!> ../../../docs_src/dependencies/tutorial005_py310.py!}
     ```
 
-=== "Python 3.6 non-Annotated"
+=== "Python 3.8 non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -161,14 +161,14 @@ And it will save the returned value in a <abbr title="A utility/system to store
 
 In an advanced scenario where you know you need the dependency to be called at every step (possibly multiple times) in the same request instead of using the "cached" value, you can set the parameter `use_cache=False` when using `Depends`:
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1"
     async def needy_dependency(fresh_value: Annotated[str, Depends(get_value, use_cache=False)]):
         return {"fresh_value": fresh_value}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index 735aa2209ffedf0148b3b0d7b26e75ad2efc1df7..845cc25fc29b5c8956b7454afd9e1039860a767c 100644 (file)
@@ -26,7 +26,7 @@ It receives an object, like a Pydantic model, and returns a JSON compatible vers
     {!> ../../../docs_src/encoder/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="5  22"
     {!> ../../../docs_src/encoder/tutorial001.py!}
index b34ccd26f4c1c999fedd220c81c731bd193ffa58..fd7a99af32ab4774d2e8bcb158507579c706ef0a 100644 (file)
@@ -67,7 +67,7 @@ Here's an example *path operation* with parameters using some of the above types
     {!> ../../../docs_src/extra_data_types/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1  3  13-17"
     {!> ../../../docs_src/extra_data_types/tutorial001_an.py!}
@@ -82,7 +82,7 @@ Here's an example *path operation* with parameters using some of the above types
     {!> ../../../docs_src/extra_data_types/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -105,7 +105,7 @@ Note that the parameters inside the function have their natural data type, and y
     {!> ../../../docs_src/extra_data_types/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="19-20"
     {!> ../../../docs_src/extra_data_types/tutorial001_an.py!}
@@ -120,7 +120,7 @@ Note that the parameters inside the function have their natural data type, and y
     {!> ../../../docs_src/extra_data_types/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index e91e879e41672a1340057f09fb880916bc358bc5..590d095bd24578ae8d7373dce152577777434731 100644 (file)
@@ -23,7 +23,7 @@ Here's a general idea of how the models could look like with their password fiel
     {!> ../../../docs_src/extra_models/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9  11  16  22  24  29-30  33-35  40-41"
     {!> ../../../docs_src/extra_models/tutorial001.py!}
@@ -164,7 +164,7 @@ That way, we can declare just the differences between the models (with plaintext
     {!> ../../../docs_src/extra_models/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9  15-16  19-20  23-24"
     {!> ../../../docs_src/extra_models/tutorial002.py!}
@@ -187,7 +187,7 @@ To do that, use the standard Python type hint <a href="https://docs.python.org/3
     {!> ../../../docs_src/extra_models/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1  14-15  18-20  33"
     {!> ../../../docs_src/extra_models/tutorial003.py!}
@@ -219,7 +219,7 @@ For that, use the standard Python `typing.List` (or just `list` in Python 3.9 an
     {!> ../../../docs_src/extra_models/tutorial004_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1  20"
     {!> ../../../docs_src/extra_models/tutorial004.py!}
@@ -239,7 +239,7 @@ In this case, you can use `typing.Dict` (or just `dict` in Python 3.9 and above)
     {!> ../../../docs_src/extra_models/tutorial005_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1  8"
     {!> ../../../docs_src/extra_models/tutorial005.py!}
index 9e928cdc6b482626b38ac2ca1bcfc31f24a39b33..bbba90998776e9dcba5db49fd79f039f19dbaf6c 100644 (file)
@@ -18,7 +18,7 @@ First import `Header`:
     {!> ../../../docs_src/header_params/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="3"
     {!> ../../../docs_src/header_params/tutorial001_an.py!}
@@ -33,7 +33,7 @@ First import `Header`:
     {!> ../../../docs_src/header_params/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -60,7 +60,7 @@ The first value is the default value, you can pass all the extra validation or a
     {!> ../../../docs_src/header_params/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10"
     {!> ../../../docs_src/header_params/tutorial001_an.py!}
@@ -75,7 +75,7 @@ The first value is the default value, you can pass all the extra validation or a
     {!> ../../../docs_src/header_params/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -120,7 +120,7 @@ If for some reason you need to disable automatic conversion of underscores to hy
     {!> ../../../docs_src/header_params/tutorial002_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="12"
     {!> ../../../docs_src/header_params/tutorial002_an.py!}
@@ -135,7 +135,7 @@ If for some reason you need to disable automatic conversion of underscores to hy
     {!> ../../../docs_src/header_params/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -169,7 +169,7 @@ For example, to declare a header of `X-Token` that can appear more than once, yo
     {!> ../../../docs_src/header_params/tutorial003_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10"
     {!> ../../../docs_src/header_params/tutorial003_an.py!}
@@ -193,7 +193,7 @@ For example, to declare a header of `X-Token` that can appear more than once, yo
     {!> ../../../docs_src/header_params/tutorial003_py39.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index 7d4d4bccaf64c111beb1c845661f121dd58a8790..babf85acb22e8e981b4bbd906cfe4c66a57526f6 100644 (file)
@@ -25,7 +25,7 @@ But if you don't remember what each number code is for, you can use the shortcut
     {!> ../../../docs_src/path_operation_configuration/tutorial001_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="3  17"
     {!> ../../../docs_src/path_operation_configuration/tutorial001.py!}
@@ -54,7 +54,7 @@ You can add tags to your *path operation*, pass the parameter `tags` with a `lis
     {!> ../../../docs_src/path_operation_configuration/tutorial002_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="17  22  27"
     {!> ../../../docs_src/path_operation_configuration/tutorial002.py!}
@@ -92,7 +92,7 @@ You can add a `summary` and `description`:
     {!> ../../../docs_src/path_operation_configuration/tutorial003_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="20-21"
     {!> ../../../docs_src/path_operation_configuration/tutorial003.py!}
@@ -116,7 +116,7 @@ You can write <a href="https://en.wikipedia.org/wiki/Markdown" class="external-l
     {!> ../../../docs_src/path_operation_configuration/tutorial004_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="19-27"
     {!> ../../../docs_src/path_operation_configuration/tutorial004.py!}
@@ -142,7 +142,7 @@ You can specify the response description with the parameter `response_descriptio
     {!> ../../../docs_src/path_operation_configuration/tutorial005_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="21"
     {!> ../../../docs_src/path_operation_configuration/tutorial005.py!}
index 9255875d605b8330f4561fa171c9cfc349809758..57ad20b137ea0f46983372c0fdbb39047efe60c8 100644 (file)
@@ -18,7 +18,7 @@ First, import `Path` from `fastapi`, and import `Annotated`:
     {!> ../../../docs_src/path_params_numeric_validations/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="3-4"
     {!> ../../../docs_src/path_params_numeric_validations/tutorial001_an.py!}
@@ -33,7 +33,7 @@ First, import `Path` from `fastapi`, and import `Annotated`:
     {!> ../../../docs_src/path_params_numeric_validations/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -67,7 +67,7 @@ For example, to declare a `title` metadata value for the path parameter `item_id
     {!> ../../../docs_src/path_params_numeric_validations/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="11"
     {!> ../../../docs_src/path_params_numeric_validations/tutorial001_an.py!}
@@ -82,7 +82,7 @@ For example, to declare a `title` metadata value for the path parameter `item_id
     {!> ../../../docs_src/path_params_numeric_validations/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -117,7 +117,7 @@ It doesn't matter for **FastAPI**. It will detect the parameters by their names,
 
 So, you can declare your function as:
 
-=== "Python 3.6 non-Annotated"
+=== "Python 3.8 non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -134,7 +134,7 @@ But have in mind that if you use `Annotated`, you won't have this problem, it wo
     {!> ../../../docs_src/path_params_numeric_validations/tutorial002_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/path_params_numeric_validations/tutorial002_an.py!}
@@ -174,7 +174,7 @@ Have in mind that if you use `Annotated`, as you are not using function paramete
     {!> ../../../docs_src/path_params_numeric_validations/tutorial003_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/path_params_numeric_validations/tutorial003_an.py!}
@@ -192,13 +192,13 @@ Here, with `ge=1`, `item_id` will need to be an integer number "`g`reater than o
     {!> ../../../docs_src/path_params_numeric_validations/tutorial004_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/path_params_numeric_validations/tutorial004_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -220,13 +220,13 @@ The same applies for:
     {!> ../../../docs_src/path_params_numeric_validations/tutorial005_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/path_params_numeric_validations/tutorial005_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -251,13 +251,13 @@ And the same for <abbr title="less than"><code>lt</code></abbr>.
     {!> ../../../docs_src/path_params_numeric_validations/tutorial006_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="12"
     {!> ../../../docs_src/path_params_numeric_validations/tutorial006_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index 5d1c08adde61128d39e6c9de5eff70c2f61adbee..0b2cf02a87d979cec37e7dbbbc41bb84ef27ebd4 100644 (file)
@@ -10,7 +10,7 @@ Let's take this application as example:
     {!> ../../../docs_src/query_params_str_validations/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/query_params_str_validations/tutorial001.py!}
@@ -42,7 +42,7 @@ To achieve that, first import:
     {!> ../../../docs_src/query_params_str_validations/tutorial002_an_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     In versions of Python below Python 3.9 you import `Annotated` from `typing_extensions`.
 
@@ -73,7 +73,7 @@ We had this type annotation:
     q: str | None = None
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python
     q: Union[str, None] = None
@@ -87,7 +87,7 @@ What we will do is wrap that with `Annotated`, so it becomes:
     q: Annotated[str | None] = None
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python
     q: Annotated[Union[str, None]] = None
@@ -107,7 +107,7 @@ Now that we have this `Annotated` where we can put more metadata, add `Query` to
     {!> ../../../docs_src/query_params_str_validations/tutorial002_an_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10"
     {!> ../../../docs_src/query_params_str_validations/tutorial002_an.py!}
@@ -138,7 +138,7 @@ This is how you would use `Query()` as the default value of your function parame
     {!> ../../../docs_src/query_params_str_validations/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/query_params_str_validations/tutorial002.py!}
@@ -251,7 +251,7 @@ You can also add a parameter `min_length`:
     {!> ../../../docs_src/query_params_str_validations/tutorial003_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="11"
     {!> ../../../docs_src/query_params_str_validations/tutorial003_an.py!}
@@ -266,7 +266,7 @@ You can also add a parameter `min_length`:
     {!> ../../../docs_src/query_params_str_validations/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -291,7 +291,7 @@ You can define a <abbr title="A regular expression, regex or regexp is a sequenc
     {!> ../../../docs_src/query_params_str_validations/tutorial004_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="12"
     {!> ../../../docs_src/query_params_str_validations/tutorial004_an.py!}
@@ -306,7 +306,7 @@ You can define a <abbr title="A regular expression, regex or regexp is a sequenc
     {!> ../../../docs_src/query_params_str_validations/tutorial004_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -351,13 +351,13 @@ Let's say that you want to declare the `q` query parameter to have a `min_length
     {!> ../../../docs_src/query_params_str_validations/tutorial005_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="8"
     {!> ../../../docs_src/query_params_str_validations/tutorial005_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -405,13 +405,13 @@ So, when you need to declare a value as required while using `Query`, you can si
     {!> ../../../docs_src/query_params_str_validations/tutorial006_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="8"
     {!> ../../../docs_src/query_params_str_validations/tutorial006_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -435,13 +435,13 @@ There's an alternative way to explicitly declare that a value is required. You c
     {!> ../../../docs_src/query_params_str_validations/tutorial006b_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="8"
     {!> ../../../docs_src/query_params_str_validations/tutorial006b_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -475,7 +475,7 @@ To do that, you can declare that `None` is a valid type but still use `...` as t
     {!> ../../../docs_src/query_params_str_validations/tutorial006c_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10"
     {!> ../../../docs_src/query_params_str_validations/tutorial006c_an.py!}
@@ -490,7 +490,7 @@ To do that, you can declare that `None` is a valid type but still use `...` as t
     {!> ../../../docs_src/query_params_str_validations/tutorial006c_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -512,13 +512,13 @@ If you feel uncomfortable using `...`, you can also import and use `Required` fr
     {!> ../../../docs_src/query_params_str_validations/tutorial006d_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="2  9"
     {!> ../../../docs_src/query_params_str_validations/tutorial006d_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -548,7 +548,7 @@ For example, to declare a query parameter `q` that can appear multiple times in
     {!> ../../../docs_src/query_params_str_validations/tutorial011_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10"
     {!> ../../../docs_src/query_params_str_validations/tutorial011_an.py!}
@@ -572,7 +572,7 @@ For example, to declare a query parameter `q` that can appear multiple times in
     {!> ../../../docs_src/query_params_str_validations/tutorial011_py39.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -617,7 +617,7 @@ And you can also define a default `list` of values if none are provided:
     {!> ../../../docs_src/query_params_str_validations/tutorial012_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10"
     {!> ../../../docs_src/query_params_str_validations/tutorial012_an.py!}
@@ -632,7 +632,7 @@ And you can also define a default `list` of values if none are provided:
     {!> ../../../docs_src/query_params_str_validations/tutorial012_py39.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -668,13 +668,13 @@ You can also use `list` directly instead of `List[str]` (or `list[str]` in Pytho
     {!> ../../../docs_src/query_params_str_validations/tutorial013_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="8"
     {!> ../../../docs_src/query_params_str_validations/tutorial013_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -713,7 +713,7 @@ You can add a `title`:
     {!> ../../../docs_src/query_params_str_validations/tutorial007_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="11"
     {!> ../../../docs_src/query_params_str_validations/tutorial007_an.py!}
@@ -728,7 +728,7 @@ You can add a `title`:
     {!> ../../../docs_src/query_params_str_validations/tutorial007_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -751,7 +751,7 @@ And a `description`:
     {!> ../../../docs_src/query_params_str_validations/tutorial008_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="15"
     {!> ../../../docs_src/query_params_str_validations/tutorial008_an.py!}
@@ -766,7 +766,7 @@ And a `description`:
     {!> ../../../docs_src/query_params_str_validations/tutorial008_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -805,7 +805,7 @@ Then you can declare an `alias`, and that alias is what will be used to find the
     {!> ../../../docs_src/query_params_str_validations/tutorial009_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10"
     {!> ../../../docs_src/query_params_str_validations/tutorial009_an.py!}
@@ -820,7 +820,7 @@ Then you can declare an `alias`, and that alias is what will be used to find the
     {!> ../../../docs_src/query_params_str_validations/tutorial009_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -849,7 +849,7 @@ Then pass the parameter `deprecated=True` to `Query`:
     {!> ../../../docs_src/query_params_str_validations/tutorial010_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="20"
     {!> ../../../docs_src/query_params_str_validations/tutorial010_an.py!}
@@ -864,7 +864,7 @@ Then pass the parameter `deprecated=True` to `Query`:
     {!> ../../../docs_src/query_params_str_validations/tutorial010_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -893,7 +893,7 @@ To exclude a query parameter from the generated OpenAPI schema (and thus, from t
     {!> ../../../docs_src/query_params_str_validations/tutorial014_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="11"
     {!> ../../../docs_src/query_params_str_validations/tutorial014_an.py!}
@@ -908,7 +908,7 @@ To exclude a query parameter from the generated OpenAPI schema (and thus, from t
     {!> ../../../docs_src/query_params_str_validations/tutorial014_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index 0b74b10f81c8c2e83bee1baabe84ade3f9ee9355..988ff4bf18c2561474b07060100de06c38d55178 100644 (file)
@@ -69,7 +69,7 @@ The same way, you can declare optional query parameters, by setting their defaul
     {!> ../../../docs_src/query_params/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/query_params/tutorial002.py!}
@@ -90,7 +90,7 @@ You can also declare `bool` types, and they will be converted:
     {!> ../../../docs_src/query_params/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/query_params/tutorial003.py!}
@@ -143,7 +143,7 @@ They will be detected by name:
     {!> ../../../docs_src/query_params/tutorial004_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="8  10"
     {!> ../../../docs_src/query_params/tutorial004.py!}
@@ -209,7 +209,7 @@ And of course, you can define some parameters as required, some as having a defa
     {!> ../../../docs_src/query_params/tutorial006_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10"
     {!> ../../../docs_src/query_params/tutorial006.py!}
index 1fe1e7a33db994720262dd08ea0088d37bbef147..c85a68ed606312745ffcdcf746c1b6def0ef6eee 100644 (file)
@@ -19,13 +19,13 @@ Import `File` and `UploadFile` from `fastapi`:
     {!> ../../../docs_src/request_files/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1"
     {!> ../../../docs_src/request_files/tutorial001_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -44,13 +44,13 @@ Create file parameters the same way you would for `Body` or `Form`:
     {!> ../../../docs_src/request_files/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="8"
     {!> ../../../docs_src/request_files/tutorial001_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -85,13 +85,13 @@ Define a file parameter with a type of `UploadFile`:
     {!> ../../../docs_src/request_files/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="13"
     {!> ../../../docs_src/request_files/tutorial001_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -181,7 +181,7 @@ You can make a file optional by using standard type annotations and setting a de
     {!> ../../../docs_src/request_files/tutorial001_02_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10  18"
     {!> ../../../docs_src/request_files/tutorial001_02_an.py!}
@@ -196,7 +196,7 @@ You can make a file optional by using standard type annotations and setting a de
     {!> ../../../docs_src/request_files/tutorial001_02_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -215,13 +215,13 @@ You can also use `File()` with `UploadFile`, for example, to set additional meta
     {!> ../../../docs_src/request_files/tutorial001_03_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="8  14"
     {!> ../../../docs_src/request_files/tutorial001_03_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -244,7 +244,7 @@ To use that, declare a list of `bytes` or `UploadFile`:
     {!> ../../../docs_src/request_files/tutorial002_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="11  16"
     {!> ../../../docs_src/request_files/tutorial002_an.py!}
@@ -259,7 +259,7 @@ To use that, declare a list of `bytes` or `UploadFile`:
     {!> ../../../docs_src/request_files/tutorial002_py39.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -285,7 +285,7 @@ And the same way as before, you can use `File()` to set additional parameters, e
     {!> ../../../docs_src/request_files/tutorial003_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="12  19-21"
     {!> ../../../docs_src/request_files/tutorial003_an.py!}
@@ -300,7 +300,7 @@ And the same way as before, you can use `File()` to set additional parameters, e
     {!> ../../../docs_src/request_files/tutorial003_py39.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index 1818946c4e0876c51b0e3a420a4fd5c8f1543634..a58291dc8156c181ad9ba696d8afcf94a4cdc0a1 100644 (file)
@@ -15,13 +15,13 @@ You can define files and form fields at the same time using `File` and `Form`.
     {!> ../../../docs_src/request_forms_and_files/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1"
     {!> ../../../docs_src/request_forms_and_files/tutorial001_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -40,13 +40,13 @@ Create file and form parameters the same way you would for `Body` or `Query`:
     {!> ../../../docs_src/request_forms_and_files/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9-11"
     {!> ../../../docs_src/request_forms_and_files/tutorial001_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index 5d441a6141fb28d37983a08c63d91ea5c0bcf81a..0e8ac5f4f925959bf68f1e81bde1190dad209a7f 100644 (file)
@@ -17,13 +17,13 @@ Import `Form` from `fastapi`:
     {!> ../../../docs_src/request_forms/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1"
     {!> ../../../docs_src/request_forms/tutorial001_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -42,13 +42,13 @@ Create form parameters the same way you would for `Body` or `Query`:
     {!> ../../../docs_src/request_forms/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="8"
     {!> ../../../docs_src/request_forms/tutorial001_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index 2181cfb5ae7bb7a1d02db59ff1f27446abc49fa1..d6d3d61cb4b24bc3a7ec17ac603c0f9faaa2e1f0 100644 (file)
@@ -16,7 +16,7 @@ You can use **type annotations** the same way you would for input data in functi
     {!> ../../../docs_src/response_model/tutorial001_01_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="18  23"
     {!> ../../../docs_src/response_model/tutorial001_01.py!}
@@ -65,7 +65,7 @@ You can use the `response_model` parameter in any of the *path operations*:
     {!> ../../../docs_src/response_model/tutorial001_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="17  22  24-27"
     {!> ../../../docs_src/response_model/tutorial001.py!}
@@ -101,7 +101,7 @@ Here we are declaring a `UserIn` model, it will contain a plaintext password:
     {!> ../../../docs_src/response_model/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9  11"
     {!> ../../../docs_src/response_model/tutorial002.py!}
@@ -121,7 +121,7 @@ And we are using this model to declare our input and the same model to declare o
     {!> ../../../docs_src/response_model/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="18"
     {!> ../../../docs_src/response_model/tutorial002.py!}
@@ -146,7 +146,7 @@ We can instead create an input model with the plaintext password and an output m
     {!> ../../../docs_src/response_model/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9  11  16"
     {!> ../../../docs_src/response_model/tutorial003.py!}
@@ -160,7 +160,7 @@ Here, even though our *path operation function* is returning the same input user
     {!> ../../../docs_src/response_model/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="24"
     {!> ../../../docs_src/response_model/tutorial003.py!}
@@ -174,7 +174,7 @@ Here, even though our *path operation function* is returning the same input user
     {!> ../../../docs_src/response_model/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="22"
     {!> ../../../docs_src/response_model/tutorial003.py!}
@@ -208,7 +208,7 @@ And in those cases, we can use classes and inheritance to take advantage of func
     {!> ../../../docs_src/response_model/tutorial003_01_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9-13  15-16  20"
     {!> ../../../docs_src/response_model/tutorial003_01.py!}
@@ -284,7 +284,7 @@ The same would happen if you had something like a <abbr title='A union between m
     {!> ../../../docs_src/response_model/tutorial003_04_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10"
     {!> ../../../docs_src/response_model/tutorial003_04.py!}
@@ -306,7 +306,7 @@ In this case, you can disable the response model generation by setting `response
     {!> ../../../docs_src/response_model/tutorial003_05_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/response_model/tutorial003_05.py!}
@@ -330,7 +330,7 @@ Your response model could have default values, like:
     {!> ../../../docs_src/response_model/tutorial004_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="11  13-14"
     {!> ../../../docs_src/response_model/tutorial004.py!}
@@ -360,7 +360,7 @@ You can set the *path operation decorator* parameter `response_model_exclude_uns
     {!> ../../../docs_src/response_model/tutorial004_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="24"
     {!> ../../../docs_src/response_model/tutorial004.py!}
@@ -447,7 +447,7 @@ This can be used as a quick shortcut if you have only one Pydantic model and wan
     {!> ../../../docs_src/response_model/tutorial005_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="31  37"
     {!> ../../../docs_src/response_model/tutorial005.py!}
@@ -468,7 +468,7 @@ If you forget to use a `set` and use a `list` or `tuple` instead, FastAPI will s
     {!> ../../../docs_src/response_model/tutorial006_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="31  37"
     {!> ../../../docs_src/response_model/tutorial006.py!}
index 9eeb3f1f2935173f0694ce960b191441d3a46fab..9bb9ba4e31d910f347656c5efffee1308b64d78e 100644 (file)
@@ -20,13 +20,13 @@ You can declare `examples` for a Pydantic model that will be added to the genera
     {!> ../../../docs_src/schema_extra_example/tutorial001_py310_pv1.py!}
     ```
 
-=== "Python 3.6+ Pydantic v2"
+=== "Python 3.8+ Pydantic v2"
 
     ```Python hl_lines="15-26"
     {!> ../../../docs_src/schema_extra_example/tutorial001.py!}
     ```
 
-=== "Python 3.6+ Pydantic v1"
+=== "Python 3.8+ Pydantic v1"
 
     ```Python hl_lines="15-25"
     {!> ../../../docs_src/schema_extra_example/tutorial001_pv1.py!}
@@ -68,7 +68,7 @@ When using `Field()` with Pydantic models, you can also declare additional `exam
     {!> ../../../docs_src/schema_extra_example/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="4  10-13"
     {!> ../../../docs_src/schema_extra_example/tutorial002.py!}
@@ -104,7 +104,7 @@ Here we pass `examples` containing one example of the data expected in `Body()`:
     {!> ../../../docs_src/schema_extra_example/tutorial003_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="23-30"
     {!> ../../../docs_src/schema_extra_example/tutorial003_an.py!}
@@ -119,7 +119,7 @@ Here we pass `examples` containing one example of the data expected in `Body()`:
     {!> ../../../docs_src/schema_extra_example/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -150,7 +150,7 @@ You can of course also pass multiple `examples`:
     {!> ../../../docs_src/schema_extra_example/tutorial004_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="24-39"
     {!> ../../../docs_src/schema_extra_example/tutorial004_an.py!}
@@ -165,7 +165,7 @@ You can of course also pass multiple `examples`:
     {!> ../../../docs_src/schema_extra_example/tutorial004_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -225,7 +225,7 @@ You can use it like this:
     {!> ../../../docs_src/schema_extra_example/tutorial005_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="24-50"
     {!> ../../../docs_src/schema_extra_example/tutorial005_an.py!}
@@ -240,7 +240,7 @@ You can use it like this:
     {!> ../../../docs_src/schema_extra_example/tutorial005_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index 5765cf2d6261109a5fd929bc52e2f584f0e76688..2f39f1ec26426f65af699a58b4bbf3757065913a 100644 (file)
@@ -26,13 +26,13 @@ Copy the example in a file `main.py`:
     {!> ../../../docs_src/security/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python
     {!> ../../../docs_src/security/tutorial001_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -140,13 +140,13 @@ When we create an instance of the `OAuth2PasswordBearer` class we pass in the `t
     {!> ../../../docs_src/security/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python  hl_lines="7"
     {!> ../../../docs_src/security/tutorial001_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -191,13 +191,13 @@ Now you can pass that `oauth2_scheme` in a dependency with `Depends`.
     {!> ../../../docs_src/security/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python  hl_lines="11"
     {!> ../../../docs_src/security/tutorial001_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index 1a8c5d9a8d8fd7920d6f667673b709f63625a94f..e99a800c6d50cb2f97d149c9f54ac47f0c35ad11 100644 (file)
@@ -8,13 +8,13 @@ In the previous chapter the security system (which is based on the dependency in
     {!> ../../../docs_src/security/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="11"
     {!> ../../../docs_src/security/tutorial001_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -45,7 +45,7 @@ The same way we use Pydantic to declare bodies, we can use it anywhere else:
     {!> ../../../docs_src/security/tutorial002_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="5  13-17"
     {!> ../../../docs_src/security/tutorial002_an.py!}
@@ -60,7 +60,7 @@ The same way we use Pydantic to declare bodies, we can use it anywhere else:
     {!> ../../../docs_src/security/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -91,7 +91,7 @@ The same as we were doing before in the *path operation* directly, our new depen
     {!> ../../../docs_src/security/tutorial002_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="26"
     {!> ../../../docs_src/security/tutorial002_an.py!}
@@ -106,7 +106,7 @@ The same as we were doing before in the *path operation* directly, our new depen
     {!> ../../../docs_src/security/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -131,7 +131,7 @@ The same as we were doing before in the *path operation* directly, our new depen
     {!> ../../../docs_src/security/tutorial002_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="20-23  27-28"
     {!> ../../../docs_src/security/tutorial002_an.py!}
@@ -146,7 +146,7 @@ The same as we were doing before in the *path operation* directly, our new depen
     {!> ../../../docs_src/security/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -171,7 +171,7 @@ So now we can use the same `Depends` with our `get_current_user` in the *path op
     {!> ../../../docs_src/security/tutorial002_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="32"
     {!> ../../../docs_src/security/tutorial002_an.py!}
@@ -186,7 +186,7 @@ So now we can use the same `Depends` with our `get_current_user` in the *path op
     {!> ../../../docs_src/security/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -253,7 +253,7 @@ And all these thousands of *path operations* can be as small as 3 lines:
     {!> ../../../docs_src/security/tutorial002_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="31-33"
     {!> ../../../docs_src/security/tutorial002_an.py!}
@@ -268,7 +268,7 @@ And all these thousands of *path operations* can be as small as 3 lines:
     {!> ../../../docs_src/security/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index deb722b966e269d92e628bbe255327cc29bb5a30..0a347fed3eb83c8f8f480691840f9c45e1f4f56c 100644 (file)
@@ -121,7 +121,7 @@ And another one to authenticate and return a user.
     {!> ../../../docs_src/security/tutorial004_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="7  49  56-57  60-61  70-76"
     {!> ../../../docs_src/security/tutorial004_an.py!}
@@ -136,7 +136,7 @@ And another one to authenticate and return a user.
     {!> ../../../docs_src/security/tutorial004_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -188,7 +188,7 @@ Create a utility function to generate a new access token.
     {!> ../../../docs_src/security/tutorial004_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="6  13-15  29-31 79-87"
     {!> ../../../docs_src/security/tutorial004_an.py!}
@@ -203,7 +203,7 @@ Create a utility function to generate a new access token.
     {!> ../../../docs_src/security/tutorial004_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -232,7 +232,7 @@ If the token is invalid, return an HTTP error right away.
     {!> ../../../docs_src/security/tutorial004_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="90-107"
     {!> ../../../docs_src/security/tutorial004_an.py!}
@@ -247,7 +247,7 @@ If the token is invalid, return an HTTP error right away.
     {!> ../../../docs_src/security/tutorial004_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -274,7 +274,7 @@ Create a real JWT access token and return it
     {!> ../../../docs_src/security/tutorial004_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="118-133"
     {!> ../../../docs_src/security/tutorial004_an.py!}
@@ -289,7 +289,7 @@ Create a real JWT access token and return it
     {!> ../../../docs_src/security/tutorial004_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index abcf6b667c57304ce059d40665ea3e3a59f2de46..88edc9eab98376bde9c5075b481a0ff8bbe07cab 100644 (file)
@@ -61,7 +61,7 @@ First, import `OAuth2PasswordRequestForm`, and use it as a dependency with `Depe
     {!> ../../../docs_src/security/tutorial003_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="4  79"
     {!> ../../../docs_src/security/tutorial003_an.py!}
@@ -76,7 +76,7 @@ First, import `OAuth2PasswordRequestForm`, and use it as a dependency with `Depe
     {!> ../../../docs_src/security/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -134,7 +134,7 @@ For the error, we use the exception `HTTPException`:
     {!> ../../../docs_src/security/tutorial003_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="3  80-82"
     {!> ../../../docs_src/security/tutorial003_an.py!}
@@ -149,7 +149,7 @@ For the error, we use the exception `HTTPException`:
     {!> ../../../docs_src/security/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -194,7 +194,7 @@ So, the thief won't be able to try to use those same passwords in another system
     {!> ../../../docs_src/security/tutorial003_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="83-86"
     {!> ../../../docs_src/security/tutorial003_an.py!}
@@ -209,7 +209,7 @@ So, the thief won't be able to try to use those same passwords in another system
     {!> ../../../docs_src/security/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -264,7 +264,7 @@ For this simple example, we are going to just be completely insecure and return
     {!> ../../../docs_src/security/tutorial003_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="88"
     {!> ../../../docs_src/security/tutorial003_an.py!}
@@ -279,7 +279,7 @@ For this simple example, we are going to just be completely insecure and return
     {!> ../../../docs_src/security/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
@@ -321,7 +321,7 @@ So, in our endpoint, we will only get a user if the user exists, was correctly a
     {!> ../../../docs_src/security/tutorial003_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="59-67  70-75  95"
     {!> ../../../docs_src/security/tutorial003_an.py!}
@@ -336,7 +336,7 @@ So, in our endpoint, we will only get a user if the user exists, was correctly a
     {!> ../../../docs_src/security/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index 6e0e5dc06eaa1c85554c87f9700fcffd8f4e11d1..010244bbf6f141d191768ab23603a533f6fdb918 100644 (file)
@@ -281,7 +281,7 @@ But for security, the `password` won't be in other Pydantic *models*, for exampl
     {!> ../../../docs_src/sql_databases/sql_app_py39/schemas.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="3  6-8  11-12  23-24  27-28"
     {!> ../../../docs_src/sql_databases/sql_app/schemas.py!}
@@ -325,7 +325,7 @@ Not only the IDs of those items, but all the data that we defined in the Pydanti
     {!> ../../../docs_src/sql_databases/sql_app_py39/schemas.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="15-17  31-34"
     {!> ../../../docs_src/sql_databases/sql_app/schemas.py!}
@@ -354,7 +354,7 @@ In the `Config` class, set the attribute `orm_mode = True`.
     {!> ../../../docs_src/sql_databases/sql_app_py39/schemas.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="15  19-20  31  36-37"
     {!> ../../../docs_src/sql_databases/sql_app/schemas.py!}
@@ -494,7 +494,7 @@ In a very simplistic way create the database tables:
     {!> ../../../docs_src/sql_databases/sql_app_py39/main.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/sql_databases/sql_app/main.py!}
@@ -528,7 +528,7 @@ Our dependency will create a new SQLAlchemy `SessionLocal` that will be used in
     {!> ../../../docs_src/sql_databases/sql_app_py39/main.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="15-20"
     {!> ../../../docs_src/sql_databases/sql_app/main.py!}
@@ -553,7 +553,7 @@ This will then give us better editor support inside the *path operation function
     {!> ../../../docs_src/sql_databases/sql_app_py39/main.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="24  32  38  47  53"
     {!> ../../../docs_src/sql_databases/sql_app/main.py!}
@@ -574,7 +574,7 @@ Now, finally, here's the standard **FastAPI** *path operations* code.
     {!> ../../../docs_src/sql_databases/sql_app_py39/main.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="23-28  31-34  37-42  45-49  52-55"
     {!> ../../../docs_src/sql_databases/sql_app/main.py!}
@@ -673,7 +673,7 @@ For example, in a background task worker with <a href="https://docs.celeryq.dev"
     {!> ../../../docs_src/sql_databases/sql_app_py39/schemas.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python
     {!> ../../../docs_src/sql_databases/sql_app/schemas.py!}
@@ -693,7 +693,7 @@ For example, in a background task worker with <a href="https://docs.celeryq.dev"
     {!> ../../../docs_src/sql_databases/sql_app_py39/main.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python
     {!> ../../../docs_src/sql_databases/sql_app/main.py!}
@@ -752,7 +752,7 @@ The middleware we'll add (just a function) will create a new SQLAlchemy `Session
     {!> ../../../docs_src/sql_databases/sql_app_py39/alt_main.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="14-22"
     {!> ../../../docs_src/sql_databases/sql_app/alt_main.py!}
index ec133a4d0876b9c6821bbe4e795436b2c0fa276d..3f8dd69a1d74e140f82253f6430f28d0190fe0aa 100644 (file)
@@ -122,7 +122,7 @@ Both *path operations* require an `X-Token` header.
     {!> ../../../docs_src/app_testing/app_b_an_py39/main.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python
     {!> ../../../docs_src/app_testing/app_b_an/main.py!}
@@ -137,7 +137,7 @@ Both *path operations* require an `X-Token` header.
     {!> ../../../docs_src/app_testing/app_b_py310/main.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index 5d6b6509a715f15c873a54f9ec521b392b8bfaff..d05c4f73e4058f2ff57554addc9071346b490ba2 100644 (file)
@@ -25,7 +25,7 @@ Documentación interactiva de la API e interfaces web de exploración. Hay múlt
 
 ### Simplemente Python moderno
 
-Todo está basado en las declaraciones de tipo de **Python 3.6** estándar (gracias a Pydantic). No necesitas aprender una sintáxis nueva, solo Python moderno.
+Todo está basado en las declaraciones de tipo de **Python 3.8** estándar (gracias a Pydantic). No necesitas aprender una sintáxis nueva, solo Python moderno.
 
 Si necesitas un repaso de 2 minutos de cómo usar los tipos de Python (así no uses FastAPI) prueba el tutorial corto: [Python Types](python-types.md){.internal-link target=_blank}.
 
index 5b75880c021573b3243155708510736fab67b6fd..30a57557706fadb5393ab629987fa8144157f8a4 100644 (file)
@@ -23,7 +23,7 @@
 **Código Fuente**: <a href="https://github.com/tiangolo/fastapi" target="_blank">https://github.com/tiangolo/fastapi</a>
 
 ---
-FastAPI es un web framework moderno y rápido (de alto rendimiento) para construir APIs con Python 3.6+ basado en las anotaciones de tipos estándar de Python.
+FastAPI es un web framework moderno y rápido (de alto rendimiento) para construir APIs con Python 3.8+ basado en las anotaciones de tipos estándar de Python.
 
 Sus características principales son:
 
@@ -106,7 +106,7 @@ Si estás construyendo un app de <abbr title="Interfaz de línea de comandos en
 
 ## Requisitos
 
-Python 3.7+
+Python 3.8+
 
 FastAPI está sobre los hombros de gigantes:
 
@@ -319,7 +319,7 @@ Lo haces con tipos modernos estándar de Python.
 
 No tienes que aprender una sintáxis nueva, los métodos o clases de una library específica, etc.
 
-Solo **Python 3.6+** estándar.
+Solo **Python 3.8+** estándar.
 
 Por ejemplo, para un `int`:
 
index f5faa46b6d27fe07c74667436cbc987f48306634..0c1f6269a0315f23013437a859376985ab38b855 100644 (file)
@@ -25,7 +25,7 @@ Documentation d'API interactive et interface web d'exploration. Comme le framewo
 
 ### Faite en python moderne
 
-Tout est basé sur la déclaration de type standard de **Python 3.6** (grâce à Pydantic). Pas de nouvelles syntaxes à apprendre. Juste du Python standard et moderne.
+Tout est basé sur la déclaration de type standard de **Python 3.8** (grâce à Pydantic). Pas de nouvelles syntaxes à apprendre. Juste du Python standard et moderne.
 
 Si vous souhaitez un rappel de 2 minutes sur l'utilisation des types en Python (même si vous ne comptez pas utiliser FastAPI), jetez un oeil au tutoriel suivant: [Python Types](python-types.md){.internal-link target=_blank}.
 
index 4ac9864ec082ed2ed828e653c0101fa4ad237f52..f732fc74c31cff15e455bb43b0174609c9c53af1 100644 (file)
@@ -27,7 +27,7 @@
 
 ---
 
-FastAPI est un framework web moderne et rapide (haute performance) pour la création d'API avec Python 3.7+, basé sur les annotations de type standard de Python.
+FastAPI est un framework web moderne et rapide (haute performance) pour la création d'API avec Python 3.8+, basé sur les annotations de type standard de Python.
 
 Les principales fonctionnalités sont :
 
@@ -115,7 +115,7 @@ Si vous souhaitez construire une application <abbr title="Command Line Interface
 
 ## Prérequis
 
-Python 3.7+
+Python 3.8+
 
 FastAPI repose sur les épaules de géants :
 
@@ -331,7 +331,7 @@ Vous faites cela avec les types Python standard modernes.
 
 Vous n'avez pas à apprendre une nouvelle syntaxe, les méthodes ou les classes d'une bibliothèque spécifique, etc.
 
-Juste du **Python 3.7+** standard.
+Juste du **Python 3.8+** standard.
 
 Par exemple, pour un `int`:
 
index a40b48cf0ed8fda1780e5593f91e384119d857f7..853364f117887e64bc8e6d2a3e194ff1f94d774c 100644 (file)
@@ -24,7 +24,7 @@
 
 ### 現代的なPython
 
-FastAPIの機能はすべて、標準のPython 3.6型宣言に基づいています(Pydanticの功績)。新しい構文はありません。ただの現代的な標準のPythonです。
+FastAPIの機能はすべて、標準のPython 3.8型宣言に基づいています(Pydanticの功績)。新しい構文はありません。ただの現代的な標準のPythonです。
 
 (FastAPIを使用しない場合でも)Pythonの型の使用方法について簡単な復習が必要な場合は、短いチュートリアル([Python Types](python-types.md){.internal-link target=_blank})を参照してください。
 
index a9c381a23c7e55aba719d2f3c6198768dca85dac..f340fdb87ebc51bc3723c8e2a0208b77ab9d5658 100644 (file)
@@ -107,7 +107,7 @@ FastAPI は、Pythonの標準である型ヒントに基づいてPython 3.6 以
 
 ## 必要条件
 
-Python 3.7+
+Python 3.8+
 
 FastAPI は巨人の肩の上に立っています。
 
index a6991a9b86737e8c0cb551aedc371a89899440bf..7ce938106d8bbc6df4ff806fbcc9d9597889c1e3 100644 (file)
@@ -107,7 +107,7 @@ FastAPI는 현대적이고, 빠르며(고성능), 파이썬 표준 타입 힌트
 
 ## 요구사항
 
-Python 3.7+
+Python 3.8+
 
 FastAPI는 거인들의 어깨 위에 서 있습니다:
 
index 49d362dd985cf192311026939bc721e02df8924a..ed10af9bc7589747ac6c597910e22876fc841b92 100644 (file)
@@ -25,7 +25,7 @@ Interaktywna dokumentacja i webowe interfejsy do eksploracji API. Z racji tego,
 
 ### Nowoczesny Python
 
-Wszystko opiera się na standardowych deklaracjach typu **Python 3.6** (dzięki Pydantic). Brak nowej składni do uczenia. Po prostu standardowy, współczesny Python.
+Wszystko opiera się na standardowych deklaracjach typu **Python 3.8** (dzięki Pydantic). Brak nowej składni do uczenia. Po prostu standardowy, współczesny Python.
 
 Jeśli potrzebujesz szybkiego przypomnienia jak używać deklaracji typów w Pythonie (nawet jeśli nie używasz FastAPI), sprawdź krótki samouczek: [Python Types](python-types.md){.internal-link target=_blank}.
 
index bade7a88cb5878f0bb2fa3be09cd62cdfff9e9ae..43a20383ca1fde6f3b12bd294b22c52fdbabedf2 100644 (file)
@@ -106,7 +106,7 @@ Jeżeli tworzysz aplikacje <abbr title="aplikacja z interfejsem konsolowym">CLI<
 
 ## Wymagania
 
-Python 3.7+
+Python 3.8+
 
 FastAPI oparty jest na:
 
@@ -321,7 +321,7 @@ Robisz to tak samo jak ze standardowymi typami w Pythonie.
 
 Nie musisz sie uczyć żadnej nowej składni, metod lub klas ze specyficznych bibliotek itp.
 
-Po prostu standardowy **Python 3.6+**.
+Po prostu standardowy **Python 3.8+**.
 
 Na przykład, dla danych typu `int`:
 
index bd0db8e76285206bb2e01604c8d2af162aef6e00..822992c5b9843deb61aaf17326e6e9473837f150 100644 (file)
@@ -25,7 +25,7 @@ Documentação interativa da API e navegação _web_ da interface de usuário. C
 
 ### Apenas Python moderno
 
-Tudo é baseado no padrão das declarações de **tipos do Python 3.6** (graças ao Pydantic). Nenhuma sintaxe nova para aprender. Apenas o padrão moderno do Python.
+Tudo é baseado no padrão das declarações de **tipos do Python 3.8** (graças ao Pydantic). Nenhuma sintaxe nova para aprender. Apenas o padrão moderno do Python.
 
 Se você precisa refrescar a memória rapidamente sobre como usar tipos do Python (mesmo que você não use o FastAPI), confira esse rápido tutorial: [Tipos do Python](python-types.md){.internal-link target=_blank}.
 
index 591e7f3d4f69c6901bab08d9a4a8f672ff6bd775..d1e64b3b909571e5a6b4cae5ad6cfc17be9385d3 100644 (file)
@@ -24,7 +24,7 @@
 
 ---
 
-FastAPI é um moderno e rápido (alta performance) _framework web_ para construção de APIs com Python 3.6 ou superior, baseado nos _type hints_ padrões do Python.
+FastAPI é um moderno e rápido (alta performance) _framework web_ para construção de APIs com Python 3.8 ou superior, baseado nos _type hints_ padrões do Python.
 
 Os recursos chave são:
 
@@ -100,7 +100,7 @@ Se você estiver construindo uma aplicação <abbr title="Command Line Interface
 
 ## Requisitos
 
-Python 3.7+
+Python 3.8+
 
 FastAPI está nos ombros de gigantes:
 
@@ -316,7 +316,7 @@ Você faz com tipos padrão do Python moderno.
 
 Você não terá que aprender uma nova sintaxe, métodos ou classes de uma biblioteca específica etc.
 
-Apenas **Python 3.6+** padrão.
+Apenas **Python 3.8+** padrão.
 
 Por exemplo, para um `int`:
 
index 22f5856a69cce8c0fadbbcf142de209a7ffe0fb3..0eaa9664c07994eb69e185368ea227b7fe53d518 100644 (file)
@@ -14,7 +14,7 @@ E você também pode declarar parâmetros de corpo como opcionais, definindo o v
     {!> ../../../docs_src/body_multiple_params/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="19-21"
     {!> ../../../docs_src/body_multiple_params/tutorial001.py!}
@@ -44,7 +44,7 @@ Mas você pode também declarar múltiplos parâmetros de corpo, por exemplo, `i
     {!> ../../../docs_src/body_multiple_params/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="22"
     {!> ../../../docs_src/body_multiple_params/tutorial002.py!}
@@ -87,7 +87,7 @@ Se você declará-lo como é, porque é um valor singular, o **FastAPI** assumir
 
 Mas você pode instruir o **FastAPI** para tratá-lo como outra chave do corpo usando `Body`:
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="22"
     {!> ../../../docs_src/body_multiple_params/tutorial003.py!}
@@ -143,7 +143,7 @@ Por exemplo:
     {!> ../../../docs_src/body_multiple_params/tutorial004_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="27"
     {!> ../../../docs_src/body_multiple_params/tutorial004.py!}
@@ -172,7 +172,7 @@ como em:
     {!> ../../../docs_src/body_multiple_params/tutorial005_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="17"
     {!> ../../../docs_src/body_multiple_params/tutorial005.py!}
index bb4483fdc8f0fb9fab8cd6be973f8c8c0212a802..b9bfbf63bfb3f96c4321c7a77922ba32ad6261be 100644 (file)
@@ -26,7 +26,7 @@ A função recebe um objeto, como um modelo Pydantic e retorna uma versão compa
     {!> ../../../docs_src/encoder/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="5  22"
     {!> ../../../docs_src/encoder/tutorial001.py!}
index dd5407eb2d13eb238c9e968f53477644114a77b6..1343a3ae482d4ddcff5a6c01a55be1d96a0ffc0c 100644 (file)
@@ -17,7 +17,7 @@ Isso é especialmente o caso para modelos de usuários, porque:
 
 Aqui está uma ideia geral de como os modelos poderiam parecer com seus campos de senha e os lugares onde são usados:
 
-=== "Python 3.6 and above"
+=== "Python 3.8 and above"
 
     ```Python hl_lines="9  11  16  22  24  29-30  33-35  40-41"
     {!> ../../../docs_src/extra_models/tutorial001.py!}
@@ -158,7 +158,7 @@ Toda conversão de dados, validação, documentação, etc. ainda funcionará no
 
 Dessa forma, podemos declarar apenas as diferenças entre os modelos (com `password` em texto claro, com `hashed_password` e sem senha):
 
-=== "Python 3.6 and above"
+=== "Python 3.8 and above"
 
     ```Python hl_lines="9  15-16  19-20  23-24"
     {!> ../../../docs_src/extra_models/tutorial002.py!}
@@ -181,7 +181,7 @@ Para fazer isso, use a dica de tipo padrão do Python <a href="https://docs.pyth
 !!! note
     Ao definir um <a href="https://pydantic-docs.helpmanual.io/usage/types/#unions" class="external-link" target="_blank">`Union`</a>, inclua o tipo mais específico primeiro, seguido pelo tipo menos específico. No exemplo abaixo, o tipo mais específico `PlaneItem` vem antes de `CarItem` em `Union[PlaneItem, CarItem]`.
 
-=== "Python 3.6 and above"
+=== "Python 3.8 and above"
 
     ```Python hl_lines="1  14-15  18-20  33"
     {!> ../../../docs_src/extra_models/tutorial003.py!}
@@ -213,7 +213,7 @@ Da mesma forma, você pode declarar respostas de listas de objetos.
 
 Para isso, use o padrão Python `typing.List` (ou simplesmente `list` no Python 3.9 e superior):
 
-=== "Python 3.6 and above"
+=== "Python 3.8 and above"
 
     ```Python hl_lines="1  20"
     {!> ../../../docs_src/extra_models/tutorial004.py!}
@@ -233,7 +233,7 @@ Isso é útil se você não souber os nomes de campo / atributo válidos (que se
 
 Neste caso, você pode usar `typing.Dict` (ou simplesmente dict no Python 3.9 e superior):
 
-=== "Python 3.6 and above"
+=== "Python 3.8 and above"
 
     ```Python hl_lines="1  8"
     {!> ../../../docs_src/extra_models/tutorial005.py!}
index bc8843327fb01efd5e06554c3422df10e4025bb0..4bdfb7e9cd62ff1e266def5a62a0ca91ba403e5f 100644 (file)
@@ -12,7 +12,7 @@ Primeiro importe `Header`:
     {!> ../../../docs_src/header_params/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="3"
     {!> ../../../docs_src/header_params/tutorial001.py!}
@@ -30,7 +30,7 @@ O primeiro valor é o valor padrão, você pode passar todas as validações adi
     {!> ../../../docs_src/header_params/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/header_params/tutorial001.py!}
@@ -66,7 +66,7 @@ Se por algum motivo você precisar desabilitar a conversão automática de subli
     {!> ../../../docs_src/header_params/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10"
     {!> ../../../docs_src/header_params/tutorial002.py!}
@@ -97,7 +97,7 @@ Por exemplo, para declarar um cabeçalho de `X-Token` que pode aparecer mais de
     {!> ../../../docs_src/header_params/tutorial003_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/header_params/tutorial003.py!}
index e0a23f6655e3920a76569e9ab47a0944c5f3e9cf..13a87240f1b84fd6cfa467b98d374d895337aed4 100644 (file)
@@ -13,7 +13,7 @@ Você pode passar diretamente o código `int`, como `404`.
 
 Mas se você não se lembrar o que cada código numérico significa, pode usar as constantes de atalho em `status`:
 
-=== "Python 3.6 and above"
+=== "Python 3.8 and above"
 
     ```Python hl_lines="3  17"
     {!> ../../../docs_src/path_operation_configuration/tutorial001.py!}
@@ -42,7 +42,7 @@ Esse código de status será usado na resposta e será adicionado ao esquema Ope
 
 Você pode adicionar tags para sua *operação de rota*, passe o parâmetro `tags` com uma `list` de `str` (comumente apenas um `str`):
 
-=== "Python 3.6 and above"
+=== "Python 3.8 and above"
 
     ```Python hl_lines="17  22  27"
     {!> ../../../docs_src/path_operation_configuration/tutorial002.py!}
@@ -80,7 +80,7 @@ Nestes casos, pode fazer sentido armazenar as tags em um `Enum`.
 
 Você pode adicionar um `summary` e uma `description`:
 
-=== "Python 3.6 and above"
+=== "Python 3.8 and above"
 
     ```Python hl_lines="20-21"
     {!> ../../../docs_src/path_operation_configuration/tutorial003.py!}
@@ -104,7 +104,7 @@ Como as descrições tendem a ser longas e cobrir várias linhas, você pode dec
 
 Você pode escrever <a href="https://en.wikipedia.org/wiki/Markdown" class="external-link" target="_blank">Markdown</a> na docstring, ele será interpretado e exibido corretamente (levando em conta a indentação da docstring).
 
-=== "Python 3.6 and above"
+=== "Python 3.8 and above"
 
     ```Python hl_lines="19-27"
     {!> ../../../docs_src/path_operation_configuration/tutorial004.py!}
@@ -131,7 +131,7 @@ Ela será usada nas documentações interativas:
 
 Você pode especificar a descrição da resposta com o parâmetro `response_description`:
 
-=== "Python 3.6 and above"
+=== "Python 3.8 and above"
 
     ```Python hl_lines="21"
     {!> ../../../docs_src/path_operation_configuration/tutorial005.py!}
index ec9b74b300d2b4ac14de81bea9e9b2017297e913..eb0d31dc34ecc520d27c97d0f201c5029dd540db 100644 (file)
@@ -12,7 +12,7 @@ Primeiro, importe `Path` de `fastapi`:
     {!> ../../../docs_src/path_params_numeric_validations/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="3"
     {!> ../../../docs_src/path_params_numeric_validations/tutorial001.py!}
@@ -30,7 +30,7 @@ Por exemplo para declarar um valor de metadado `title` para o parâmetro de rota
     {!> ../../../docs_src/path_params_numeric_validations/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10"
     {!> ../../../docs_src/path_params_numeric_validations/tutorial001.py!}
index 3ada4fd213cb5ae6d6758ae75eae684e929706a4..08bb99dbc80c94221c01813dfae58f5cd107ab62 100644 (file)
@@ -69,7 +69,7 @@ Da mesma forma, você pode declarar parâmetros de consulta opcionais, definindo
     {!> ../../../docs_src/query_params/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/query_params/tutorial002.py!}
@@ -91,7 +91,7 @@ Você também pode declarar tipos `bool`, e eles serão convertidos:
     {!> ../../../docs_src/query_params/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/query_params/tutorial003.py!}
@@ -143,7 +143,7 @@ Eles serão detectados pelo nome:
     {!> ../../../docs_src/query_params/tutorial004_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="8  10"
     {!> ../../../docs_src/query_params/tutorial004.py!}
@@ -209,7 +209,7 @@ E claro, você pode definir alguns parâmetros como obrigatórios, alguns possui
     {!> ../../../docs_src/query_params/tutorial006_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10"
     {!> ../../../docs_src/query_params/tutorial006.py!}
index e18f7bc87cba5d6c772c35f4a26bb5b17f10bdc9..97841cc8355a80e061d6eb678991c4dca463d3ce 100644 (file)
@@ -27,7 +27,7 @@
 
 ### Только современный Python
 
-Все эти возможности основаны на стандартных **аннотациях типов Python 3.6** (благодаря Pydantic). Не нужно изучать новый синтаксис. Только лишь стандартный современный Python.
+Все эти возможности основаны на стандартных **аннотациях типов Python 3.8** (благодаря Pydantic). Не нужно изучать новый синтаксис. Только лишь стандартный современный Python.
 
 Если вам нужно освежить знания, как использовать аннотации типов в Python (даже если вы не используете FastAPI), выделите 2 минуты и просмотрите краткое руководство: [Введение в аннотации типов Python¶
 ](python-types.md){.internal-link target=_blank}.
index 30c32e046338930fb79174ce7ed191c4c6a9f394..97a3947bd3f251742daa68df083534992479bdbb 100644 (file)
@@ -27,7 +27,7 @@
 
 ---
 
-FastAPI — это современный, быстрый (высокопроизводительный) веб-фреймворк для создания API используя Python 3.6+, в основе которого лежит стандартная аннотация типов Python.
+FastAPI — это современный, быстрый (высокопроизводительный) веб-фреймворк для создания API используя Python 3.8+, в основе которого лежит стандартная аннотация типов Python.
 
 Ключевые особенности:
 
@@ -109,7 +109,7 @@ FastAPI — это современный, быстрый (высокопрои
 
 ## Зависимости
 
-Python 3.7+
+Python 3.8+
 
 FastAPI стоит на плечах гигантов:
 
@@ -325,7 +325,7 @@ def update_item(item_id: int, item: Item):
 
 Вам не нужно изучать новый синтаксис, методы или классы конкретной библиотеки и т. д.
 
-Только стандартный **Python 3.6+**.
+Только стандартный **Python 3.8+**.
 
 Например, для `int`:
 
index 81efda786ad8ce5c443fb6575c076e4ed009d139..7a3cf6d839f9115b00ad1572f295f842863b4230 100644 (file)
@@ -63,7 +63,7 @@
     {!> ../../../docs_src/background_tasks/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="13  15  22  25"
     {!> ../../../docs_src/background_tasks/tutorial002.py!}
index 2dc6c1e260a13bf733368475ef6d7473edd6c59f..02a598004a86e6f1489c198617ec11e36d9851db 100644 (file)
@@ -12,7 +12,7 @@
     {!> ../../../docs_src/body_fields/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="4"
     {!> ../../../docs_src/body_fields/tutorial001.py!}
@@ -31,7 +31,7 @@
     {!> ../../../docs_src/body_fields/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="11-14"
     {!> ../../../docs_src/body_fields/tutorial001.py!}
index a20457092b34b4f8af9506da29f001d3628ab93e..e52ef6f6f0b4d3be9de6c8e104ba3cd3503438d0 100644 (file)
@@ -20,7 +20,7 @@
     {!> ../../../docs_src/body_multiple_params/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="19-21"
     {!> ../../../docs_src/body_multiple_params/tutorial001_an.py!}
@@ -35,7 +35,7 @@
     {!> ../../../docs_src/body_multiple_params/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! Заметка
         Рекомендуется использовать версию с `Annotated`, если это возможно.
@@ -68,7 +68,7 @@
     {!> ../../../docs_src/body_multiple_params/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="22"
     {!> ../../../docs_src/body_multiple_params/tutorial002.py!}
     {!> ../../../docs_src/body_multiple_params/tutorial003_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="24"
     {!> ../../../docs_src/body_multiple_params/tutorial003_an.py!}
     {!> ../../../docs_src/body_multiple_params/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! Заметка
         Рекомендуется использовать `Annotated` версию, если это возможно.
@@ -197,7 +197,7 @@ q: str | None = None
     {!> ../../../docs_src/body_multiple_params/tutorial004_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="28"
     {!> ../../../docs_src/body_multiple_params/tutorial004_an.py!}
@@ -212,7 +212,7 @@ q: str | None = None
     {!> ../../../docs_src/body_multiple_params/tutorial004_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! Заметка
         Рекомендуется использовать `Annotated` версию, если это возможно.
@@ -250,7 +250,7 @@ item: Item = Body(embed=True)
     {!> ../../../docs_src/body_multiple_params/tutorial005_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="18"
     {!> ../../../docs_src/body_multiple_params/tutorial005_an.py!}
@@ -265,7 +265,7 @@ item: Item = Body(embed=True)
     {!> ../../../docs_src/body_multiple_params/tutorial005_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! Заметка
         Рекомендуется использовать `Annotated` версию, если это возможно.
index 6435e316f42542106ce4e9707243036c5c6a2d01..a6d123d30dc16c2d19bf50f97693f549d01a0ffa 100644 (file)
@@ -12,7 +12,7 @@
     {!> ../../../docs_src/body_nested_models/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="14"
     {!> ../../../docs_src/body_nested_models/tutorial001.py!}
@@ -73,7 +73,7 @@ my_list: List[str]
     {!> ../../../docs_src/body_nested_models/tutorial002_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="14"
     {!> ../../../docs_src/body_nested_models/tutorial002.py!}
@@ -99,7 +99,7 @@ my_list: List[str]
     {!> ../../../docs_src/body_nested_models/tutorial003_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1  14"
     {!> ../../../docs_src/body_nested_models/tutorial003.py!}
@@ -137,7 +137,7 @@ my_list: List[str]
     {!> ../../../docs_src/body_nested_models/tutorial004_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9-11"
     {!> ../../../docs_src/body_nested_models/tutorial004.py!}
@@ -159,7 +159,7 @@ my_list: List[str]
     {!> ../../../docs_src/body_nested_models/tutorial004_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="20"
     {!> ../../../docs_src/body_nested_models/tutorial004.py!}
@@ -208,7 +208,7 @@ my_list: List[str]
     {!> ../../../docs_src/body_nested_models/tutorial005_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="4  10"
     {!> ../../../docs_src/body_nested_models/tutorial005.py!}
@@ -232,7 +232,7 @@ my_list: List[str]
     {!> ../../../docs_src/body_nested_models/tutorial006_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="20"
     {!> ../../../docs_src/body_nested_models/tutorial006.py!}
@@ -283,7 +283,7 @@ my_list: List[str]
     {!> ../../../docs_src/body_nested_models/tutorial007_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9  14  20  23  27"
     {!> ../../../docs_src/body_nested_models/tutorial007.py!}
@@ -314,7 +314,7 @@ images: list[Image]
     {!> ../../../docs_src/body_nested_models/tutorial008_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="15"
     {!> ../../../docs_src/body_nested_models/tutorial008.py!}
@@ -354,7 +354,7 @@ images: list[Image]
     {!> ../../../docs_src/body_nested_models/tutorial009_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/body_nested_models/tutorial009.py!}
index a6f2caa267606cd3a2c60ed67e791d4eaca843ac..5f99458b697fa3a22928ab191d52358a5fc9259f 100644 (file)
@@ -12,7 +12,7 @@
     {!> ../../../docs_src/cookie_params/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="3"
     {!> ../../../docs_src/cookie_params/tutorial001.py!}
@@ -30,7 +30,7 @@
     {!> ../../../docs_src/cookie_params/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/cookie_params/tutorial001.py!}
index 870d42cf54bb3979bce4baa9c4aab7a082e79288..eb1b4d7c1c1c801d9f1cbb31febf505d0f5d9f0d 100644 (file)
     {!> ../../../docs_src/dependencies/tutorial012_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="16"
     {!> ../../../docs_src/dependencies/tutorial012_an.py!}
     ```
 
-=== "Python 3.6 non-Annotated"
+=== "Python 3.8 non-Annotated"
 
     !!! tip "Подсказка"
         Рекомендуется использовать 'Annotated' версию, если это возможно.
index efcbcb38a2390ee81ef7c82081466a06d036fcfe..0f613a6b29b57f8aac9dd9ba40d1664e35fe9b12 100644 (file)
@@ -55,7 +55,7 @@
 
 Вот пример *операции пути* с параметрами, который демонстрирует некоторые из вышеперечисленных типов.
 
-=== "Python 3.6 и выше"
+=== "Python 3.8 и выше"
 
     ```Python hl_lines="1  3  12-16"
     {!> ../../../docs_src/extra_data_types/tutorial001.py!}
@@ -69,7 +69,7 @@
 
 Обратите внимание, что параметры внутри функции имеют свой естественный тип данных, и вы, например, можете выполнять обычные манипуляции с датами, такие как:
 
-=== "Python 3.6 и выше"
+=== "Python 3.8 и выше"
 
     ```Python hl_lines="18-19"
     {!> ../../../docs_src/extra_data_types/tutorial001.py!}
index a346f7432c7f1af5ea5e5c68f3a3211eef870078..30176b4e3c3bc6e4a6fa734b63d609f6f97ecc4d 100644 (file)
@@ -23,7 +23,7 @@
     {!> ../../../docs_src/extra_models/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9  11  16  22  24  29-30  33-35  40-41"
     {!> ../../../docs_src/extra_models/tutorial001.py!}
@@ -164,7 +164,7 @@ UserInDB(
     {!> ../../../docs_src/extra_models/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9  15-16  19-20  23-24"
     {!> ../../../docs_src/extra_models/tutorial002.py!}
@@ -187,7 +187,7 @@ UserInDB(
     {!> ../../../docs_src/extra_models/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1  14-15  18-20  33"
     {!> ../../../docs_src/extra_models/tutorial003.py!}
@@ -219,7 +219,7 @@ some_variable: PlaneItem | CarItem
     {!> ../../../docs_src/extra_models/tutorial004_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1  20"
     {!> ../../../docs_src/extra_models/tutorial004.py!}
@@ -239,7 +239,7 @@ some_variable: PlaneItem | CarItem
     {!> ../../../docs_src/extra_models/tutorial005_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1  8"
     {!> ../../../docs_src/extra_models/tutorial005.py!}
index 0ff8ea489f9f35069190631cbc71e26af86c0175..1be4ac707149fc29bb380b3f57eb466665b5e89c 100644 (file)
@@ -18,7 +18,7 @@
     {!> ../../../docs_src/header_params/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="3"
     {!> ../../../docs_src/header_params/tutorial001_an.py!}
@@ -33,7 +33,7 @@
     {!> ../../../docs_src/header_params/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
 
     !!! tip "Подсказка"
         Предпочтительнее использовать версию с аннотацией, если это возможно.
@@ -60,7 +60,7 @@
     {!> ../../../docs_src/header_params/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10"
     {!> ../../../docs_src/header_params/tutorial001_an.py!}
@@ -75,7 +75,7 @@
     {!> ../../../docs_src/header_params/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
 
     !!! tip "Подсказка"
         Предпочтительнее использовать версию с аннотацией, если это возможно.
     {!> ../../../docs_src/header_params/tutorial002_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="12"
     {!> ../../../docs_src/header_params/tutorial002_an.py!}
     {!> ../../../docs_src/header_params/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
 
     !!! tip "Подсказка"
         Предпочтительнее использовать версию с аннотацией, если это возможно.
     {!> ../../../docs_src/header_params/tutorial003_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10"
     {!> ../../../docs_src/header_params/tutorial003_an.py!}
     {!> ../../../docs_src/header_params/tutorial003_py39.py!}
     ```
 
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
 
     !!! tip "Подсказка"
         Предпочтительнее использовать версию с аннотацией, если это возможно.
index 013903add1cc0804f8ade7c90e42534328ccd368..db99409f469bf1845480b36f916dd2b763784ae1 100644 (file)
@@ -25,7 +25,7 @@
     {!> ../../../docs_src/path_operation_configuration/tutorial001_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="3  17"
     {!> ../../../docs_src/path_operation_configuration/tutorial001.py!}
@@ -54,7 +54,7 @@
     {!> ../../../docs_src/path_operation_configuration/tutorial002_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="17  22  27"
     {!> ../../../docs_src/path_operation_configuration/tutorial002.py!}
@@ -92,7 +92,7 @@
     {!> ../../../docs_src/path_operation_configuration/tutorial003_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="20-21"
     {!> ../../../docs_src/path_operation_configuration/tutorial003.py!}
     {!> ../../../docs_src/path_operation_configuration/tutorial004_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="19-27"
     {!> ../../../docs_src/path_operation_configuration/tutorial004.py!}
     {!> ../../../docs_src/path_operation_configuration/tutorial005_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="21"
     {!> ../../../docs_src/path_operation_configuration/tutorial005.py!}
index 0d034ef343897414ab0d728f8385e30f2eb04498..bd2c29d0a001304f0940584096044c0675e22588 100644 (file)
@@ -18,7 +18,7 @@
     {!> ../../../docs_src/path_params_numeric_validations/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="3-4"
     {!> ../../../docs_src/path_params_numeric_validations/tutorial001_an.py!}
@@ -33,7 +33,7 @@
     {!> ../../../docs_src/path_params_numeric_validations/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
 
     !!! tip "Подсказка"
         Рекомендуется использовать версию с `Annotated` если возможно.
@@ -67,7 +67,7 @@
     {!> ../../../docs_src/path_params_numeric_validations/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="11"
     {!> ../../../docs_src/path_params_numeric_validations/tutorial001_an.py!}
@@ -82,7 +82,7 @@
     {!> ../../../docs_src/path_params_numeric_validations/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
 
     !!! tip "Подсказка"
         Рекомендуется использовать версию с `Annotated` если возможно.
 
 Поэтому вы можете определить функцию так:
 
-=== "Python 3.6 без Annotated"
+=== "Python 3.8 без Annotated"
 
     !!! tip "Подсказка"
         Рекомендуется использовать версию с `Annotated` если возможно.
     {!> ../../../docs_src/path_params_numeric_validations/tutorial002_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/path_params_numeric_validations/tutorial002_an.py!}
@@ -174,7 +174,7 @@ Python не будет ничего делать с `*`, но он будет з
     {!> ../../../docs_src/path_params_numeric_validations/tutorial003_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/path_params_numeric_validations/tutorial003_an.py!}
@@ -192,13 +192,13 @@ Python не будет ничего делать с `*`, но он будет з
     {!> ../../../docs_src/path_params_numeric_validations/tutorial004_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/path_params_numeric_validations/tutorial004_an.py!}
     ```
 
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
 
     !!! tip "Подсказка"
         Рекомендуется использовать версию с `Annotated` если возможно.
@@ -220,13 +220,13 @@ Python не будет ничего делать с `*`, но он будет з
     {!> ../../../docs_src/path_params_numeric_validations/tutorial005_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/path_params_numeric_validations/tutorial005_an.py!}
     ```
 
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
 
     !!! tip "Подсказка"
         Рекомендуется использовать версию с `Annotated` если возможно.
@@ -251,13 +251,13 @@ Python не будет ничего делать с `*`, но он будет з
     {!> ../../../docs_src/path_params_numeric_validations/tutorial006_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="12"
     {!> ../../../docs_src/path_params_numeric_validations/tutorial006_an.py!}
     ```
 
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
 
     !!! tip "Подсказка"
         Рекомендуется использовать версию с `Annotated` если возможно.
index 68042db639629f3e950c1decae2b1b4e6faed2f4..15be5dbf6bc069698e5e64a3212f604777d9ba62 100644 (file)
@@ -10,7 +10,7 @@
     {!> ../../../docs_src/query_params_str_validations/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/query_params_str_validations/tutorial001.py!}
@@ -42,7 +42,7 @@ Query-параметр `q` имеет тип `Union[str, None]` (или `str | N
     {!> ../../../docs_src/query_params_str_validations/tutorial002_an_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     В версиях Python ниже Python 3.9 `Annotation` импортируется из `typing_extensions`.
 
@@ -66,7 +66,7 @@ Query-параметр `q` имеет тип `Union[str, None]` (или `str | N
     q: str | None = None
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python
     q: Union[str, None] = None
@@ -80,7 +80,7 @@ Query-параметр `q` имеет тип `Union[str, None]` (или `str | N
     q: Annotated[str | None] = None
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python
     q: Annotated[Union[str, None]] = None
@@ -100,7 +100,7 @@ Query-параметр `q` имеет тип `Union[str, None]` (или `str | N
     {!> ../../../docs_src/query_params_str_validations/tutorial002_an_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10"
     {!> ../../../docs_src/query_params_str_validations/tutorial002_an.py!}
@@ -131,7 +131,7 @@ Query-параметр `q` имеет тип `Union[str, None]` (или `str | N
     {!> ../../../docs_src/query_params_str_validations/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/query_params_str_validations/tutorial002.py!}
@@ -244,7 +244,7 @@ q: str = Query(default="rick")
     {!> ../../../docs_src/query_params_str_validations/tutorial003_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="11"
     {!> ../../../docs_src/query_params_str_validations/tutorial003_an.py!}
@@ -259,7 +259,7 @@ q: str = Query(default="rick")
     {!> ../../../docs_src/query_params_str_validations/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
 
     !!! tip "Подсказка"
         Рекомендуется использовать версию с `Annotated` если возможно.
@@ -284,7 +284,7 @@ q: str = Query(default="rick")
     {!> ../../../docs_src/query_params_str_validations/tutorial004_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="12"
     {!> ../../../docs_src/query_params_str_validations/tutorial004_an.py!}
@@ -299,7 +299,7 @@ q: str = Query(default="rick")
     {!> ../../../docs_src/query_params_str_validations/tutorial004_py310.py!}
     ```
 
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
 
     !!! tip "Подсказка"
         Рекомендуется использовать версию с `Annotated` если возможно.
@@ -330,13 +330,13 @@ q: str = Query(default="rick")
     {!> ../../../docs_src/query_params_str_validations/tutorial005_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="8"
     {!> ../../../docs_src/query_params_str_validations/tutorial005_an.py!}
     ```
 
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
 
     !!! tip "Подсказка"
         Рекомендуется использовать версию с `Annotated` если возможно.
@@ -384,13 +384,13 @@ q: Union[str, None] = None
     {!> ../../../docs_src/query_params_str_validations/tutorial006_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="8"
     {!> ../../../docs_src/query_params_str_validations/tutorial006_an.py!}
     ```
 
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
 
     !!! tip "Подсказка"
         Рекомендуется использовать версию с `Annotated` если возможно.
@@ -414,13 +414,13 @@ q: Union[str, None] = None
     {!> ../../../docs_src/query_params_str_validations/tutorial006b_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="8"
     {!> ../../../docs_src/query_params_str_validations/tutorial006b_an.py!}
     ```
 
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
 
     !!! tip "Подсказка"
         Рекомендуется использовать версию с `Annotated` если возможно.
@@ -454,7 +454,7 @@ q: Union[str, None] = None
     {!> ../../../docs_src/query_params_str_validations/tutorial006c_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10"
     {!> ../../../docs_src/query_params_str_validations/tutorial006c_an.py!}
@@ -469,7 +469,7 @@ q: Union[str, None] = None
     {!> ../../../docs_src/query_params_str_validations/tutorial006c_py310.py!}
     ```
 
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
 
     !!! tip "Подсказка"
         Рекомендуется использовать версию с `Annotated` если возможно.
@@ -491,13 +491,13 @@ q: Union[str, None] = None
     {!> ../../../docs_src/query_params_str_validations/tutorial006d_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="2  9"
     {!> ../../../docs_src/query_params_str_validations/tutorial006d_an.py!}
     ```
 
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
 
     !!! tip "Подсказка"
         Рекомендуется использовать версию с `Annotated` если возможно.
@@ -527,7 +527,7 @@ q: Union[str, None] = None
     {!> ../../../docs_src/query_params_str_validations/tutorial011_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10"
     {!> ../../../docs_src/query_params_str_validations/tutorial011_an.py!}
@@ -551,7 +551,7 @@ q: Union[str, None] = None
     {!> ../../../docs_src/query_params_str_validations/tutorial011_py39.py!}
     ```
 
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
 
     !!! tip "Подсказка"
         Рекомендуется использовать версию с `Annotated` если возможно.
@@ -596,7 +596,7 @@ http://localhost:8000/items/?q=foo&q=bar
     {!> ../../../docs_src/query_params_str_validations/tutorial012_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10"
     {!> ../../../docs_src/query_params_str_validations/tutorial012_an.py!}
@@ -611,7 +611,7 @@ http://localhost:8000/items/?q=foo&q=bar
     {!> ../../../docs_src/query_params_str_validations/tutorial012_py39.py!}
     ```
 
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
 
     !!! tip "Подсказка"
         Рекомендуется использовать версию с `Annotated` если возможно.
@@ -647,13 +647,13 @@ http://localhost:8000/items/
     {!> ../../../docs_src/query_params_str_validations/tutorial013_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="8"
     {!> ../../../docs_src/query_params_str_validations/tutorial013_an.py!}
     ```
 
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
 
     !!! tip "Подсказка"
         Рекомендуется использовать версию с `Annotated` если возможно.
@@ -692,7 +692,7 @@ http://localhost:8000/items/
     {!> ../../../docs_src/query_params_str_validations/tutorial007_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="11"
     {!> ../../../docs_src/query_params_str_validations/tutorial007_an.py!}
@@ -707,7 +707,7 @@ http://localhost:8000/items/
     {!> ../../../docs_src/query_params_str_validations/tutorial007_py310.py!}
     ```
 
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
 
     !!! tip "Подсказка"
         Рекомендуется использовать версию с `Annotated` если возможно.
@@ -730,7 +730,7 @@ http://localhost:8000/items/
     {!> ../../../docs_src/query_params_str_validations/tutorial008_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="15"
     {!> ../../../docs_src/query_params_str_validations/tutorial008_an.py!}
@@ -745,7 +745,7 @@ http://localhost:8000/items/
     {!> ../../../docs_src/query_params_str_validations/tutorial008_py310.py!}
     ```
 
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
 
     !!! tip "Подсказка"
         Рекомендуется использовать версию с `Annotated` если возможно.
@@ -784,7 +784,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems
     {!> ../../../docs_src/query_params_str_validations/tutorial009_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10"
     {!> ../../../docs_src/query_params_str_validations/tutorial009_an.py!}
@@ -799,7 +799,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems
     {!> ../../../docs_src/query_params_str_validations/tutorial009_py310.py!}
     ```
 
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
 
     !!! tip "Подсказка"
         Рекомендуется использовать версию с `Annotated` если возможно.
@@ -828,7 +828,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems
     {!> ../../../docs_src/query_params_str_validations/tutorial010_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="20"
     {!> ../../../docs_src/query_params_str_validations/tutorial010_an.py!}
@@ -843,7 +843,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems
     {!> ../../../docs_src/query_params_str_validations/tutorial010_py310.py!}
     ```
 
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
 
     !!! tip "Подсказка"
         Рекомендуется использовать версию с `Annotated` если возможно.
@@ -872,7 +872,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems
     {!> ../../../docs_src/query_params_str_validations/tutorial014_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="11"
     {!> ../../../docs_src/query_params_str_validations/tutorial014_an.py!}
@@ -887,7 +887,7 @@ http://127.0.0.1:8000/items/?item-query=foobaritems
     {!> ../../../docs_src/query_params_str_validations/tutorial014_py310.py!}
     ```
 
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
 
     !!! tip "Подсказка"
         Рекомендуется использовать версию с `Annotated` если возможно.
index 68333ec56604cb305d8534e9d4b60d2de218dda1..6e885cb656fe46f8c691a8fc4e375250c0c19bd6 100644 (file)
@@ -69,7 +69,7 @@ http://127.0.0.1:8000/items/?skip=20
     {!> ../../../docs_src/query_params/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/query_params/tutorial002.py!}
@@ -90,7 +90,7 @@ http://127.0.0.1:8000/items/?skip=20
     {!> ../../../docs_src/query_params/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/query_params/tutorial003.py!}
@@ -143,7 +143,7 @@ http://127.0.0.1:8000/items/foo?short=yes
     {!> ../../../docs_src/query_params/tutorial004_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="8  10"
     {!> ../../../docs_src/query_params/tutorial004.py!}
@@ -209,7 +209,7 @@ http://127.0.0.1:8000/items/foo-item?needy=sooooneedy
     {!> ../../../docs_src/query_params/tutorial006_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10"
     {!> ../../../docs_src/query_params/tutorial006.py!}
index a20cf78e0a6e06f45a42eda093e6e2cd5fcc4fbb..0fc9e4eda46984317d23c3b9a857cd616e6c00c4 100644 (file)
     {!> ../../../docs_src/request_forms/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1"
     {!> ../../../docs_src/request_forms/tutorial001_an.py!}
     ```
 
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
 
     !!! tip "Подсказка"
         Рекомендуется использовать 'Annotated' версию, если это возможно.
     {!> ../../../docs_src/request_forms/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="8"
     {!> ../../../docs_src/request_forms/tutorial001_an.py!}
     ```
 
-=== "Python 3.6+ без Annotated"
+=== "Python 3.8+ без Annotated"
 
     !!! tip "Подсказка"
         Рекомендуется использовать 'Annotated' версию, если это возможно.
index c5e111790dcb3dd91c3460b1b3d49a717368e3b0..38b45e2a574b2befb36f7fe00e9f90b8233ba3f0 100644 (file)
@@ -16,7 +16,7 @@ FastAPI позволяет использовать **аннотации тип
     {!> ../../../docs_src/response_model/tutorial001_01_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="18  23"
     {!> ../../../docs_src/response_model/tutorial001_01.py!}
@@ -65,7 +65,7 @@ FastAPI будет использовать этот возвращаемый т
     {!> ../../../docs_src/response_model/tutorial001_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="17  22  24-27"
     {!> ../../../docs_src/response_model/tutorial001.py!}
@@ -101,7 +101,7 @@ FastAPI будет использовать значение `response_model` д
     {!> ../../../docs_src/response_model/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9  11"
     {!> ../../../docs_src/response_model/tutorial002.py!}
@@ -120,7 +120,7 @@ FastAPI будет использовать значение `response_model` д
     {!> ../../../docs_src/response_model/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="18"
     {!> ../../../docs_src/response_model/tutorial002.py!}
@@ -145,7 +145,7 @@ FastAPI будет использовать значение `response_model` д
     {!> ../../../docs_src/response_model/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9  11  16"
     {!> ../../../docs_src/response_model/tutorial003.py!}
@@ -159,7 +159,7 @@ FastAPI будет использовать значение `response_model` д
     {!> ../../../docs_src/response_model/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="24"
     {!> ../../../docs_src/response_model/tutorial003.py!}
@@ -173,7 +173,7 @@ FastAPI будет использовать значение `response_model` д
     {!> ../../../docs_src/response_model/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="22"
     {!> ../../../docs_src/response_model/tutorial003.py!}
@@ -207,7 +207,7 @@ FastAPI будет использовать значение `response_model` д
     {!> ../../../docs_src/response_model/tutorial003_01_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9-13  15-16  20"
     {!> ../../../docs_src/response_model/tutorial003_01.py!}
@@ -283,7 +283,7 @@ FastAPI совместно с Pydantic выполнит некоторую ма
     {!> ../../../docs_src/response_model/tutorial003_04_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10"
     {!> ../../../docs_src/response_model/tutorial003_04.py!}
@@ -305,7 +305,7 @@ FastAPI совместно с Pydantic выполнит некоторую ма
     {!> ../../../docs_src/response_model/tutorial003_05_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/response_model/tutorial003_05.py!}
@@ -329,7 +329,7 @@ FastAPI совместно с Pydantic выполнит некоторую ма
     {!> ../../../docs_src/response_model/tutorial004_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="11  13-14"
     {!> ../../../docs_src/response_model/tutorial004.py!}
@@ -359,7 +359,7 @@ FastAPI совместно с Pydantic выполнит некоторую ма
     {!> ../../../docs_src/response_model/tutorial004_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="24"
     {!> ../../../docs_src/response_model/tutorial004.py!}
@@ -446,7 +446,7 @@ FastAPI достаточно умен (на самом деле, это засл
     {!> ../../../docs_src/response_model/tutorial005_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="31  37"
     {!> ../../../docs_src/response_model/tutorial005.py!}
@@ -467,7 +467,7 @@ FastAPI достаточно умен (на самом деле, это засл
     {!> ../../../docs_src/response_model/tutorial006_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="31  37"
     {!> ../../../docs_src/response_model/tutorial006.py!}
index a0363b9ba7a681a07bbe561ab13444896f872eec..a13ab59354c49d5bf1f8906b01113ec4ea0e4534 100644 (file)
@@ -14,7 +14,7 @@
     {!> ../../../docs_src/schema_extra_example/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="15-23"
     {!> ../../../docs_src/schema_extra_example/tutorial001.py!}
@@ -39,7 +39,7 @@
     {!> ../../../docs_src/schema_extra_example/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="4  10-13"
     {!> ../../../docs_src/schema_extra_example/tutorial002.py!}
@@ -78,7 +78,7 @@
     {!> ../../../docs_src/schema_extra_example/tutorial003_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="23-28"
     {!> ../../../docs_src/schema_extra_example/tutorial003_an.py!}
@@ -93,7 +93,7 @@
     {!> ../../../docs_src/schema_extra_example/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip Заметка
         Рекомендуется использовать версию с `Annotated`, если это возможно.
     {!> ../../../docs_src/schema_extra_example/tutorial004_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="24-50"
     {!> ../../../docs_src/schema_extra_example/tutorial004_an.py!}
     {!> ../../../docs_src/schema_extra_example/tutorial004_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip Заметка
         Рекомендуется использовать версию с `Annotated`, если это возможно.
index 3f9005112390c59033efa0a2925fef9ebfa57753..ca47a6f51e0bd5a30e7dc365ddb15d3e576d00ef 100644 (file)
     {!> ../../../docs_src/app_testing/app_b_an_py39/main.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python
     {!> ../../../docs_src/app_testing/app_b_an/main.py!}
     {!> ../../../docs_src/app_testing/app_b_py310/main.py!}
     ```
 
-=== "Python 3.6+  без Annotated"
+=== "Python 3.8+  без Annotated"
 
     !!! tip "Подсказка"
         По возможности используйте версию с `Annotated`.
index f8220fb58f66bf3ed9c25049c6dee30e5cc57650..8b143ffe7b170c61046a3c2d5e34f8cd90cbc060 100644 (file)
@@ -27,7 +27,7 @@ OpenAPI standartlarına dayalı olan bir framework olarak, geliştiricilerin bir
 
 ### Sadece modern Python
 
-Tamamiyle standartlar **Python 3.6**'nın type hintlerine dayanıyor (Pydantic'in sayesinde). Yeni bir syntax öğrenmene gerek yok. Sadece modern Python.
+Tamamiyle standartlar **Python 3.8**'nın type hintlerine dayanıyor (Pydantic'in sayesinde). Yeni bir syntax öğrenmene gerek yok. Sadece modern Python.
 
 
 Eğer Python type hintlerini bilmiyorsan veya bir hatırlatmaya ihtiyacın var ise(FastAPI kullanmasan bile) şu iki dakikalık küçük bilgilendirici içeriğe bir göz at: [Python Types](python-types.md){.internal-link target=_blank}.
index e74efbc2fa48fc8e6ef5c4c07acfd0ea1e5ecefd..e61f5b82cdfdffea6f8526bc4621f9bd8e28a9af 100644 (file)
@@ -24,7 +24,7 @@
 
 ---
 
-FastAPI, Python 3.6+'nın standart type hintlerine dayanan modern ve hızlı (yüksek performanslı) API'lar oluşturmak için kullanılabilecek web framework'ü.
+FastAPI, Python 3.8+'nın standart type hintlerine dayanan modern ve hızlı (yüksek performanslı) API'lar oluşturmak için kullanılabilecek web framework'ü.
 
 Ana özellikleri:
 
@@ -115,7 +115,7 @@ Eğer API yerine <abbr title="Command Line Interface">komut satırı uygulaması
 
 ## Gereksinimler
 
-Python 3.7+
+Python 3.8+
 
 FastAPI iki devin omuzları üstünde duruyor:
 
@@ -331,7 +331,7 @@ Type-hinting işlemini Python dilindeki standart veri tipleri ile yapabilirsin
 
 Yeni bir syntax'e alışmana gerek yok, metodlar ve classlar zaten spesifik kütüphanelere ait.
 
-Sadece standart **Python 3.6+**.
+Sadece standart **Python 3.8+**.
 
 Örnek olarak, `int` tanımlamak için:
 
index f792e83a8c267927d3a83736c85677d0414062ad..6c8e2901688edf8f9228b20b19f3331c26aedb4f 100644 (file)
@@ -164,7 +164,7 @@ John Doe
 
 Наприклад, давайте визначимо змінну, яка буде `list` із `str`.
 
-=== "Python 3.6 і вище"
+=== "Python 3.8 і вище"
 
     З модуля `typing`, імпортуємо `List` (з великої літери `L`):
 
@@ -218,7 +218,7 @@ John Doe
 
 Ви повинні зробити те ж саме, щоб оголосити `tuple` і `set`:
 
-=== "Python 3.6 і вище"
+=== "Python 3.8 і вище"
 
     ```Python hl_lines="1  4"
     {!> ../../../docs_src/python_types/tutorial007.py!}
@@ -243,7 +243,7 @@ John Doe
 
 Другий параметр типу для значення у `dict`:
 
-=== "Python 3.6 і вище"
+=== "Python 3.8 і вище"
 
     ```Python hl_lines="1  4"
     {!> ../../../docs_src/python_types/tutorial008.py!}
@@ -269,7 +269,7 @@ John Doe
 
 У Python 3.10 також є **альтернативний синтаксис**, у якому ви можете розділити можливі типи за допомогою <abbr title='також називають «побітовим "або" оператором», але це значення тут не актуальне'>вертикальної смуги (`|`)</abbr>.
 
-=== "Python 3.6 і вище"
+=== "Python 3.8 і вище"
 
     ```Python hl_lines="1  4"
     {!> ../../../docs_src/python_types/tutorial008b.py!}
@@ -299,13 +299,13 @@ John Doe
 
 Це також означає, що в Python 3.10 ви можете використовувати `Something | None`:
 
-=== "Python 3.6 і вище"
+=== "Python 3.8 і вище"
 
     ```Python hl_lines="1  4"
     {!> ../../../docs_src/python_types/tutorial009.py!}
     ```
 
-=== "Python 3.6 і вище - альтернатива"
+=== "Python 3.8 і вище - альтернатива"
 
     ```Python hl_lines="1  4"
     {!> ../../../docs_src/python_types/tutorial009b.py!}
@@ -321,7 +321,7 @@ John Doe
 
 Ці типи, які приймають параметри типу у квадратних дужках, називаються **Generic types** or **Generics**, наприклад:
 
-=== "Python 3.6 і вище"
+=== "Python 3.8 і вище"
 
     * `List`
     * `Tuple`
@@ -340,7 +340,7 @@ John Doe
     * `set`
     * `dict`
 
-    І те саме, що й у Python 3.6, із модуля `typing`:
+    І те саме, що й у Python 3.8, із модуля `typing`:
 
     * `Union`
     * `Optional`
@@ -355,10 +355,10 @@ John Doe
     * `set`
     * `dict`
 
-    І те саме, що й у Python 3.6, із модуля `typing`:
+    І те саме, що й у Python 3.8, із модуля `typing`:
 
     * `Union`
-    * `Optional` (так само як у Python 3.6)
+    * `Optional` (так само як у Python 3.8)
     * ...та інші.
 
     У Python 3.10, як альтернатива використанню `Union` та `Optional`, ви можете використовувати <abbr title='також називають «побітовим "або" оператором», але це значення тут не актуальне'>вертикальну смугу (`|`)</abbr> щоб оголосити об'єднання типів.
@@ -397,7 +397,7 @@ John Doe
 
 Приклад з документації Pydantic:
 
-=== "Python 3.6 і вище"
+=== "Python 3.8 і вище"
 
     ```Python
     {!> ../../../docs_src/python_types/tutorial011.py!}
index e78c5de0e3cf2f84b0b8f34bed4cf072b5f63836..9759e7f45046bebdb92ce9b1b070e3991603087e 100644 (file)
@@ -19,7 +19,7 @@
 
 Спочатку вам потрібно імпортувати `BaseModel` з `pydantic`:
 
-=== "Python 3.6 і вище"
+=== "Python 3.8 і вище"
 
     ```Python hl_lines="4"
     {!> ../../../docs_src/body/tutorial001.py!}
@@ -37,7 +37,7 @@
 
 Використовуйте стандартні типи Python для всіх атрибутів:
 
-=== "Python 3.6 і вище"
+=== "Python 3.8 і вище"
 
     ```Python hl_lines="7-11"
     {!> ../../../docs_src/body/tutorial001.py!}
@@ -75,7 +75,7 @@
 
 Щоб додати модель даних до вашої *операції шляху*, оголосіть її так само, як ви оголосили параметри шляху та запиту:
 
-=== "Python 3.6 і вище"
+=== "Python 3.8 і вище"
 
     ```Python hl_lines="18"
     {!> ../../../docs_src/body/tutorial001.py!}
 
 Усередині функції ви можете отримати прямий доступ до всіх атрибутів об’єкта моделі:
 
-=== "Python 3.6 і вище"
+=== "Python 3.8 і вище"
 
     ```Python hl_lines="21"
     {!> ../../../docs_src/body/tutorial002.py!}
 
 **FastAPI** розпізнає, що параметри функції, які відповідають параметрам шляху, мають бути **взяті з шляху**, а параметри функції, які оголошуються як моделі Pydantic, **взяті з тіла запиту**.
 
-=== "Python 3.6 і вище"
+=== "Python 3.8 і вище"
 
     ```Python hl_lines="17-18"
     {!> ../../../docs_src/body/tutorial003.py!}
 
 **FastAPI** розпізнає кожен з них і візьме дані з потрібного місця.
 
-=== "Python 3.6 і вище"
+=== "Python 3.8 і вище"
 
     ```Python hl_lines="18"
     {!> ../../../docs_src/body/tutorial004.py!}
index 2b0e8993c6254facf10f6b9b91846bce9ba4f4bc..199b938397bc4c85cd8d9bcd1df04ade962a7e01 100644 (file)
@@ -18,7 +18,7 @@
     {!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="3"
     {!> ../../../docs_src/cookie_params/tutorial001_an.py!}
@@ -33,7 +33,7 @@
     {!> ../../../docs_src/cookie_params/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Бажано використовувати `Annotated` версію, якщо це можливо.
@@ -60,7 +60,7 @@
     {!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10"
     {!> ../../../docs_src/cookie_params/tutorial001_an.py!}
@@ -75,7 +75,7 @@
     {!> ../../../docs_src/cookie_params/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Бажано використовувати `Annotated` версію, якщо це можливо.
index d660447b43bba1122ea6747a7d4c44c662ce9757..b6583341f3df30b6bd8af542b027803d6a772fbc 100644 (file)
@@ -26,7 +26,7 @@
     {!> ../../../docs_src/encoder/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="5  22"
     {!> ../../../docs_src/encoder/tutorial001.py!}
index ba75ee627efd193ce96e87decb96d932f148f57d..ec5ec0d18fa217a89c4fae332266cc193462d43a 100644 (file)
@@ -67,7 +67,7 @@
     {!> ../../../docs_src/extra_data_types/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1  3  13-17"
     {!> ../../../docs_src/extra_data_types/tutorial001_an.py!}
@@ -82,7 +82,7 @@
     {!> ../../../docs_src/extra_data_types/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Бажано використовувати `Annotated` версію, якщо це можливо.
     {!> ../../../docs_src/extra_data_types/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="19-20"
     {!> ../../../docs_src/extra_data_types/tutorial001_an.py!}
     {!> ../../../docs_src/extra_data_types/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Бажано використовувати `Annotated` версію, якщо це можливо.
index 0599530e8c00af2f1ac52fb00fc5907da2dd210b..306aeb35950f32e70f717344c34418d6961f1798 100644 (file)
@@ -26,7 +26,7 @@ Tài liệu tương tác API và web giao diện người dùng. Là một frame
 
 ### Chỉ cần phiên bản Python hiện đại
 
-Tất cả được dựa trên khai báo kiểu dữ liệu chuẩn của **Python 3.6** (cảm ơn Pydantic). Bạn không cần học cú pháp mới, chỉ cần biết chuẩn Python hiện đại.
+Tất cả được dựa trên khai báo kiểu dữ liệu chuẩn của **Python 3.8** (cảm ơn Pydantic). Bạn không cần học cú pháp mới, chỉ cần biết chuẩn Python hiện đại.
 
 Nếu bạn cần 2 phút để làm mới lại cách sử dụng các kiểu dữ liệu mới của Python (thậm chí nếu bạn không sử dụng FastAPI), xem hướng dẫn ngắn: [Kiểu dữ liệu Python](python-types.md){.internal-link target=_blank}.
 
index 0e773a01103345001fca5a930934444093ccb484..3f416dbece9335844e340aa68b0b6c19b633c492 100644 (file)
@@ -27,7 +27,7 @@
 
 ---
 
-FastAPI là một web framework hiện đại, hiệu năng cao để xây dựng web APIs với Python 3.7+ dựa trên tiêu chuẩn Python type hints.
+FastAPI là một web framework hiện đại, hiệu năng cao để xây dựng web APIs với Python 3.8+ dựa trên tiêu chuẩn Python type hints.
 
 Những tính năng như:
 
@@ -116,7 +116,7 @@ Nếu bạn đang xây dựng một <abbr title="Giao diện dòng lệnh">CLI</
 
 ## Yêu cầu
 
-Python 3.7+
+Python 3.8+
 
 FastAPI đứng trên vai những người khổng lồ:
 
@@ -332,7 +332,7 @@ Bạn định nghĩa bằng cách sử dụng các kiểu dữ liệu chuẩn c
 
 Bạn không phải học một cú pháp mới, các phương thức và class của một thư viện cụ thể nào.
 
-Chỉ cần sử dụng các chuẩn của **Python 3.7+**.
+Chỉ cần sử dụng các chuẩn của **Python 3.8+**.
 
 Ví dụ, với một tham số kiểu `int`:
 
index 7f4f51131f513130011763b1bc4b13e0f7d40d51..4999caac3496bc68e23d77426ee0d074407a4548 100644 (file)
@@ -182,7 +182,7 @@ Ví dụ, hãy định nghĩa một biến là `list` các `str`.
     {!> ../../../docs_src/python_types/tutorial006_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     Từ `typing`, import `List` (với chữ cái `L` viết hoa):
 
@@ -230,7 +230,7 @@ Bạn sẽ làm điều tương tự để khai báo các `tuple` và  các `set
     {!> ../../../docs_src/python_types/tutorial007_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1  4"
     {!> ../../../docs_src/python_types/tutorial007.py!}
@@ -255,7 +255,7 @@ Tham số kiểu dữ liệu thứ hai dành cho giá trị của `dict`.
     {!> ../../../docs_src/python_types/tutorial008_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1  4"
     {!> ../../../docs_src/python_types/tutorial008.py!}
@@ -284,7 +284,7 @@ Trong Python 3.10 cũng có một **cú pháp mới** mà bạn có thể đặt
     {!> ../../../docs_src/python_types/tutorial008b_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1  4"
     {!> ../../../docs_src/python_types/tutorial008b.py!}
@@ -314,13 +314,13 @@ Sử dụng `Optional[str]` thay cho `str` sẽ cho phép trình soạn thảo g
     {!> ../../../docs_src/python_types/tutorial009_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1  4"
     {!> ../../../docs_src/python_types/tutorial009.py!}
     ```
 
-=== "Python 3.6+ alternative"
+=== "Python 3.8+ alternative"
 
     ```Python hl_lines="1  4"
     {!> ../../../docs_src/python_types/tutorial009b.py!}
@@ -404,7 +404,7 @@ Những kiểu dữ liệu này lấy tham số kiểu dữ liệu trong dấu n
     * `Optional`
     * ...and others.
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     * `List`
     * `Tuple`
@@ -464,7 +464,7 @@ Một ví dụ từ tài liệu chính thức của Pydantic:
     {!> ../../../docs_src/python_types/tutorial011_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python
     {!> ../../../docs_src/python_types/tutorial011.py!}
@@ -493,7 +493,7 @@ Python cũng có một tính năng cho phép đặt **metadata bổ sung** trong
     {!> ../../../docs_src/python_types/tutorial013_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     Ở phiên bản dưới Python 3.9, bạn import `Annotated` từ `typing_extensions`.
 
index ca75a6b1346b6a3f62cc9c41b626f1556ab304ea..101e13b6b512096f6d320ed82e92a264110306ac 100644 (file)
@@ -27,7 +27,7 @@
 
 ---
 
-FastAPI jẹ́ ìgbàlódé, tí ó yára (iṣẹ-giga), ìlànà wẹ́ẹ́bù fún kikọ àwọn API pẹ̀lú Python 3.7+ èyí tí ó da lori àwọn ìtọ́kasí àmì irúfẹ́ Python.
+FastAPI jẹ́ ìgbàlódé, tí ó yára (iṣẹ-giga), ìlànà wẹ́ẹ́bù fún kikọ àwọn API pẹ̀lú Python 3.8+ èyí tí ó da lori àwọn ìtọ́kasí àmì irúfẹ́ Python.
 
 Àwọn ẹya pàtàkì ni:
 
@@ -115,7 +115,7 @@ Ti o ba n kọ ohun èlò <abbr title="Command Line Interface">CLI</abbr> láti
 
 ## Èròjà
 
-Python 3.7+
+Python 3.8+
 
 FastAPI dúró lórí àwọn èjìká tí àwọn òmíràn:
 
@@ -331,7 +331,7 @@ O ṣe ìyẹn pẹ̀lú irúfẹ́ àmì ìtọ́kasí ìgbàlódé Python.
 
 O ò nílò láti kọ́ síńtáàsì tuntun, ìlànà tàbí ọ̀wọ́ kíláàsì kan pàtó, abbl (i.e. àti bẹbẹ lọ).
 
-Ìtọ́kasí **Python 3.7+**
+Ìtọ́kasí **Python 3.8+**
 
 Fún àpẹẹrẹ, fún `int`:
 
index f3a58c062811d9c066d4c5e2c583f43895d415c8..e222e479c805ed6631cb6d2ca4f5e8c8c9fb1877 100644 (file)
@@ -22,7 +22,7 @@
     {!> ../../../docs_src/generate_clients/tutorial001_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9-11  14-15  18  19  23"
     {!> ../../../docs_src/generate_clients/tutorial001.py!}
@@ -134,7 +134,7 @@ frontend-app@1.0.0 generate-client /home/user/code/frontend-app
     {!> ../../../docs_src/generate_clients/tutorial002_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="23  28  36"
     {!> ../../../docs_src/generate_clients/tutorial002.py!}
@@ -191,7 +191,7 @@ FastAPI为每个*路径操作*使用一个**唯一ID**,它用于**操作ID**
     {!> ../../../docs_src/generate_clients/tutorial003_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="8-9  12"
     {!> ../../../docs_src/generate_clients/tutorial003.py!}
index 597e99a7793c3c3ec3fded31d14860d09f948e7a..7f718acefbbacb60ade614dcb65337fc88da0070 100644 (file)
@@ -223,13 +223,13 @@ $ ADMIN_EMAIL="deadpool@example.com" APP_NAME="ChimichangApp"uvicorn main:app
     {!> ../../../docs_src/settings/app02_an_py39/main.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="6  12-13"
     {!> ../../../docs_src/settings/app02_an/main.py!}
     ```
 
-=== "Python 3.6+ 非注解版本"
+=== "Python 3.8+ 非注解版本"
 
     !!! tip
         如果可能,请尽量使用 `Annotated` 版本。
@@ -251,13 +251,13 @@ $ ADMIN_EMAIL="deadpool@example.com" APP_NAME="ChimichangApp"uvicorn main:app
     {!> ../../../docs_src/settings/app02_an_py39/main.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="17  19-21"
     {!> ../../../docs_src/settings/app02_an/main.py!}
     ```
 
-=== "Python 3.6+ 非注解版本"
+=== "Python 3.8+ 非注解版本"
 
     !!! tip
         如果可能,请尽量使用 `Annotated` 版本。
@@ -345,13 +345,13 @@ def get_settings():
     {!> ../../../docs_src/settings/app03_an_py39/main.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1  11"
     {!> ../../../docs_src/settings/app03_an/main.py!}
     ```
 
-=== "Python 3.6+ 非注解版本"
+=== "Python 3.8+ 非注解版本"
 
     !!! tip
         如果可能,请尽量使用 `Annotated` 版本。
index a723487fdfcb402d95d319cfb0db579daa26b3ec..a5cbdd96516c4c94afd8552a40348d53ebef9fa7 100644 (file)
@@ -118,7 +118,7 @@ $ uvicorn main:app --reload
     {!> ../../../docs_src/websockets/tutorial002_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="69-70  83"
     {!> ../../../docs_src/websockets/tutorial002_an.py!}
@@ -133,7 +133,7 @@ $ uvicorn main:app --reload
     {!> ../../../docs_src/websockets/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+ 非带注解版本"
+=== "Python 3.8+ 非带注解版本"
 
     !!! tip
         如果可能,请尽量使用 `Annotated` 版本。
@@ -181,7 +181,7 @@ $ uvicorn main:app --reload
     {!> ../../../docs_src/websockets/tutorial003_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="81-83"
     {!> ../../../docs_src/websockets/tutorial003.py!}
index 1de2a8d36d09a4a83c7df41bdee23973c2a3b947..d776e58134ca2e6ccfe2efa9fd95ec2265f52de1 100644 (file)
@@ -24,7 +24,7 @@
 
 ---
 
-FastAPI 是一个用于构建 API 的现代、快速(高性能)的 web 框架,使用 Python 3.6+ 并基于标准的 Python 类型提示。
+FastAPI 是一个用于构建 API 的现代、快速(高性能)的 web 框架,使用 Python 3.8+ 并基于标准的 Python 类型提示。
 
 关键特性:
 
@@ -107,7 +107,7 @@ FastAPI 是一个用于构建 API 的现代、快速(高性能)的 web 框
 
 ## 依赖
 
-Python 3.6 及更高版本
+Python 3.8 及更高版本
 
 FastAPI 站在以下巨人的肩膀之上:
 
@@ -323,7 +323,7 @@ def update_item(item_id: int, item: Item):
 
 你不需要去学习新的语法、了解特定库的方法或类,等等。
 
-只需要使用标准的 **Python 3.6 及更高版本**。
+只需要使用标准的 **Python 3.8 及更高版本**。
 
 举个例子,比如声明 `int` 类型:
 
index c8568298b14bf042fc5a10d702cefc411159ae1e..94b75d4fddf0836e9c806f958a112dff6c513dcf 100644 (file)
@@ -69,7 +69,7 @@
     {!> ../../../docs_src/background_tasks/tutorial002_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="14  16  23  26"
     {!> ../../../docs_src/background_tasks/tutorial002_an.py!}
@@ -84,7 +84,7 @@
     {!> ../../../docs_src/background_tasks/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+ 没Annotated"
+=== "Python 3.8+ 没Annotated"
 
     !!! tip
          尽可能选择使用 `Annotated` 的版本。
index c153784dcd6181edb5160fba2aaa8072dad3e2d0..fb6c6d9b6a45eb59332c6f923900adc998d3c0b3 100644 (file)
@@ -18,7 +18,7 @@
     {!> ../../../docs_src/body_fields/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="4"
     {!> ../../../docs_src/body_fields/tutorial001_an.py!}
@@ -33,7 +33,7 @@
     {!> ../../../docs_src/body_fields/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         尽可能选择使用 `Annotated` 的版本。
@@ -61,7 +61,7 @@
     {!> ../../../docs_src/body_fields/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="12-15"
     {!> ../../../docs_src/body_fields/tutorial001_an.py!}
@@ -76,7 +76,7 @@
     {!> ../../../docs_src/body_fields/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index ee2cba6df7ca98040b5102641f3688b92e149206..c93ef2f5cebc02c3facff2a98da00449f563db79 100644 (file)
@@ -20,7 +20,7 @@
     {!> ../../../docs_src/body_multiple_params/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="19-21"
     {!> ../../../docs_src/body_multiple_params/tutorial001_an.py!}
@@ -35,7 +35,7 @@
     {!> ../../../docs_src/body_multiple_params/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         尽可能选择使用 `Annotated` 的版本。
@@ -68,7 +68,7 @@
     {!> ../../../docs_src/body_multiple_params/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="22"
     {!> ../../../docs_src/body_multiple_params/tutorial002.py!}
     {!> ../../../docs_src/body_multiple_params/tutorial003_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="24"
     {!> ../../../docs_src/body_multiple_params/tutorial003_an.py!}
     {!> ../../../docs_src/body_multiple_params/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         尽可能选择使用 `Annotated` 的版本。
@@ -193,7 +193,7 @@ q: str = None
     {!> ../../../docs_src/body_multiple_params/tutorial004_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="28"
     {!> ../../../docs_src/body_multiple_params/tutorial004_an.py!}
@@ -208,7 +208,7 @@ q: str = None
     {!> ../../../docs_src/body_multiple_params/tutorial004_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         尽可能选择使用 `Annotated` 的版本。
@@ -247,7 +247,7 @@ item: Item = Body(embed=True)
     {!> ../../../docs_src/body_multiple_params/tutorial005_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="18"
     {!> ../../../docs_src/body_multiple_params/tutorial005_an.py!}
@@ -262,7 +262,7 @@ item: Item = Body(embed=True)
     {!> ../../../docs_src/body_multiple_params/tutorial005_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         尽可能选择使用 `Annotated` 的版本。
index 7704d26248c06f6950a6ea382597a89ac715a3e2..c65308bef74bae9ac195d172cf0b14561334a62b 100644 (file)
@@ -12,7 +12,7 @@
     {!> ../../../docs_src/body_nested_models/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="14"
     {!> ../../../docs_src/body_nested_models/tutorial001.py!}
@@ -63,7 +63,7 @@ my_list: List[str]
     {!> ../../../docs_src/body_nested_models/tutorial002_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="14"
     {!> ../../../docs_src/body_nested_models/tutorial002.py!}
@@ -89,7 +89,7 @@ Python 具有一种特殊的数据类型来保存一组唯一的元素,即 `se
     {!> ../../../docs_src/body_nested_models/tutorial003_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1  14"
     {!> ../../../docs_src/body_nested_models/tutorial003.py!}
@@ -127,7 +127,7 @@ Pydantic 模型的每个属性都具有类型。
     {!> ../../../docs_src/body_nested_models/tutorial004_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9-11"
     {!> ../../../docs_src/body_nested_models/tutorial004.py!}
@@ -149,7 +149,7 @@ Pydantic 模型的每个属性都具有类型。
     {!> ../../../docs_src/body_nested_models/tutorial004_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="20"
     {!> ../../../docs_src/body_nested_models/tutorial004.py!}
@@ -198,7 +198,7 @@ Pydantic 模型的每个属性都具有类型。
     {!> ../../../docs_src/body_nested_models/tutorial005_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="4  10"
     {!> ../../../docs_src/body_nested_models/tutorial005.py!}
@@ -222,7 +222,7 @@ Pydantic 模型的每个属性都具有类型。
     {!> ../../../docs_src/body_nested_models/tutorial006_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="20"
     {!> ../../../docs_src/body_nested_models/tutorial006.py!}
@@ -273,7 +273,7 @@ Pydantic 模型的每个属性都具有类型。
     {!> ../../../docs_src/body_nested_models/tutorial007_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9  14  20  23  27"
     {!> ../../../docs_src/body_nested_models/tutorial007.py!}
@@ -298,7 +298,7 @@ images: List[Image]
     {!> ../../../docs_src/body_nested_models/tutorial008_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="15"
     {!> ../../../docs_src/body_nested_models/tutorial008.py!}
@@ -338,7 +338,7 @@ images: List[Image]
     {!> ../../../docs_src/body_nested_models/tutorial009_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/body_nested_models/tutorial009.py!}
index d00c96dc3a81ca715e70b8d3e16793356a9e069f..5cf53c0c289d67c03e7efd32169bb1b503249924 100644 (file)
@@ -23,7 +23,7 @@
     {!> ../../../docs_src/body/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="4"
     {!> ../../../docs_src/body/tutorial001.py!}
@@ -41,7 +41,7 @@
     {!> ../../../docs_src/body/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="7-11"
     {!> ../../../docs_src/body/tutorial001.py!}
@@ -79,7 +79,7 @@
     {!> ../../../docs_src/body/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="18"
     {!> ../../../docs_src/body/tutorial001.py!}
@@ -142,7 +142,7 @@ Pydantic 本身甚至也进行了一些更改以支持此功能。
     {!> ../../../docs_src/body/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="21"
     {!> ../../../docs_src/body/tutorial002.py!}
@@ -160,7 +160,7 @@ Pydantic 本身甚至也进行了一些更改以支持此功能。
     {!> ../../../docs_src/body/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="17-18"
     {!> ../../../docs_src/body/tutorial003.py!}
@@ -178,7 +178,7 @@ Pydantic 本身甚至也进行了一些更改以支持此功能。
     {!> ../../../docs_src/body/tutorial004_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="18"
     {!> ../../../docs_src/body/tutorial004.py!}
index 470fd8e825a0c623f334cbaf64287a2ceb58eaef..f115f9677b0eac05a2b9fb0446d71e4adbd4d837 100644 (file)
@@ -18,7 +18,7 @@
     {!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="3"
     {!> ../../../docs_src/cookie_params/tutorial001_an.py!}
@@ -33,7 +33,7 @@
     {!> ../../../docs_src/cookie_params/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         尽可能选择使用 `Annotated` 的版本。
@@ -61,7 +61,7 @@
     {!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10"
     {!> ../../../docs_src/cookie_params/tutorial001_an.py!}
@@ -76,7 +76,7 @@
     {!> ../../../docs_src/cookie_params/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         尽可能选择使用 `Annotated` 的版本。
index f404820df0119f698434f423fc2b416f8e1d1736..1866da29842b50c29ec8a2bc797dc9c3ceab11bb 100644 (file)
@@ -12,7 +12,7 @@
     {!> ../../../docs_src/dependencies/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/dependencies/tutorial001.py!}
@@ -85,7 +85,7 @@ fluffy = Cat(name="Mr Fluffy")
     {!> ../../../docs_src/dependencies/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="11-15"
     {!> ../../../docs_src/dependencies/tutorial002.py!}
index 76ed846ce35e4ce9c252861f7aa86e0fba92086e..859ebc2e87cc70d8e7f6b015cb7d4f20b9c2f8a0 100644 (file)
@@ -26,7 +26,7 @@
     {!> ../../../docs_src/encoder/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="5  22"
     {!> ../../../docs_src/encoder/tutorial001.py!}
index 76d606903a1d9b475054697a72a74c26b9187d59..a74efa61be48cf913a77620b5593c672d0c3168a 100644 (file)
@@ -67,7 +67,7 @@
     {!> ../../../docs_src/extra_data_types/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1  3  13-17"
     {!> ../../../docs_src/extra_data_types/tutorial001_an.py!}
@@ -82,7 +82,7 @@
     {!> ../../../docs_src/extra_data_types/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         尽可能选择使用 `Annotated` 的版本。
     {!> ../../../docs_src/extra_data_types/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="19-20"
     {!> ../../../docs_src/extra_data_types/tutorial001_an.py!}
     {!> ../../../docs_src/extra_data_types/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         尽可能选择使用 `Annotated` 的版本。
index 32f8f9df127f5a2724fb73665555a6af1af14ca3..06427a73d43ab0f7fb0b4156e76c88f6aabee752 100644 (file)
@@ -23,7 +23,7 @@
     {!> ../../../docs_src/extra_models/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9  11  16  22  24  29-30  33-35  40-41"
     {!> ../../../docs_src/extra_models/tutorial001.py!}
@@ -164,7 +164,7 @@ UserInDB(
     {!> ../../../docs_src/extra_models/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9  15-16  19-20  23-24"
     {!> ../../../docs_src/extra_models/tutorial002.py!}
@@ -188,7 +188,7 @@ UserInDB(
     {!> ../../../docs_src/extra_models/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1  14-15  18-20  33"
     {!> ../../../docs_src/extra_models/tutorial003.py!}
@@ -206,7 +206,7 @@ UserInDB(
     {!> ../../../docs_src/extra_models/tutorial004_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1  20"
     {!> ../../../docs_src/extra_models/tutorial004.py!}
@@ -226,7 +226,7 @@ UserInDB(
     {!> ../../../docs_src/extra_models/tutorial005_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="1  8"
     {!> ../../../docs_src/extra_models/tutorial005.py!}
index 22ff6dc27049f3e3f1e52a3415f7811018ef527d..2701167b320909bf2e95e8a8d96b2952e0aef7b6 100644 (file)
@@ -18,7 +18,7 @@
     {!> ../../../docs_src/header_params/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="3"
     {!> ../../../docs_src/header_params/tutorial001_an.py!}
@@ -33,7 +33,7 @@
     {!> ../../../docs_src/header_params/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         尽可能选择使用 `Annotated` 的版本。
@@ -60,7 +60,7 @@
     {!> ../../../docs_src/header_params/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10"
     {!> ../../../docs_src/header_params/tutorial001_an.py!}
@@ -75,7 +75,7 @@
     {!> ../../../docs_src/header_params/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         尽可能选择使用 `Annotated` 的版本。
     {!> ../../../docs_src/header_params/tutorial002_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="12"
     {!> ../../../docs_src/header_params/tutorial002_an.py!}
     {!> ../../../docs_src/header_params/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         尽可能选择使用 `Annotated` 的版本。
     {!> ../../../docs_src/header_params/tutorial003_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10"
     {!> ../../../docs_src/header_params/tutorial003_an.py!}
     {!> ../../../docs_src/header_params/tutorial003_py39.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         尽可能选择使用 `Annotated` 的版本。
index 78fa922b49ee758378c560741ac6e50010de2ca5..9b41ad7cf4f183df4b2d93c19b30fa60d6ecfbcd 100644 (file)
@@ -18,7 +18,7 @@
     {!> ../../../docs_src/path_params_numeric_validations/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="3-4"
     {!> ../../../docs_src/path_params_numeric_validations/tutorial001_an.py!}
@@ -33,7 +33,7 @@
     {!> ../../../docs_src/path_params_numeric_validations/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         尽可能选择使用 `Annotated` 的版本。
@@ -60,7 +60,7 @@
     {!> ../../../docs_src/path_params_numeric_validations/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="11"
     {!> ../../../docs_src/path_params_numeric_validations/tutorial001_an.py!}
@@ -75,7 +75,7 @@
     {!> ../../../docs_src/path_params_numeric_validations/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         尽可能选择使用 `Annotated` 的版本。
 
 因此,你可以将函数声明为:
 
-=== "Python 3.6 non-Annotated"
+=== "Python 3.8 non-Annotated"
 
     !!! tip
         尽可能选择使用 `Annotated` 的版本。
index 7244aeadef272bedede83c07b30320fe48d139f8..39253eb0d48b13f3d465a16527f6d15a6b6e84de 100644 (file)
@@ -10,7 +10,7 @@
     {!> ../../../docs_src/query_params_str_validations/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/query_params_str_validations/tutorial001.py!}
index 03474907ee94b52b2fafeb3a38d7588f4137f7c5..2c48f33cac855d39bde61c0a289ec70baf199d4a 100644 (file)
@@ -130,7 +130,7 @@ contents = myfile.file.read()
     {!> ../../../docs_src/request_files/tutorial001_02_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9  17"
     {!> ../../../docs_src/request_files/tutorial001_02.py!}
@@ -158,7 +158,7 @@ FastAPI 支持同时上传多个文件。
     {!> ../../../docs_src/request_files/tutorial002_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="10  15"
     {!> ../../../docs_src/request_files/tutorial002.py!}
@@ -183,7 +183,7 @@ FastAPI 支持同时上传多个文件。
     {!> ../../../docs_src/request_files/tutorial003_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="18"
     {!> ../../../docs_src/request_files/tutorial003.py!}
index f529cb0d8b19527433bee5cf2351272587a1fa7a..e731b6989e491376071971ca01cd112f151c8a7c 100644 (file)
@@ -20,7 +20,7 @@
     {!> ../../../docs_src/response_model/tutorial001_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="17  22  24-27"
     {!> ../../../docs_src/response_model/tutorial001.py!}
@@ -78,7 +78,7 @@ FastAPI 将使用此 `response_model` 来:
     {!> ../../../docs_src/response_model/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9  11  16"
     {!> ../../../docs_src/response_model/tutorial003.py!}
@@ -92,7 +92,7 @@ FastAPI 将使用此 `response_model` 来:
     {!> ../../../docs_src/response_model/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="24"
     {!> ../../../docs_src/response_model/tutorial003.py!}
@@ -106,7 +106,7 @@ FastAPI 将使用此 `response_model` 来:
     {!> ../../../docs_src/response_model/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="22"
     {!> ../../../docs_src/response_model/tutorial003.py!}
index 816e8f68efbc415971be2114f4157a10c16ac437..ebc04da8b481a94ed9fcec4f716b538667438d43 100644 (file)
@@ -16,7 +16,7 @@
     {!> ../../../docs_src/schema_extra_example/tutorial001_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="15-23"
     {!> ../../../docs_src/schema_extra_example/tutorial001.py!}
@@ -34,7 +34,7 @@
     {!> ../../../docs_src/schema_extra_example/tutorial002_py310.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="4  10-13"
     {!> ../../../docs_src/schema_extra_example/tutorial002.py!}
@@ -61,7 +61,7 @@
     {!> ../../../docs_src/schema_extra_example/tutorial003_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="23-28"
     {!> ../../../docs_src/schema_extra_example/tutorial003_an.py!}
@@ -76,7 +76,7 @@
     {!> ../../../docs_src/schema_extra_example/tutorial003_py310.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         尽可能选择使用 `Annotated` 的版本。
index 7b1052e12aa8c24f9976dee9e837b0770d266247..dda95641777c368963c9b6582e514bece027f54e 100644 (file)
     {!> ../../../docs_src/security/tutorial001_an_py39.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python
     {!> ../../../docs_src/security/tutorial001_an.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         尽可能选择使用 `Annotated` 的版本。
index 482588f94d7ec3630b8a12670d47d0d14f61431d..8b09dc6771a8ffb58e1c54b0ea59e6cd2238fb2e 100644 (file)
@@ -258,7 +258,7 @@ connect_args={"check_same_thread": False}
     {!> ../../../docs_src/sql_databases/sql_app_py39/schemas.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="3  6-8  11-12  23-24  27-28"
     {!> ../../../docs_src/sql_databases/sql_app/schemas.py!}
@@ -302,7 +302,7 @@ name: str
     {!> ../../../docs_src/sql_databases/sql_app_py39/schemas.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="15-17  31-34"
     {!> ../../../docs_src/sql_databases/sql_app/schemas.py!}
@@ -331,7 +331,7 @@ name: str
     {!> ../../../docs_src/sql_databases/sql_app_py39/schemas.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="15  19-20  31  36-37"
     {!> ../../../docs_src/sql_databases/sql_app/schemas.py!}
@@ -471,7 +471,7 @@ current_user.items
     {!> ../../../docs_src/sql_databases/sql_app_py39/main.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="9"
     {!> ../../../docs_src/sql_databases/sql_app/main.py!}
@@ -505,7 +505,7 @@ current_user.items
     {!> ../../../docs_src/sql_databases/sql_app_py39/main.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="15-20"
     {!> ../../../docs_src/sql_databases/sql_app/main.py!}
@@ -530,7 +530,7 @@ current_user.items
     {!> ../../../docs_src/sql_databases/sql_app_py39/main.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="24  32  38  47  53"
     {!> ../../../docs_src/sql_databases/sql_app/main.py!}
@@ -551,7 +551,7 @@ current_user.items
     {!> ../../../docs_src/sql_databases/sql_app_py39/main.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="23-28  31-34  37-42  45-49  52-55"
     {!> ../../../docs_src/sql_databases/sql_app/main.py!}
@@ -650,7 +650,7 @@ def read_user(user_id: int, db: Session = Depends(get_db)):
     {!> ../../../docs_src/sql_databases/sql_app_py39/schemas.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python
     {!> ../../../docs_src/sql_databases/sql_app/schemas.py!}
@@ -670,7 +670,7 @@ def read_user(user_id: int, db: Session = Depends(get_db)):
     {!> ../../../docs_src/sql_databases/sql_app_py39/main.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python
     {!> ../../../docs_src/sql_databases/sql_app/main.py!}
@@ -729,7 +729,7 @@ $ uvicorn sql_app.main:app --reload
     {!> ../../../docs_src/sql_databases/sql_app_py39/alt_main.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python hl_lines="14-22"
     {!> ../../../docs_src/sql_databases/sql_app/alt_main.py!}
index 41f01f8d84a412aa43303cc753d2a9c4ef448a7e..77fff759642f9412fcec61d8b1b7f7209d49f9bd 100644 (file)
     {!> ../../../docs_src/app_testing/app_b_an_py39/main.py!}
     ```
 
-=== "Python 3.6+"
+=== "Python 3.8+"
 
     ```Python
     {!> ../../../docs_src/app_testing/app_b_an/main.py!}
     {!> ../../../docs_src/app_testing/app_b_py310/main.py!}
     ```
 
-=== "Python 3.6+ non-Annotated"
+=== "Python 3.8+ non-Annotated"
 
     !!! tip
         Prefer to use the `Annotated` version if possible.
index 2870b31a5334d84cc3c50e3add9371857f16039c..b49f472d5e2d7a4e265d8d1882a8c42a55ef51e5 100644 (file)
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
 name = "fastapi"
 description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production"
 readme = "README.md"
-requires-python = ">=3.7"
+requires-python = ">=3.8"
 license = "MIT"
 authors = [
     { name = "Sebastián Ramírez", email = "tiangolo@gmail.com" },
@@ -32,7 +32,6 @@ classifiers = [
     "Intended Audience :: Developers",
     "License :: OSI Approved :: MIT License",
     "Programming Language :: Python :: 3 :: Only",
-    "Programming Language :: Python :: 3.7",
     "Programming Language :: Python :: 3.8",
     "Programming Language :: Python :: 3.9",
     "Programming Language :: Python :: 3.10",