Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 201 - 210 of 730 for item_e (0.04 seconds)

  1. docs_src/pydantic_v1_in_v2/tutorial003_an_py310.py

    from pydantic.v1 import BaseModel
    
    
    class Item(BaseModel):
        name: str
        description: str | None = None
        size: float
    
    
    class ItemV2(BaseModelV2):
        name: str
        description: str | None = None
        size: float
    
    
    app = FastAPI()
    
    
    @app.post("/items/", response_model=ItemV2)
    async def create_item(item: Item):
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Oct 11 16:45:54 GMT 2025
    - 407 bytes
    - Click Count (0)
  2. docs_src/path_params/tutorial002_py39.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_item(item_id: int):
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 143 bytes
    - Click Count (0)
  3. docs_src/pydantic_v1_in_v2/tutorial003_an_py39.py

    from pydantic.v1 import BaseModel
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        size: float
    
    
    class ItemV2(BaseModelV2):
        name: str
        description: Union[str, None] = None
        size: float
    
    
    app = FastAPI()
    
    
    @app.post("/items/", response_model=ItemV2)
    async def create_item(item: Item):
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 445 bytes
    - Click Count (0)
  4. tests/test_tutorial/test_using_request_directly/test_tutorial001.py

            },
            "openapi": "3.1.0",
            "paths": {
                "/items/{item_id}": {
                    "get": {
                        "operationId": "read_root_items__item_id__get",
                        "parameters": [
                            {
                                "in": "path",
                                "name": "item_id",
                                "required": True,
                                "schema": {
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 3.8K bytes
    - Click Count (0)
  5. docs_src/query_params/tutorial006_py310.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_user_item(
        item_id: str, needy: str, skip: int = 0, limit: int | None = None
    ):
        item = {"item_id": item_id, "needy": needy, "skip": skip, "limit": limit}
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 269 bytes
    - Click Count (0)
  6. docs/ja/docs/index.md

    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        price: float
        is_offer: bool = None
    
    
    @app.get("/")
    def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    def read_item(item_id: int, q: str = None):
        return {"item_id": item_id, "q": q}
    
    
    @app.put("/items/{item_id}")
    def update_item(item_id: int, item: Item):
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Oct 11 17:48:49 GMT 2025
    - 21.3K bytes
    - Click Count (0)
  7. docs_src/path_params_numeric_validations/tutorial002_py39.py

    from fastapi import FastAPI, Path
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_items(q: str, item_id: int = Path(title="The ID of the item to get")):
        results = {"item_id": item_id}
        if q:
            results.update({"q": q})
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 265 bytes
    - Click Count (0)
  8. docs_src/path_params_numeric_validations/tutorial004_py39.py

    from fastapi import FastAPI, Path
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_items(
        *, item_id: int = Path(title="The ID of the item to get", ge=1), q: str
    ):
        results = {"item_id": item_id}
        if q:
            results.update({"q": q})
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 280 bytes
    - Click Count (0)
  9. docs/es/docs/tutorial/bigger-applications.md

    ///
    
    ## Otro módulo con `APIRouter` { #another-module-with-apirouter }
    
    Digamos que también tienes los endpoints dedicados a manejar "items" de tu aplicación en el módulo `app/routers/items.py`.
    
    Tienes *path operations* para:
    
    * `/items/`
    * `/items/{item_id}`
    
    Es toda la misma estructura que con `app/routers/users.py`.
    
    Pero queremos ser más inteligentes y simplificar un poco el código.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Tue Dec 16 16:33:45 GMT 2025
    - 19.6K bytes
    - Click Count (0)
  10. docs_src/path_params_numeric_validations/tutorial001_py310.py

    from fastapi import FastAPI, Path, Query
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_items(
        item_id: int = Path(title="The ID of the item to get"),
        q: str | None = Query(default=None, alias="item-query"),
    ):
        results = {"item_id": item_id}
        if q:
            results.update({"q": q})
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 332 bytes
    - Click Count (0)
Back to Top