Search Options

Results per page
Sort
Preferred Languages
Advance

Results 751 - 760 of 1,992 for Fastapi (0.05 sec)

  1. tests/test_generate_unique_id_function.py

    import warnings
    
    from fastapi import APIRouter, FastAPI
    from fastapi.routing import APIRoute
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    
    def custom_generate_unique_id(route: APIRoute):
        return f"foo_{route.name}"
    
    
    def custom_generate_unique_id2(route: APIRoute):
        return f"bar_{route.name}"
    
    
    def custom_generate_unique_id3(route: APIRoute):
        return f"baz_{route.name}"
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 66.7K bytes
    - Viewed (0)
  2. tests/test_request_param_model_by_alias.py

    from dirty_equals import IsPartialDict
    from fastapi import Cookie, FastAPI, Header, Query
    from fastapi.testclient import TestClient
    from pydantic import BaseModel, Field
    
    app = FastAPI()
    
    
    class Model(BaseModel):
        param: str = Field(alias="param_alias")
    
    
    @app.get("/query")
    async def query_model(data: Model = Query()):
        return {"param": data.param}
    
    
    @app.get("/header")
    async def header_model(data: Model = Header()):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 2.1K bytes
    - Viewed (0)
  3. docs/en/docs/learn/index.md

    # Learn { #learn }
    
    Here are the introductory sections and the tutorials to learn **FastAPI**.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 206 bytes
    - Viewed (0)
  4. docs/es/docs/advanced/custom-response.md

    Y se documentará así en OpenAPI.
    
    ///
    
    /// tip | Consejo
    
    El `ORJSONResponse` solo está disponible en FastAPI, no en Starlette.
    
    ///
    
    ## Response HTML { #html-response }
    
    Para devolver un response con HTML directamente desde **FastAPI**, usa `HTMLResponse`.
    
    * Importa `HTMLResponse`.
    * Pasa `HTMLResponse` como parámetro `response_class` de tu *path operation decorator*.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 13.2K bytes
    - Viewed (0)
  5. docs/zh/docs/tutorial/sql-databases.md

    ///
    
    这是一个非常简单和简短的教程。如果您想了解一般的数据库、SQL 或更高级的功能,请查看 <a href="https://sqlmodel.tiangolo.com/" class="external-link" target="_blank">SQLModel 文档</a>。
    
    ## 安装 `SQLModel`
    
    首先,确保您创建并激活了[虚拟环境](../virtual-environments.md){.internal-link target=_blank},然后安装了 `sqlmodel` :
    
    <div class="termy">
    
    ```console
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sun Dec 15 17:11:14 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  6. docs_src/path_operation_configuration/tutorial002_py39.py

    from typing import Union
    
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
        tags: set[str] = set()
    
    
    @app.post("/items/", response_model=Item, tags=["items"])
    async def create_item(item: Item):
        return item
    
    
    @app.get("/items/", tags=["items"])
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 575 bytes
    - Viewed (0)
  7. docs_src/dependencies/tutorial008c_py39.py

    from fastapi import Depends, FastAPI, HTTPException
    
    app = FastAPI()
    
    
    class InternalError(Exception):
        pass
    
    
    def get_username():
        try:
            yield "Rick"
        except InternalError:
            print("Oops, we didn't raise again, Britney 😱")
    
    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: str = Depends(get_username)):
        if item_id == "portal-gun":
            raise InternalError(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 660 bytes
    - Viewed (0)
  8. docs/ja/docs/tutorial/index.md

    ```
    
    </div>
    
    コードを記述またはコピーし、編集してローカルで実行することを**強くお勧めします**。
    
    また、エディターで使用することで、書く必要のあるコードの少なさ、すべての型チェック、自動補完などのFastAPIの利点を実感できます。
    
    ---
    
    ## FastAPIをインストールする
    
    最初のステップは、FastAPIのインストールです。
    
    チュートリアルのために、すべてのオプションの依存関係と機能をインストールしたいとき:
    
    <div class="termy">
    
    ```console
    $ pip install "fastapi[all]"
    
    ---> 100%
    ```
    
    </div>
    
    ...これには、コードを実行するサーバーとして使用できる `uvicorn`も含まれます。
    
    /// note | 備考
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Nov 09 16:39:20 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  9. docs/en/docs/reference/request.md

    You can import it directly from `fastapi`:
    
    ```python
    from fastapi import Request
    ```
    
    /// tip
    
    When you want to define dependencies that should be compatible with both HTTP and WebSockets, you can define a parameter that takes an `HTTPConnection` instead of a `Request` or a `WebSocket`.
    
    ///
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 518 bytes
    - Viewed (0)
  10. docs_src/body_multiple_params/tutorial001_an_py310.py

    from typing import Annotated
    
    from fastapi import FastAPI, Path
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: str | None = None
        price: float
        tax: float | None = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        item_id: Annotated[int, Path(title="The ID of the item to get", ge=0, le=1000)],
        q: str | None = None,
        item: Item | None = None,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 579 bytes
    - Viewed (0)
Back to top