Search Options

Results per page
Sort
Preferred Languages
Advance

Results 151 - 160 of 540 for item_b (0.23 sec)

  1. docs_src/body_multiple_params/tutorial003_an_py39.py

    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
    
    class User(BaseModel):
        username: str
        full_name: Union[str, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        item_id: int, item: Item, user: User, importance: Annotated[int, Body()]
    ):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 575 bytes
    - Viewed (0)
  2. docs_src/extra_data_types/tutorial001_an_py39.py

    from datetime import datetime, time, timedelta
    from typing import Annotated, Union
    from uuid import UUID
    
    from fastapi import Body, FastAPI
    
    app = FastAPI()
    
    
    @app.put("/items/{item_id}")
    async def read_items(
        item_id: UUID,
        start_datetime: Annotated[datetime, Body()],
        end_datetime: Annotated[datetime, Body()],
        process_after: Annotated[timedelta, Body()],
        repeat_at: Annotated[Union[time, None], Body()] = None,
    ):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Apr 19 00:11:40 UTC 2024
    - 801 bytes
    - Viewed (0)
  3. 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": {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 3.8K bytes
    - Viewed (0)
  4. docs/tr/docs/tutorial/query-params.md

    Bu durumda, eğer şu adrese giderseniz:
    
    ```
    http://127.0.0.1:8000/items/foo?short=1
    ```
    
    veya
    
    ```
    http://127.0.0.1:8000/items/foo?short=True
    ```
    
    veya
    
    ```
    http://127.0.0.1:8000/items/foo?short=true
    ```
    
    veya
    
    ```
    http://127.0.0.1:8000/items/foo?short=on
    ```
    
    veya
    
    ```
    http://127.0.0.1:8000/items/foo?short=yes
    ```
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sun Aug 31 10:29:01 UTC 2025
    - 5.2K bytes
    - Viewed (0)
  5. README.md

    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        price: float
        is_offer: Union[bool, None] = None
    
    
    @app.get("/")
    def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    def read_item(item_id: int, q: Union[str, None] = None):
        return {"item_id": item_id, "q": q}
    
    
    @app.put("/items/{item_id}")
    def update_item(item_id: int, item: Item):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Thu Dec 25 11:01:37 UTC 2025
    - 26.4K bytes
    - Viewed (0)
  6. docs_src/body_fields/tutorial001_an_py310.py

    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: str | None = Field(
            default=None, title="The description of the item", max_length=300
        )
        price: float = Field(gt=0, description="The price must be greater than zero")
        tax: float | None = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Annotated[Item, Body(embed=True)]):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 563 bytes
    - Viewed (0)
  7. tests/test_tutorial/test_query_params_str_validations/test_tutorial006c.py

        response = client.get("/items/?q=")
        assert response.status_code == 200
        assert response.json() == {  # pragma: no cover
            "items": [{"item_id": "Foo"}, {"item_id": "Bar"}],
        }
    
    
    def test_query_params_str_validations_q_query(client: TestClient):
        response = client.get("/items/", params={"q": "query"})
        assert response.status_code == 200
        assert response.json() == {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 5K bytes
    - Viewed (0)
  8. docs_src/body_multiple_params/tutorial004_an_py310.py

    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: str | None = None
        price: float
        tax: float | None = None
    
    
    class User(BaseModel):
        username: str
        full_name: str | None = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        *,
        item_id: int,
        item: Item,
        user: User,
        importance: Annotated[int, Body(gt=0)],
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 643 bytes
    - Viewed (0)
  9. docs_src/schema_extra_example/tutorial005_an_py310.py

    from fastapi import Body, FastAPI
    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: int,
        item: Annotated[
            Item,
            Body(
                openapi_examples={
                    "normal": {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Aug 26 18:03:13 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  10. docs_src/schema_extra_example/tutorial005_py39.py

    from fastapi import Body, FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        *,
        item_id: int,
        item: Item = Body(
            openapi_examples={
                "normal": {
                    "summary": "A normal example",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 1.4K bytes
    - Viewed (0)
Back to top