Search Options

Results per page
Sort
Preferred Languages
Advance

Results 351 - 360 of 1,916 for FastApi (0.04 sec)

  1. docs_src/dependencies/tutorial005_an_py39.py

    from typing import Annotated, Union
    
    from fastapi import Cookie, Depends, FastAPI
    
    app = FastAPI()
    
    
    def query_extractor(q: Union[str, None] = None):
        return q
    
    
    def query_or_cookie_extractor(
        q: Annotated[str, Depends(query_extractor)],
        last_query: Annotated[Union[str, None], Cookie()] = None,
    ):
        if not q:
            return last_query
        return q
    
    
    @app.get("/items/")
    async def read_query(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 529 bytes
    - Viewed (0)
  2. docs_src/query_params_str_validations/tutorial008_an_py310.py

    from typing import Annotated
    
    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(
        q: Annotated[
            str | None,
            Query(
                title="Query string",
                description="Query string for the items to search in the database that have a good match",
                min_length=3,
            ),
        ] = None,
    ):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Oct 24 20:26:06 UTC 2023
    - 498 bytes
    - Viewed (0)
  3. docs/es/docs/tutorial/response-model.md

    ### Filtrado de Datos en FastAPI { #fastapi-data-filtering }
    
    Ahora, para FastAPI, verá el tipo de retorno y se asegurará de que lo que devuelves incluya **solo** los campos que están declarados en el tipo.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 17.7K bytes
    - Viewed (0)
  4. docs/de/docs/tutorial/dependencies/classes-as-dependencies.md

    Eine Python-Klasse ist also auch ein **Callable**.
    
    Darum können Sie in **FastAPI** auch eine Python-Klasse als Abhängigkeit verwenden.
    
    Was FastAPI tatsächlich prüft, ist, ob es sich um ein „Callable“ (Funktion, Klasse oder irgendetwas anderes) handelt und ob die Parameter definiert sind.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 7.6K bytes
    - Viewed (0)
  5. tests/test_starlette_urlconvertors.py

    from fastapi import FastAPI, Path, Query
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    @app.get("/int/{param:int}")
    def int_convertor(param: int = Path()):
        return {"int": param}
    
    
    @app.get("/float/{param:float}")
    def float_convertor(param: float = Path()):
        return {"float": param}
    
    
    @app.get("/path/{param:path}")
    def path_convertor(param: str = Path()):
        return {"path": param}
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sun Nov 27 14:46:06 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  6. docs/pt/docs/tutorial/request-form-models.md

    Isto é suportado desde a versão `0.113.0` do FastAPI. 🤓
    
    ///
    
    ## Modelos Pydantic para Formulários { #pydantic-models-for-forms }
    
    Você precisa apenas declarar um **modelo Pydantic** com os campos que deseja receber como **campos de formulários**, e então declarar o parâmetro como um `Form`:
    
    {* ../../docs_src/request_form_models/tutorial001_an_py39.py hl[9:11,15] *}
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Nov 12 16:23:57 UTC 2025
    - 2.5K bytes
    - Viewed (0)
  7. tests/test_additional_responses_router.py

    from fastapi import APIRouter, FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    
    class ResponseModel(BaseModel):
        message: str
    
    
    app = FastAPI()
    router = APIRouter()
    
    
    @router.get("/a", responses={501: {"description": "Error 1"}})
    async def a():
        return "a"
    
    
    @router.get(
        "/b",
        responses={
            502: {"description": "Error 2"},
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 5.1K bytes
    - Viewed (0)
  8. docs/zh-hant/docs/tutorial/first-steps.md

    而且有許多替代方案,所有這些都是基於 OpenAPI。你可以輕鬆地將任何這些替代方案添加到使用 **FastAPI** 建置的應用程式中。
    
    你也可以用它自動生成程式碼,讓前端、手機應用程式或物聯網設備等與你的 API 進行通訊。
    
    ## 逐步回顧
    
    ### 第一步:引入 `FastAPI`
    
    {* ../../docs_src/first_steps/tutorial001.py h1[1] *}
    
    `FastAPI` 是一個 Python 類別,提供所有 API 的全部功能。
    
    /// note | Technical Details
    
    `FastAPI` 是一個直接繼承自 `Starlette` 的類別。
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Oct 11 17:48:49 UTC 2025
    - 11.6K bytes
    - Viewed (0)
  9. docs/fr/docs/deployment/docker.md

    ```Dockerfile
    FROM python:3.7
    
    RUN pip install fastapi uvicorn
    
    EXPOSE 80
    
    COPY ./app /app
    
    CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]
    ```
    
    ## Créer le code **FastAPI**.
    
    * Créer un répertoire `app` et y entrer.
    * Créez un fichier `main.py` avec :
    
    ```Python
    from typing import Optional
    
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    def read_root():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Nov 09 16:39:20 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  10. docs/ru/docs/features.md

    # Возможности { #features }
    
    ## Возможности FastAPI { #fastapi-features }
    
    **FastAPI** предлагает вам следующее:
    
    ### Основано на открытых стандартах { #based-on-open-standards }
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Oct 11 17:48:49 UTC 2025
    - 16K bytes
    - Viewed (0)
Back to top