Search Options

Results per page
Sort
Preferred Languages
Advance

Results 191 - 200 of 874 for tutorial001 (0.24 sec)

  1. docs/de/docs/tutorial/handling-errors.md

    ## `HTTPException` verwenden
    
    Um HTTP-Responses mit Fehlern zum Client zurückzugeben, verwenden Sie `HTTPException`.
    
    ### `HTTPException` importieren
    
    ```Python hl_lines="1"
    {!../../docs_src/handling_errors/tutorial001.py!}
    ```
    
    ### Eine `HTTPException` in Ihrem Code auslösen
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10.6K bytes
    - Viewed (0)
  2. docs/ru/docs/tutorial/request-files.md

    ////
    
    //// tab | Python 3.6+ без Annotated
    
    /// tip | "Подсказка"
    
    Предпочтительнее использовать версию с аннотацией, если это возможно.
    
    ///
    
    ```Python hl_lines="1"
    {!> ../../docs_src/request_files/tutorial001.py!}
    ```
    
    ////
    
    ## Определите параметры `File`
    
    Создайте параметры `File` так же, как вы это делаете для `Body` или `Form`:
    
    //// tab | Python 3.9+
    
    ```Python hl_lines="9"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/handling-errors.md

    ## Use `HTTPException`
    
    To return HTTP responses with errors to the client you use `HTTPException`.
    
    ### Import `HTTPException`
    
    ```Python hl_lines="1"
    {!../../docs_src/handling_errors/tutorial001.py!}
    ```
    
    ### Raise an `HTTPException` in your code
    
    `HTTPException` is a normal Python exception with additional data relevant for APIs.
    
    Because it's a Python exception, you don't `return` it, you `raise` it.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/background-tasks.md

    {* ../../docs_src/background_tasks/tutorial001.py hl[6:9] *}
    
    ## Add the background task
    
    Inside of your *path operation function*, pass your task function to the *background tasks* object with the method `.add_task()`:
    
    {* ../../docs_src/background_tasks/tutorial001.py hl[14] *}
    
    `.add_task()` receives as arguments:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 15:22:48 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  5. docs/fa/docs/tutorial/middleware.md

        * سپس `پاسخ` تولید شده توسط *path operation* مربوطه را برمی‌گرداند.
    * شما می‌توانید سپس `پاسخ` را تغییر داده و پس از آن را برگردانید.
    
    ```Python hl_lines="8-9  11  14"
    {!../../docs_src/middleware/tutorial001.py!}
    ```
    
    /// نکته | به خاطر داشته باشید که هدرهای اختصاصی سفارشی را می توان با استفاده از پیشوند "X-" اضافه کرد.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  6. docs/de/docs/tutorial/extra-data-types.md

    ////
    
    //// tab | Python 3.8+ nicht annotiert
    
    /// tip
    
    Bevorzugen Sie die `Annotated`-Version, falls möglich.
    
    ///
    
    ```Python hl_lines="1  2  12-16"
    {!> ../../docs_src/extra_data_types/tutorial001.py!}
    ```
    
    ////
    
    Beachten Sie, dass die Parameter innerhalb der Funktion ihren natürlichen Datentyp haben und Sie beispielsweise normale Datumsmanipulationen durchführen können, wie zum Beispiel:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_advanced_middleware/test_tutorial001.py

    from fastapi.testclient import TestClient
    
    from docs_src.advanced_middleware.tutorial001 import app
    
    
    def test_middleware():
        client = TestClient(app, base_url="https://testserver")
        response = client.get("/")
        assert response.status_code == 200, response.text
    
        client = TestClient(app)
        response = client.get("/", follow_redirects=False)
        assert response.status_code == 307, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Nov 13 14:26:09 UTC 2022
    - 474 bytes
    - Viewed (0)
  8. docs/ko/docs/tutorial/cookie-params.md

    ```
    
    ////
    
    //// tab | Python 3.8+ Annotated가 없는 경우
    
    /// tip | "팁"
    
    가능하다면 `Annotated`가 달린 버전을 권장합니다.
    
    ///
    
    ```Python hl_lines="3"
    {!> ../../docs_src/cookie_params/tutorial001.py!}
    ```
    
    ////
    
    ## `Cookie` 매개변수 선언
    
    그런 다음, `Path`와 `Query`처럼 동일한 구조를 사용하는 쿠키 매개변수를 선언합니다.
    
    첫 번째 값은 기본값이며, 추가 검증이나 어노테이션 매개변수 모두 전달할 수 있습니다:
    
    //// tab | Python 3.10+
    
    ```Python hl_lines="9"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  9. docs/ru/docs/tutorial/extra-data-types.md

    ## Пример
    
    Вот пример *операции пути* с параметрами, который демонстрирует некоторые из вышеперечисленных типов.
    
    //// tab | Python 3.8 и выше
    
    ```Python hl_lines="1  3  12-16"
    {!> ../../docs_src/extra_data_types/tutorial001.py!}
    ```
    
    ////
    
    //// tab | Python 3.10 и выше
    
    ```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
    - 4.7K bytes
    - Viewed (0)
  10. docs/ja/docs/tutorial/body-fields.md

    まず、以下のようにインポートします:
    
    ```Python hl_lines="4"
    {!../../docs_src/body_fields/tutorial001.py!}
    ```
    
    /// warning | "注意"
    
    `Field`は他の全てのもの(`Query`、`Path`、`Body`など)とは違い、`fastapi`からではなく、`pydantic`から直接インポートされていることに注意してください。
    
    ///
    
    ## モデルの属性の宣言
    
    以下のように`Field`をモデルの属性として使用することができます:
    
    ```Python hl_lines="11 12 13 14"
    {!../../docs_src/body_fields/tutorial001.py!}
    ```
    
    `Field`は`Query`や`Path`、`Body`と同じように動作し、全く同様のパラメータなどを持ちます。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2.5K bytes
    - Viewed (0)
Back to top