Search Options

Results per page
Sort
Preferred Languages
Advance

Results 181 - 190 of 877 for tutorial002 (0.08 sec)

  1. docs/em/docs/tutorial/response-model.md

    {!> ../../docs_src/response_model/tutorial003.py!}
    ```
    
    ////
    
    //// tab | 🐍 3️⃣.1️⃣0️⃣ & 🔛
    
    ```Python hl_lines="9  11  16"
    {!> ../../docs_src/response_model/tutorial003_py310.py!}
    ```
    
    ////
    
    📥, ✋️ 👆 *➡ 🛠️ 🔢* 🛬 🎏 🔢 👩‍💻 👈 🔌 🔐:
    
    //// tab | 🐍 3️⃣.6️⃣ & 🔛
    
    ```Python hl_lines="24"
    {!> ../../docs_src/response_model/tutorial003.py!}
    ```
    
    ////
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_custom_docs_ui/test_tutorial002.py

    
    @pytest.fixture(scope="module")
    def client():
        static_dir: Path = Path(os.getcwd()) / "static"
        print(static_dir)
        static_dir.mkdir(exist_ok=True)
        from docs_src.custom_docs_ui.tutorial002 import app
    
        with TestClient(app) as client:
            yield client
        static_dir.rmdir()
    
    
    def test_swagger_ui_html(client: TestClient):
        response = client.get("/docs")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Aug 19 19:54:04 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  3. docs/pt/docs/tutorial/cookie-param-models.md

    ////
    
    //// tab | Python 3.8+ non-Annotated
    
    /// tip | Dica
    
    Prefira utilizar a versão `Annotated` se possível.
    
    ///
    
    ```Python hl_lines="10"
    {!> ../../docs_src/cookie_param_models/tutorial002.py!}
    ```
    
    ////
    
    Se o cliente tentar enviar alguns **cookies extras**, eles receberão um retorno de **erro**.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon Oct 07 20:18:07 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  4. docs/de/docs/tutorial/path-params.md

    ```Python hl_lines="17"
    {!../../docs_src/path_params/tutorial005.py!}
    ```
    
    #### *Enum-Wert* erhalten
    
    Den tatsächlichen Wert (in diesem Fall ein `str`) erhalten Sie via `model_name.value`, oder generell, `ihr_enum_member.value`:
    
    ```Python hl_lines="20"
    {!../../docs_src/path_params/tutorial005.py!}
    ```
    
    /// tip | "Tipp"
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  5. docs/zh/docs/advanced/response-cookies.md

    # 响应Cookies
    
    ## 使用 `Response` 参数
    
    你可以在 *路径函数* 中定义一个类型为 `Response`的参数,这样你就可以在这个临时响应对象中设置cookie了。
    
    ```Python hl_lines="1  8-9"
    {!../../docs_src/response_cookies/tutorial002.py!}
    ```
    
    而且你还可以根据你的需要响应不同的对象,比如常用的 `dict`,数据库model等。
    
    如果你定义了 `response_model`,程序会自动根据`response_model`来过滤和转换你响应的对象。
    
    **FastAPI** 会使用这个 *临时* 响应对象去装在这些cookies信息 (同样还有headers和状态码等信息), 最终会将这些信息和通过`response_model`转化过的数据合并到最终的响应里。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  6. docs/pt/docs/tutorial/request-form-models.md

    ```
    
    ////
    
    //// tab | Python 3.8+ non-Annotated
    
    /// tip
    
    Prefira utilizar a versão `Annotated` se possível.
    
    ///
    
    ```Python hl_lines="10"
    {!> ../../docs_src/request_form_models/tutorial002.py!}
    ```
    
    ////
    
    Caso um cliente tente enviar informações adicionais, ele receberá um retorno de **erro**.
    
    Por exemplo, se o cliente tentar enviar os campos de formulário:
    
    * `username`: `Rick`
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  7. docs/pt/docs/how-to/configure-swagger-ui.md

    ```Python hl_lines="3"
    {!../../docs_src/configure_swagger_ui/tutorial002.py!}
    ```
    
    Essa configuração alteraria o tema de cores de destaque de sintaxe:
    
    <img src="/img/tutorial/extending-openapi/image04.png">
    
    ## Alterar parâmetros de UI padrão do Swagger
    
    O FastAPI inclui alguns parâmetros de configuração padrão apropriados para a maioria dos casos de uso.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/response-status-code.md

    Let's see the previous example again:
    
    {* ../../docs_src/response_status_code/tutorial001.py hl[6] *}
    
    `201` is the status code for "Created".
    
    But you don't have to memorize what each of these codes mean.
    
    You can use the convenience variables from `fastapi.status`.
    
    {* ../../docs_src/response_status_code/tutorial002.py hl[1,6] *}
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon Oct 28 11:13:18 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  9. docs/zh/docs/tutorial/path-params-numeric-validations.md

    ```Python hl_lines="7"
    {!../../docs_src/path_params_numeric_validations/tutorial003.py!}
    ```
    
    ## 数值校验:大于等于
    
    使用 `Query` 和 `Path`(以及你将在后面看到的其他类)可以声明字符串约束,但也可以声明数值约束。
    
    像下面这样,添加 `ge=1` 后,`item_id` 将必须是一个大于(`g`reater than)或等于(`e`qual)`1` 的整数。
    
    ```Python hl_lines="8"
    {!../../docs_src/path_params_numeric_validations/tutorial004.py!}
    ```
    
    ## 数值校验:大于和小于等于
    
    同样的规则适用于:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  10. docs/pt/docs/tutorial/header-params.md

    //// tab | Python 3.10+
    
    ```Python hl_lines="8"
    {!> ../../docs_src/header_params/tutorial002_py310.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    
    ```Python hl_lines="10"
    {!> ../../docs_src/header_params/tutorial002.py!}
    ```
    
    ////
    
    /// warning | "Aviso"
    
    Antes de definir `convert_underscores` como `False`, lembre-se de que alguns proxies e servidores HTTP não permitem o uso de cabeçalhos com sublinhados.
    
    ///
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3.9K bytes
    - Viewed (0)
Back to top