Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1211 - 1220 of 1,977 for Fastapi (0.05 sec)

  1. docs/zh/docs/python-types.md

    ///
    
    整个 **FastAPI** 建立在 Pydantic 的基础之上。
    
    实际上你将在 [教程 - 用户指南](tutorial/index.md){.internal-link target=_blank} 看到很多这种情况。
    
    ## **FastAPI** 中的类型提示
    
    **FastAPI** 利用这些类型提示来做下面几件事。
    
    使用 **FastAPI** 时用类型提示声明参数可以获得:
    
    * **编辑器支持**。
    * **类型检查**。
    
    ...并且 **FastAPI** 还会用这些类型声明来:
    
    * **定义参数要求**:声明对请求路径参数、查询参数、请求头、请求体、依赖等的要求。
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  2. docs/ja/docs/tutorial/dependencies/classes-as-dependencies.md

    以下にある最後の`CommonQueryParams`:
    
    ```Python
    ... = Depends(CommonQueryParams)
    ```
    
    ...は、**FastAPI** が依存関係を知るために実際に使用するものです。
    
    そこからFastAPIが宣言されたパラメータを抽出し、それが実際にFastAPIが呼び出すものです。
    
    ---
    
    この場合、以下にある最初の`CommonQueryParams`:
    
    ```Python
    commons: CommonQueryParams ...
    ```
    
    ...は **FastAPI** に対して特別な意味をもちません。FastAPIはデータ変換や検証などには使用しません(それらのためには`= Depends(CommonQueryParams)`を使用しています)。
    
    実際には以下のように書けばいいだけです:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  3. docs_src/metadata/tutorial003.py

    from fastapi import FastAPI
    
    app = FastAPI(docs_url="/documentation", redoc_url=None)
    
    
    @app.get("/items/")
    async def read_items():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 02 04:55:20 UTC 2020
    - 161 bytes
    - Viewed (0)
  4. tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py

    import pytest
    from dirty_equals import IsDict
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(name="app")
    def get_app():
        from docs_src.request_forms_and_files.tutorial001 import app
    
        return app
    
    
    @pytest.fixture(name="client")
    def get_client(app: FastAPI):
        client = TestClient(app)
        return client
    
    
    def test_post_form_no_body(client: TestClient):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_request_forms_and_files/test_tutorial001_an_py39.py

    import pytest
    from dirty_equals import IsDict
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="app")
    def get_app():
        from docs_src.request_forms_and_files.tutorial001_an_py39 import app
    
        return app
    
    
    @pytest.fixture(name="client")
    def get_client(app: FastAPI):
        client = TestClient(app)
        return client
    
    
    @needs_py39
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  6. docs/fr/docs/tutorial/path-params-numeric-validations.md

    ## Importer Path
    
    Tout d'abord, importez `Path` de `fastapi`, et importez `Annotated` :
    
    {* ../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py hl[1,3] *}
    
    /// info
    
    FastAPI a ajouté le support pour `Annotated` (et a commencé à le recommander) dans la version 0.95.0.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon Oct 28 10:32:37 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  7. docs/en/docs/advanced/path-operation-advanced-configuration.md

    ```
    
    ## Advanced description from docstring
    
    You can limit the lines used from the docstring of a *path operation function* for OpenAPI.
    
    Adding an `\f` (an escaped "form feed" character) causes **FastAPI** to truncate the output used for OpenAPI at this point.
    
    It won't show up in the documentation, but other tools (such as Sphinx) will be able to use the rest.
    
    ```Python hl_lines="19-29"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  8. docs/em/docs/advanced/templates.md

    # 📄
    
    👆 💪 ⚙️ 🙆 📄 🚒 👆 💚 ⏮️ **FastAPI**.
    
    ⚠ ⚒ Jinja2️⃣, 🎏 1️⃣ ⚙️ 🏺 & 🎏 🧰.
    
    📤 🚙 🔗 ⚫️ 💪 👈 👆 💪 ⚙️ 🔗 👆 **FastAPI** 🈸 (🚚 💃).
    
    ## ❎ 🔗
    
    ❎ `jinja2`:
    
    <div class="termy">
    
    ```console
    $ pip install jinja2
    
    ---> 100%
    ```
    
    </div>
    
    ## ⚙️ `Jinja2Templates`
    
    * 🗄 `Jinja2Templates`.
    * ✍ `templates` 🎚 👈 👆 💪 🏤-⚙️ ⏪.
    * 📣 `Request` 🔢 *➡ 🛠️* 👈 🔜 📨 📄.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  9. docs/em/docs/advanced/using-request-directly.md

    # ⚙️ 📨 🔗
    
    🆙 🔜, 👆 ✔️ 📣 🍕 📨 👈 👆 💪 ⏮️ 👫 🆎.
    
    ✊ 📊 ⚪️➡️:
    
    * ➡ 🔢.
    * 🎚.
    * 🍪.
    * ♒️.
    
    &amp; 🔨, **FastAPI** ⚖ 👈 💽, 🏭 ⚫️ &amp; 🏭 🧾 👆 🛠️ 🔁.
    
    ✋️ 📤 ⚠ 🌐❔ 👆 💪 💪 🔐 `Request` 🎚 🔗.
    
    ## ℹ 🔃 `Request` 🎚
    
    **FastAPI** 🤙 **💃** 🔘, ⏮️ 🧽 📚 🧰 🔛 🔝, 👆 💪 ⚙️ 💃 <a href="https://www.starlette.io/requests/" class="external-link" target="_blank">`Request`</a> 🎚 🔗 🕐❔ 👆 💪.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  10. tests/test_response_model_sub_types.py

    from typing import List
    
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    
    class Model(BaseModel):
        name: str
    
    
    app = FastAPI()
    
    
    @app.get("/valid1", responses={"500": {"model": int}})
    def valid1():
        pass
    
    
    @app.get("/valid2", responses={"500": {"model": List[int]}})
    def valid2():
        pass
    
    
    @app.get("/valid3", responses={"500": {"model": Model}})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 5.3K bytes
    - Viewed (0)
Back to top