Search Options

Results per page
Sort
Preferred Languages
Advance

Results 181 - 190 of 704 for tabs (0.03 sec)

  1. docs_src/path_operation_configuration/tutorial005.py

    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,
        summary="Create an item",
        response_description="The created item",
    )
    async def create_item(item: Item):
        """
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 741 bytes
    - Viewed (0)
  2. docs/ru/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md

    Это должен быть `list` состоящий из `Depends()`:
    
    //// tab | Python 3.9+
    
    ```Python hl_lines="19"
    {!> ../../docs_src/dependencies/tutorial006_an_py39.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    
    ```Python hl_lines="18"
    {!> ../../docs_src/dependencies/tutorial006_an.py!}
    ```
    
    ////
    
    //// tab | Python 3.8 без Annotated
    
    /// подсказка
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  3. docs_src/body_updates/tutorial002_py39.py

        description: Union[str, None] = None
        price: Union[float, None] = None
        tax: float = 10.5
        tags: list[str] = []
    
    
    items = {
        "foo": {"name": "Foo", "price": 50.2},
        "bar": {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2},
        "baz": {"name": "Baz", "description": None, "price": 50.2, "tax": 10.5, "tags": []},
    }
    
    
    @app.get("/items/{item_id}", response_model=Item)
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 1K bytes
    - Viewed (0)
  4. docs/pt/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md

    Ele deve ser uma lista de `Depends()`:
    
    //// tab | Python 3.9+
    
    ```Python hl_lines="19"
    {!> ../../docs_src/dependencies/tutorial006_an_py39.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    
    ```Python hl_lines="18"
    {!> ../../docs_src/dependencies/tutorial006_an.py!}
    ```
    
    ////
    
    //// tab | Python 3.8 non-Annotated
    
    /// tip | "Dica"
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  5. docs_src/body_updates/tutorial001_py310.py

        description: str | None = None
        price: float | None = None
        tax: float = 10.5
        tags: list[str] = []
    
    
    items = {
        "foo": {"name": "Foo", "price": 50.2},
        "bar": {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2},
        "baz": {"name": "Baz", "description": None, "price": 50.2, "tax": 10.5, "tags": []},
    }
    
    
    @app.get("/items/{item_id}", response_model=Item)
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 856 bytes
    - Viewed (0)
  6. docs/pt/docs/advanced/advanced-dependencies.md

    Para fazer isso, nós declaramos o método `__call__`:
    
    //// tab | Python 3.9+
    
    ```Python hl_lines="12"
    {!> ../../docs_src/dependencies/tutorial011_an_py39.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    
    ```Python hl_lines="11"
    {!> ../../docs_src/dependencies/tutorial011_an.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+ non-Annotated
    
    /// tip | "Dica"
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md

    It should be a `list` of `Depends()`:
    
    //// tab | Python 3.9+
    
    ```Python hl_lines="19"
    {!> ../../docs_src/dependencies/tutorial006_an_py39.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    
    ```Python hl_lines="18"
    {!> ../../docs_src/dependencies/tutorial006_an.py!}
    ```
    
    ////
    
    //// tab | Python 3.8 non-Annotated
    
    /// tip
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 4K bytes
    - Viewed (0)
  8. docs_src/bigger_applications/app_an/routers/items.py

    from fastapi import APIRouter, Depends, HTTPException
    
    from ..dependencies import get_token_header
    
    router = APIRouter(
        prefix="/items",
        tags=["items"],
        dependencies=[Depends(get_token_header)],
        responses={404: {"description": "Not found"}},
    )
    
    
    fake_items_db = {"plumbus": {"name": "Plumbus"}, "gun": {"name": "Portal Gun"}}
    
    
    @router.get("/")
    async def read_items():
        return fake_items_db
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 1011 bytes
    - Viewed (0)
  9. docs_src/body_updates/tutorial001.py

        description: Union[str, None] = None
        price: Union[float, None] = None
        tax: float = 10.5
        tags: List[str] = []
    
    
    items = {
        "foo": {"name": "Foo", "price": 50.2},
        "bar": {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2},
        "baz": {"name": "Baz", "description": None, "price": 50.2, "tax": 10.5, "tags": []},
    }
    
    
    @app.get("/items/{item_id}", response_model=Item)
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 906 bytes
    - Viewed (0)
  10. docs_src/body_updates/tutorial002_py310.py

        description: str | None = None
        price: float | None = None
        tax: float = 10.5
        tags: list[str] = []
    
    
    items = {
        "foo": {"name": "Foo", "price": 50.2},
        "bar": {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2},
        "baz": {"name": "Baz", "description": None, "price": 50.2, "tax": 10.5, "tags": []},
    }
    
    
    @app.get("/items/{item_id}", response_model=Item)
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 1010 bytes
    - Viewed (0)
Back to top