Search Options

Results per page
Sort
Preferred Languages
Advance

Results 211 - 220 of 874 for tutorial001 (0.13 sec)

  1. docs/pt/docs/tutorial/response-status-code.md

    ```Python hl_lines="6"
    {!../../docs_src/response_status_code/tutorial001.py!}
    ```
    
    `201` é o código de status para "Criado".
    
    Mas você não precisa memorizar o que cada um desses códigos significa.
    
    Você pode usar as variáveis de conveniência de `fastapi.status`.
    
    ```Python hl_lines="1  6"
    {!../../docs_src/response_status_code/tutorial002.py!}
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_custom_response/test_tutorial001.py

    from fastapi.testclient import TestClient
    
    from docs_src.custom_response.tutorial001 import app
    
    client = TestClient(app)
    
    
    def test_get_custom_response():
        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.json() == [{"item_id": "Foo"}]
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1K bytes
    - Viewed (0)
  3. docs/ko/docs/tutorial/request-forms-and-files.md

    ///
    
    ## `File` 및 `Form` 업로드
    
    ```Python hl_lines="1"
    {!../../docs_src/request_forms_and_files/tutorial001.py!}
    ```
    
    ## `File` 및 `Form` 매개변수 정의
    
    `Body` 및 `Query`와 동일한 방식으로 파일과 폼의 매개변수를 생성합니다:
    
    ```Python hl_lines="8"
    {!../../docs_src/request_forms_and_files/tutorial001.py!}
    ```
    
    파일과 폼 필드는 폼 데이터 형식으로 업로드되어 파일과 폼 필드로 전달됩니다.
    
    어떤 파일들은 `bytes`로, 또 어떤 파일들은 `UploadFile`로 선언할 수 있습니다.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  4. docs/ja/docs/tutorial/cookie-params.md

    ## `Cookie`をインポート
    
    まず、`Cookie`をインポートします:
    
    ```Python hl_lines="3"
    {!../../docs_src/cookie_params/tutorial001.py!}
    ```
    
    ## `Cookie`のパラメータを宣言
    
    次に、`Path`や`Query`と同じ構造を使ってクッキーのパラメータを宣言します。
    
    最初の値がデフォルト値で、追加の検証パラメータや注釈パラメータをすべて渡すことができます:
    
    ```Python hl_lines="9"
    {!../../docs_src/cookie_params/tutorial001.py!}
    ```
    
    /// note | "技術詳細"
    
    `Cookie`は`Path`と`Query`の「姉妹」クラスです。また、同じ共通の`Param`クラスを継承しています。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  5. docs/em/docs/tutorial/extra-data-types.md

    ## 🖼
    
    📥 🖼 *➡ 🛠️* ⏮️ 🔢 ⚙️ 🔛 🆎.
    
    //// tab | 🐍 3️⃣.6️⃣ & 🔛
    
    ```Python hl_lines="1  3  12-16"
    {!> ../../docs_src/extra_data_types/tutorial001.py!}
    ```
    
    ////
    
    //// tab | 🐍 3️⃣.1️⃣0️⃣ & 🔛
    
    ```Python hl_lines="1  2  11-15"
    {!> ../../docs_src/extra_data_types/tutorial001_py310.py!}
    ```
    
    ////
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_background_tasks/test_tutorial001.py

    import os
    from pathlib import Path
    
    from fastapi.testclient import TestClient
    
    from docs_src.background_tasks.tutorial001 import app
    
    client = TestClient(app)
    
    
    def test():
        log = Path("log.txt")
        if log.is_file():
            os.remove(log)  # pragma: no cover
        response = client.post("/send-notification/******@****.***")
        assert response.status_code == 200, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Jul 09 18:06:12 UTC 2020
    - 578 bytes
    - Viewed (0)
  7. docs/zh/docs/advanced/openapi-callbacks.md

    ```Python hl_lines="5  26"
    {!../../docs_src/openapi_callbacks/tutorial001.py!}
    ```
    
    ### 创建回调*路径操作*
    
    创建回调*路径操作*也使用之前创建的 `APIRouter`。
    
    它看起来和常规 FastAPI *路径操作*差不多:
    
    * 声明要接收的请求体,例如,`body: InvoiceEvent`
    * 还要声明要返回的响应,例如,`response_model=InvoiceEventReceived`
    
    ```Python hl_lines="17-19  22-23  29-33"
    {!../../docs_src/openapi_callbacks/tutorial001.py!}
    ```
    
    回调*路径操作*与常规*路径操作*有两点主要区别:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  8. docs/ru/docs/tutorial/metadata.md

    Вы можете задать их следующим образом:
    
    ```Python hl_lines="3-16  19-31"
    {!../../docs_src/metadata/tutorial001.py!}
    ```
    
    /// tip | "Подсказка"
    
    Вы можете использовать Markdown в поле `description`, и оно будет отображено в выводе.
    
    ///
    
    С этой конфигурацией автоматическая документация API будут выглядеть так:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  9. docs/em/docs/tutorial/body-nested-models.md

    ⏮️ **FastAPI**, 👆 💪 🔬, ✔, 📄, & ⚙️ 🎲 🙇 🐦 🏷 (👏 Pydantic).
    
    ## 📇 🏑
    
    👆 💪 🔬 🔢 🏾. 🖼, 🐍 `list`:
    
    //// tab | 🐍 3️⃣.6️⃣ & 🔛
    
    ```Python hl_lines="14"
    {!> ../../docs_src/body_nested_models/tutorial001.py!}
    ```
    
    ////
    
    //// tab | 🐍 3️⃣.1️⃣0️⃣ & 🔛
    
    ```Python hl_lines="12"
    {!> ../../docs_src/body_nested_models/tutorial001_py310.py!}
    ```
    
    ////
    
    👉 🔜 ⚒ `tags` 📇, 👐 ⚫️ 🚫 📣 🆎 🔣 📇.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_response_cookies/test_tutorial001.py

    from fastapi.testclient import TestClient
    
    from docs_src.response_cookies.tutorial001 import app
    
    client = TestClient(app)
    
    
    def test_path_operation():
        response = client.post("/cookie/")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Come to the dark side, we have cookies"}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Jul 09 18:06:12 UTC 2020
    - 403 bytes
    - Viewed (0)
Back to top