Search Options

Results per page
Sort
Preferred Languages
Advance

Results 861 - 870 of 1,929 for FastAPI (0.11 sec)

  1. docs_src/header_params/tutorial001_an.py

    from typing import Union
    
    from fastapi import FastAPI, Header
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(user_agent: Annotated[Union[str, None], Header()] = None):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 259 bytes
    - Viewed (0)
  2. docs/de/docs/advanced/path-operation-advanced-configuration.md

    Sie können die verwendeten Zeilen aus dem Docstring einer *Pfadoperation-Funktion* einschränken, die für OpenAPI verwendet werden.
    
    Das Hinzufügen eines `\f` (ein maskiertes „Form Feed“-Zeichen) führt dazu, dass **FastAPI** die für OpenAPI verwendete Ausgabe an dieser Stelle abschneidet.
    
    Sie wird nicht in der Dokumentation angezeigt, aber andere Tools (z. B. Sphinx) können den Rest verwenden.
    
    ```Python hl_lines="19-29"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  3. docs/ru/docs/tutorial/security/first-steps.md

    Все утилиты безопасности, интегрируемые в OpenAPI (и автоматическая документация по API), наследуются от `SecurityBase`, поэтому **FastAPI** может знать, как интегрировать их в OpenAPI.
    
    ///
    
    ## Что он делает
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  4. docs/ja/docs/tutorial/testing.md

    <a href="https://www.python-httpx.org" class="external-link" target="_blank">HTTPX</a> がベースなので、非常に使いやすく直感的です。
    
    これを使用すると、**FastAPI** と共に <a href="https://docs.pytest.org/" class="external-link" target="_blank">pytest</a> を直接利用できます。
    
    ## `TestClient` を使用
    
    `TestClient` をインポートします。
    
    `TestClient` を作成し、**FastAPI** に渡します。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  5. docs_src/request_form_models/tutorial001_an.py

    from fastapi import FastAPI, Form
    from pydantic import BaseModel
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    class FormData(BaseModel):
        username: str
        password: str
    
    
    @app.post("/login/")
    async def login(data: Annotated[FormData, Form()]):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Sep 05 15:16:50 UTC 2024
    - 278 bytes
    - Viewed (0)
  6. docs/de/docs/advanced/behind-a-proxy.md

    }
    ```
    
    ### Festlegen des `root_path` in der FastAPI-Anwendung
    
    Falls Sie keine Möglichkeit haben, eine Kommandozeilenoption wie `--root-path` oder ähnlich zu übergeben, können Sie als Alternative beim Erstellen Ihrer FastAPI-Anwendung den Parameter `root_path` setzen:
    
    ```Python hl_lines="3"
    {!../../docs_src/behind_a_proxy/tutorial002.py!}
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 13.1K bytes
    - Viewed (0)
  7. docs/zh/docs/advanced/behind-a-proxy.md

    返回的响应如下:
    
    ```JSON
    {
        "message": "Hello World",
        "root_path": "/api/v1"
    }
    ```
    
    ### 在 FastAPI 应用里设置 `root_path`
    
    还有一种方案,如果不能提供 `--root-path` 或等效的命令行选项,则在创建 FastAPI 应用时要设置 `root_path` 参数。
    
    ```Python hl_lines="3"
    {!../../docs_src/behind_a_proxy/tutorial002.py!}
    ```
    
    传递 `root_path` 给 `FastAPI` 与传递 `--root-path` 命令行选项给 Uvicorn 或 Hypercorn 一样。
    
    ### 关于 `root_path`
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  8. docs_src/header_params/tutorial003_an.py

    from typing import List, Union
    
    from fastapi import FastAPI, Header
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(x_token: Annotated[Union[List[str], None], Header()] = None):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 269 bytes
    - Viewed (0)
  9. docs_src/query_params/tutorial006_py310.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_user_item(
        item_id: str, needy: str, skip: int = 0, limit: int | None = None
    ):
        item = {"item_id": item_id, "needy": needy, "skip": skip, "limit": limit}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 269 bytes
    - Viewed (0)
  10. docs/ru/docs/tutorial/static-files.md

    {!../../docs_src/static_files/tutorial001.py!}
    ```
    
    /// note | "Технические детали"
    
    Вы также можете использовать `from starlette.staticfiles import StaticFiles`.
    
    **FastAPI** предоставляет `starlette.staticfiles` под псевдонимом `fastapi.staticfiles`, просто для вашего удобства, как разработчика. Но на самом деле это берётся напрямую из библиотеки Starlette.
    
    ///
    
    ### Что такое "Монтирование"
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3K bytes
    - Viewed (0)
Back to top