Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for BaseModel (0.04 sec)

  1. fastapi/routing.py

            Add a *path operation* using an HTTP PUT operation.
    
            ## Example
    
            ```python
            from fastapi import APIRouter, FastAPI
            from pydantic import BaseModel
    
            class Item(BaseModel):
                name: str
                description: str | None = None
    
            app = FastAPI()
            router = APIRouter()
    
            @router.put("/items/{item_id}")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 174.6K bytes
    - Viewed (0)
  2. fastapi/applications.py

                    For example, if you have a model like:
    
                    ```python
                    from pydantic import BaseModel
    
                    class Item(BaseModel):
                        name: str
                        tags: list[str] = []
                    ```
    
                    When `Item` is used for input, a request body, `tags` is not required,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 176.3K bytes
    - Viewed (0)
Back to top