Search Options

Results per page
Sort
Preferred Languages
Advance

Results 291 - 300 of 877 for tutorial002 (0.21 sec)

  1. docs/pt/docs/tutorial/body.md

    ```Python hl_lines="4"
    {!../../docs_src/body/tutorial001.py!}
    ```
    
    ## Crie seu modelo de dados
    
    Então você declara seu modelo de dados como uma classe que herda `BaseModel`.
    
    Utilize os tipos Python padrão para todos os atributos:
    
    ```Python hl_lines="7-11"
    {!../../docs_src/body/tutorial001.py!}
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  2. docs/ko/docs/tutorial/metadata.md

    ```Python hl_lines="3-16  18"
    {!../../docs_src/metadata/tutorial004.py!}
    ```
    
    설명 안에 마크다운을 사용할 수 있습니다. 예를 들어 "login"은 굵게(**login**) 표시되고, "fancy"는 기울임꼴(_fancy_)로 표시됩니다.
    
    /// tip
    
    사용 중인 모든 태그에 메타데이터를 추가할 필요는 없습니다.
    
    ///
    
    ### 태그 사용
    
    `tags` 매개변수를 *경로 작동* 및 `APIRouter`와 함께 사용하여 태그에 할당할 수 있습니다:
    
    ```Python hl_lines="21  26"
    {!../../docs_src/metadata/tutorial004.py!}
    ```
    
    /// info
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Oct 29 10:36:06 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  3. docs/de/docs/advanced/additional-responses.md

    ```Python hl_lines="19-24  28"
    {!../../docs_src/additional_responses/tutorial002.py!}
    ```
    
    /// note | "Hinweis"
    
    Beachten Sie, dass Sie das Bild direkt mit einer `FileResponse` zurückgeben müssen.
    
    ///
    
    /// info
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  4. docs/en/docs/advanced/additional-responses.md

    For example, you can add an additional media type of `image/png`, declaring that your *path operation* can return a JSON object (with media type `application/json`) or a PNG image:
    
    {* ../../docs_src/additional_responses/tutorial002.py hl[19:24,28] *}
    
    /// note
    
    Notice that you have to return the image using a `FileResponse` directly.
    
    ///
    
    /// info
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 16:07:07 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  5. docs/pt/docs/tutorial/query-param-models.md

    ////
    
    //// tab | Python 3.8+ non-Annotated
    
    /// tip | Dica
    
    Prefira utilizar a versão `Annotated` se possível.
    
    ///
    
    ```Python hl_lines="11"
    {!> ../../docs_src/query_param_models/tutorial002.py!}
    ```
    
    ////
    
    Caso um cliente tente enviar alguns dados **extras** nos **parâmetros de consulta**, eles receberão um retorno de **erro**.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Oct 15 09:53:14 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  6. docs/ko/docs/python-types.md

    간단한 예제부터 시작해봅시다:
    
    ```Python
    {!../../docs_src/python_types/tutorial001.py!}
    ```
    
    이 프로그램을 실행한 결과값:
    
    ```
    John Doe
    ```
    
    함수는 아래와 같이 실행됩니다:
    
    * `first_name`과 `last_name`를 받습니다.
    * `title()`로 각 첫 문자를 대문자로 변환시킵니다.
    * 두 단어를 중간에 공백을 두고 <abbr title="두 개를 하나로 차례차례 이어지게 하다">연결</abbr>합니다.
    
    ```Python hl_lines="2"
    {!../../docs_src/python_types/tutorial001.py!}
    ```
    
    ### 코드 수정
    
    이건 매우 간단한 프로그램입니다.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  7. docs/zh/docs/tutorial/handling-errors.md

    ```Python hl_lines="14"
    {!../../docs_src/handling_errors/tutorial002.py!}
    
    ```
    
    ## 安装自定义异常处理器
    
    添加自定义处理器,要使用 [Starlette 的异常工具](https://www.starlette.io/exceptions/)。
    
    假设要触发的自定义异常叫作 `UnicornException`。
    
    且需要 FastAPI 实现全局处理该异常。
    
    此时,可以用 `@app.exception_handler()` 添加自定义异常控制器:
    
    ```Python hl_lines="5-7  13-18  24"
    {!../../docs_src/handling_errors/tutorial003.py!}
    
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  8. docs/pt/docs/advanced/behind-a-proxy.md

    Alternativamente, se você não tiver uma maneira de fornecer uma opção de linha de comando como `--root-path` ou equivalente, você pode definir o parâmetro `--root-path` ao criar sua aplicação FastAPI:
    
    {* ../../docs_src/behind_a_proxy/tutorial002.py hl[3] *}
    
    Passar o `root_path`h para `FastAPI` seria o equivalente a passar a opção de linha de comando `--root-path` para Uvicorn ou Hypercorn.
    
    ### Sobre `root_path`
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 15:28:18 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  9. docs/zh/docs/python-types.md

    ## 动机
    
    让我们从一个简单的例子开始:
    
    ```Python
    {!../../docs_src/python_types/tutorial001.py!}
    ```
    
    运行这段程序将输出:
    
    ```
    John Doe
    ```
    
    这个函数做了下面这些事情:
    
    * 接收 `first_name` 和 `last_name` 参数。
    * 通过 `title()` 将每个参数的第一个字母转换为大写形式。
    * 中间用一个空格来<abbr title="将它们按顺序放置组合成一个整体。">拼接</abbr>它们。
    
    ```Python hl_lines="2"
    {!../../docs_src/python_types/tutorial001.py!}
    ```
    
    ### 修改示例
    
    这是一个非常简单的程序。
    
    现在假设你将从头开始编写这段程序。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  10. docs/fr/docs/tutorial/path-params.md

    ```Python hl_lines="17"
    {!../../docs_src/path_params/tutorial005.py!}
    ```
    
    #### Récupérer la *valeur de l'énumération*
    
    Vous pouvez obtenir la valeur réel d'un membre (une chaîne de caractères ici), avec `model_name.value`, ou en général, `votre_membre_d'enum.value` :
    
    ```Python hl_lines="20"
    {!../../docs_src/path_params/tutorial005.py!}
    ```
    
    /// tip | "Astuce"
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10K bytes
    - Viewed (0)
Back to top