Search Options

Results per page
Sort
Preferred Languages
Advance

Results 341 - 350 of 623 for tutorial010_py39 (0.18 sec)

  1. docs/en/docs/how-to/extending-openapi.md

    First, write all your **FastAPI** application as normally:
    
    {* ../../docs_src/extending_openapi/tutorial001_py39.py hl[1,4,7:9] *}
    
    ### Generate the OpenAPI schema { #generate-the-openapi-schema }
    
    Then, use the same utility function to generate the OpenAPI schema, inside a `custom_openapi()` function:
    
    {* ../../docs_src/extending_openapi/tutorial001_py39.py hl[2,15:21] *}
    
    ### Modify the OpenAPI schema { #modify-the-openapi-schema }
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 3.4K bytes
    - Viewed (0)
  2. docs/zh/docs/tutorial/extra-models.md

    使用同样的方式也可以声明由对象列表构成的响应。
    
    为此,请使用标准的 Python `typing.List`:
    
    {* ../../docs_src/extra_models/tutorial004_py39.py hl[18] *}
    
    ## 任意 `dict` 构成的响应
    
    任意的 `dict` 都能用于声明响应,只要声明键和值的类型,无需使用 Pydantic 模型。
    
    事先不知道可用的字段 / 属性名时(Pydantic 模型必须知道字段是什么),这种方式特别有用。
    
    此时,可以使用 `typing.Dict`:
    
    {* ../../docs_src/extra_models/tutorial005_py39.py hl[6] *}
    
    ## 小结
    
    针对不同场景,可以随意使用不同的 Pydantic 模型继承定义的基类。
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  3. docs/de/docs/tutorial/extra-models.md

    Auf die gleiche Weise können Sie Responses von Listen von Objekten deklarieren.
    
    Dafür verwenden Sie Pythons Standard-`typing.List` (oder nur `list` in Python 3.9 und höher):
    
    {* ../../docs_src/extra_models/tutorial004_py39.py hl[18] *}
    
    ## Response mit beliebigem `dict` { #response-with-arbitrary-dict }
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 24 10:28:19 UTC 2025
    - 8K bytes
    - Viewed (0)
  4. docs/ru/docs/tutorial/extra-models.md

    Таким же образом вы можете определять ответы как списки объектов.
    
    Для этого используйте `typing.List` из стандартной библиотеки Python (или просто `list` в Python 3.9 и выше):
    
    {* ../../docs_src/extra_models/tutorial004_py39.py hl[18] *}
    
    ## Ответ с произвольным `dict` { #response-with-arbitrary-dict }
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Sep 30 11:24:39 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_conditional_openapi/test_tutorial001.py

    import importlib
    
    from fastapi.testclient import TestClient
    
    
    def get_client() -> TestClient:
        from docs_src.conditional_openapi import tutorial001_py39
    
        importlib.reload(tutorial001_py39)
    
        client = TestClient(tutorial001_py39.app)
        return client
    
    
    def test_disable_openapi(monkeypatch):
        monkeypatch.setenv("OPENAPI_URL", "")
        # Load the client after setting the env var
        client = get_client()
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  6. docs/ru/docs/advanced/sub-applications.md

    {* ../../docs_src/sub_applications/tutorial001_py39.py hl[3, 6:8] *}
    
    ### Подприложение { #sub-application }
    
    Затем создайте подприложение и его *операции пути*.
    
    Это подприложение — обычное стандартное приложение FastAPI, но именно оно будет «смонтировано»:
    
    {* ../../docs_src/sub_applications/tutorial001_py39.py hl[11, 14:16] *}
    
    ### Смонтируйте подприложение { #mount-the-sub-application }
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 4.8K bytes
    - Viewed (0)
  7. docs/es/docs/how-to/extending-openapi.md

    {* ../../docs_src/extending_openapi/tutorial001_py39.py hl[1,4,7:9] *}
    
    ### Generar el esquema de OpenAPI { #generate-the-openapi-schema }
    
    Luego, usa la misma función de utilidad para generar el esquema de OpenAPI, dentro de una función `custom_openapi()`:
    
    {* ../../docs_src/extending_openapi/tutorial001_py39.py hl[2,15:21] *}
    
    ### Modificar el esquema de OpenAPI { #modify-the-openapi-schema }
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  8. docs/de/docs/how-to/extending-openapi.md

    {* ../../docs_src/extending_openapi/tutorial001_py39.py hl[1,4,7:9] *}
    
    ### Das OpenAPI-Schema generieren { #generate-the-openapi-schema }
    
    Verwenden Sie dann dieselbe Hilfsfunktion, um das OpenAPI-Schema innerhalb einer `custom_openapi()`-Funktion zu generieren:
    
    {* ../../docs_src/extending_openapi/tutorial001_py39.py hl[2,15:21] *}
    
    ### Das OpenAPI-Schema ändern { #modify-the-openapi-schema }
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 4K bytes
    - Viewed (0)
  9. docs/es/docs/advanced/additional-responses.md

    Por ejemplo, para declarar otro response con un código de estado `404` y un modelo Pydantic `Message`, puedes escribir:
    
    {* ../../docs_src/additional_responses/tutorial001_py39.py hl[18,22] *}
    
    /// note | Nota
    
    Ten en cuenta que debes devolver el `JSONResponse` directamente.
    
    ///
    
    /// info | Información
    
    La clave `model` no es parte de OpenAPI.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 9.3K bytes
    - Viewed (0)
  10. docs/de/docs/advanced/additional-responses.md

    Um beispielsweise eine weitere Response mit dem Statuscode `404` und einem Pydantic-Modell `Message` zu deklarieren, können Sie schreiben:
    
    {* ../../docs_src/additional_responses/tutorial001_py39.py hl[18,22] *}
    
    /// note | Hinweis
    
    Beachten Sie, dass Sie die `JSONResponse` direkt zurückgeben müssen.
    
    ///
    
    /// info | Info
    
    Der `model`-Schlüssel ist nicht Teil von OpenAPI.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 10K bytes
    - Viewed (0)
Back to top