Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1751 - 1760 of 2,000 for Fastapi (0.06 sec)

  1. tests/test_tutorial/test_security/test_tutorial005_an_py39.py

    import pytest
    from dirty_equals import IsDict, IsOneOf
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.security.tutorial005_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    def get_access_token(
        *, username="johndoe", password="secret", scope=None, client: TestClient
    ):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Mar 13 19:07:10 UTC 2024
    - 16.3K bytes
    - Viewed (0)
  2. docs/zh/docs/tutorial/body-nested-models.md

    ```
    
    ////
    
    这意味着 **FastAPI** 将期望类似于以下内容的请求体:
    
    ```JSON
    {
        "name": "Foo",
        "description": "The pretender",
        "price": 42.0,
        "tax": 3.2,
        "tags": ["rock", "metal", "bar"],
        "image": {
            "url": "http://example.com/baz.jpg",
            "name": "The Foo live"
        }
    }
    ```
    
    再一次,仅仅进行这样的声明,你将通过 **FastAPI** 获得:
    
    * 对被嵌入的模型也适用的编辑器支持(自动补全等)
    * 数据转换
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  3. docs/pt/docs/how-to/index.md

    Se algo parecer interessante e útil para o seu projeto, vá em frente e dê uma olhada. Caso contrário, você pode simplesmente ignorá-lo.
    
    /// tip
    
    Se você deseja **aprender FastAPI** de forma estruturada (recomendado), leia capítulo por capítulo [Tutorial - Guia de Usuário](../tutorial/index.md){.internal-link target=_blank} em vez disso.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 668 bytes
    - Viewed (0)
  4. docs/de/docs/tutorial/dependencies/global-dependencies.md

    Ähnlich wie Sie [`dependencies` zu den *Pfadoperation-Dekoratoren* hinzufügen](dependencies-in-path-operation-decorators.md){.internal-link target=_blank} können, können Sie sie auch zur `FastAPI`-Anwendung hinzufügen.
    
    In diesem Fall werden sie auf alle *Pfadoperationen* in der Anwendung angewendet:
    
    //// tab | Python 3.9+
    
    ```Python hl_lines="16"
    {!> ../../docs_src/dependencies/tutorial012_an_py39.py!}
    ```
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  5. tests/test_response_model_as_return_annotation.py

    from typing import List, Union
    
    import pytest
    from fastapi import FastAPI
    from fastapi.exceptions import FastAPIError, ResponseValidationError
    from fastapi.responses import JSONResponse, Response
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    
    class BaseUser(BaseModel):
        name: str
    
    
    class User(BaseUser):
        surname: str
    
    
    class DBUser(User):
        password_hash: str
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon Aug 14 09:49:57 UTC 2023
    - 47.7K bytes
    - Viewed (0)
  6. docs/ko/docs/tutorial/header-params.md

    ```Python hl_lines="9"
    {!../../docs_src/header_params/tutorial001.py!}
    ```
    
    /// note | "기술 세부사항"
    
    `Header`는 `Path`, `Query` 및 `Cookie`의 "자매"클래스입니다. 이 역시 동일한 공통 `Param` 클래스를 상속합니다.
    
    `Query`, `Path`, `Header` 그리고 다른 것들을 `fastapi`에서 임포트 할 때, 이들은 실제로 특별한 클래스를 반환하는 함수임을 기억하세요.
    
    ///
    
    /// info | "정보"
    
    헤더를 선언하기 위해서 `Header`를 사용해야 합니다. 그렇지 않으면 해당 매개변수를 쿼리 매개변수로 해석하기 때문입니다.
    
    ///
    
    ## 자동 변환
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  7. docs_src/bigger_applications/app_an/routers/items.py

    from fastapi import APIRouter, Depends, HTTPException
    
    from ..dependencies import get_token_header
    
    router = APIRouter(
        prefix="/items",
        tags=["items"],
        dependencies=[Depends(get_token_header)],
        responses={404: {"description": "Not found"}},
    )
    
    
    fake_items_db = {"plumbus": {"name": "Plumbus"}, "gun": {"name": "Portal Gun"}}
    
    
    @router.get("/")
    async def read_items():
        return fake_items_db
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 1011 bytes
    - Viewed (0)
  8. tests/test_tutorial/test_templates/test_tutorial001.py

    import os
    import shutil
    
    from fastapi.testclient import TestClient
    
    
    def test_main():
        if os.path.isdir("./static"):  # pragma: nocover
            shutil.rmtree("./static")
        if os.path.isdir("./templates"):  # pragma: nocover
            shutil.rmtree("./templates")
        shutil.copytree("./docs_src/templates/templates/", "./templates")
        shutil.copytree("./docs_src/templates/static/", "./static")
        from docs_src.templates.tutorial001 import app
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Jan 11 22:25:37 UTC 2024
    - 910 bytes
    - Viewed (0)
  9. docs/en/docs/deployment/https.md

    program/HTTP server** running on the server (the machine, host, etc.) and **managing all the HTTPS parts**: receiving the **encrypted HTTPS requests**, sending the **decrypted HTTP requests** to the actual HTTP application running in the same server (the **FastAPI** application, in this case), take the **HTTP response** from the application, **encrypt it** using the appropriate **HTTPS certificate** and sending it back to the client using **HTTPS**. This server is often called a **<a href="https://en.wikip...
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 12K bytes
    - Viewed (0)
  10. docs/es/docs/advanced/response-change-status-code.md

    Y si declaraste un `response_model`, aún se usará para filtrar y convertir el objeto que retornaste.
    
    **FastAPI** usará esa respuesta *temporal* para extraer el código de estado (también cookies y headers), y los pondrá en la respuesta final que contiene el valor que retornaste, filtrado por cualquier `response_model`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.6K bytes
    - Viewed (0)
Back to top