Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1501 - 1510 of 1,992 for Fastapi (0.39 sec)

  1. tests/test_dependency_overrides.py

    from typing import Optional
    
    import pytest
    from fastapi import APIRouter, Depends, FastAPI
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    router = APIRouter()
    
    
    async def common_parameters(q: str, skip: int = 0, limit: int = 100):
        return {"q": q, "skip": skip, "limit": limit}
    
    
    @app.get("/main-depends/")
    async def main_depends(commons: dict = Depends(common_parameters)):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 11.2K bytes
    - Viewed (0)
  2. tests/test_openapi_examples.py

    from typing import Union
    
    from fastapi import Body, Cookie, FastAPI, Header, Path, Query
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        data: str
    
    
    @app.post("/examples/")
    def examples(
        item: Item = Body(
            examples=[
                {"data": "Data in Body examples, example1"},
            ],
            openapi_examples={
                "Example One": {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  3. tests/test_infer_param_optionality.py

    from typing import Optional
    
    from fastapi import APIRouter, FastAPI
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    user_router = APIRouter()
    item_router = APIRouter()
    
    
    @user_router.get("/")
    def get_users():
        return [{"user_id": "u1"}, {"user_id": "u2"}]
    
    
    @user_router.get("/{user_id}")
    def get_user(user_id: str):
        return {"user_id": user_id}
    
    
    @item_router.get("/")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 12.1K bytes
    - Viewed (0)
  4. docs/ko/docs/how-to/configure-swagger-ui.md

    구성을 하려면, `FastAPI()` 앱 객체를 생성할 때 또는 `get_swagger_ui_html()` 함수에 `swagger_ui_parameters` 인수를 전달하십시오.
    
    `swagger_ui_parameters`는 Swagger UI에 직접 전달된 구성을 포함하는 딕셔너리를 받습니다.
    
    FastAPI는 이 구성을 **JSON** 형식으로 변환하여 JavaScript와 호환되도록 합니다. 이는 Swagger UI에서 필요로 하는 형식입니다.
    
    ## 구문 강조 비활성화
    
    예를 들어, Swagger UI에서 구문 강조 기능을 비활성화할 수 있습니다.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Dec 09 12:25:19 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_header_param_models/test_tutorial001.py

    import importlib
    
    import pytest
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    from tests.utils import needs_py310
    
    
    @pytest.fixture(
        name="client",
        params=[
            pytest.param("tutorial001_py39"),
            pytest.param("tutorial001_py310", marks=needs_py310),
            pytest.param("tutorial001_an_py39"),
            pytest.param("tutorial001_an_py310", marks=needs_py310),
        ],
    )
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 7.3K bytes
    - Viewed (0)
  6. fastapi/logger.py

    import logging
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Dec 09 19:02:44 UTC 2019
    - 54 bytes
    - Viewed (0)
  7. docs/ja/docs/deployment/docker.md

    * <a href="https://github.com/tiangolo/uvicorn-gunicorn-fastapi-docker" class="external-link" target="_blank">tiangolo/uvicorn-gunicorn-fastapi</a>.
    
    /// warning
    
    このベースイメージや類似のイメージは**必要ない**可能性が高いので、[上記の: FastAPI用のDockerイメージをビルドする(Build a Docker Image for FastAPI)](#build-a-docker-image-for-fastapi)のようにゼロからイメージをビルドする方が良いでしょう。
    
    ///
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Aug 12 21:47:53 UTC 2024
    - 44.3K bytes
    - Viewed (0)
  8. docs/ko/docs/python-types.md

    ///
    
    **FastAPI**는 모두 Pydantic을 기반으로 되어 있습니다.
    
    이 모든 것이 실제로 어떻게 사용되는지에 대해서는 [자습서 - 사용자 안내서](tutorial/index.md){.internal-link target=_blank} 에서 더 많이 확인하실 수 있습니다.
    
    ## **FastAPI**에서의 타입 힌트
    
    **FastAPI**는 여러 부분에서 타입 힌트의 장점을 취하고 있습니다.
    
    **FastAPI**에서 타입 힌트와 함께 매개변수를 선언하면 장점은:
    
    * **에디터 도움**.
    * **타입 확인**.
    
    ...그리고 **FastAPI**는 같은 정의를 아래에도 적용합니다:
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  9. docs/ja/docs/deployment/server-workers.md

    DockerやKubernetesなどのコンテナを使用している場合は、次の章で詳しく説明します: [コンテナ内のFastAPI - Docker](docker.md){.internal-link target=_blank}
    
    特に**Kubernetes**上で実行する場合は、おそらく**Gunicornを使用せず**、**コンテナごとに単一のUvicornプロセス**を実行することになりますが、それについてはこの章の後半で説明します。
    
    ///
    
    ## GunicornによるUvicornのワーカー・プロセスの管理
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  10. docs/pt/docs/tutorial/encoder.md

    Existem alguns casos em que você pode precisar converter um tipo de dados (como um modelo Pydantic) para algo compatível com JSON (como um `dict`, `list`, etc).
    
    Por exemplo, se você precisar armazená-lo em um banco de dados.
    
    Para isso, **FastAPI** fornece uma função `jsonable_encoder()`.
    
    ## Usando a função `jsonable_encoder` { #using-the-jsonable-encoder }
    
    Vamos imaginar que você tenha um banco de dados `fake_db` que recebe apenas dados compatíveis com JSON.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Nov 12 16:23:57 UTC 2025
    - 1.8K bytes
    - Viewed (0)
Back to top