Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 157 for tabs (0.13 sec)

  1. docs_src/path_operation_configuration/tutorial003.py

        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",
        description="Create an item with all the information, name, description, price, tax and a set of unique tags",
    )
    async def create_item(item: Item):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 517 bytes
    - Viewed (0)
  2. 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):
        """
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 741 bytes
    - Viewed (0)
  3. docs_src/response_model/tutorial004.py

        name: str
        description: Union[str, None] = None
        price: float
        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, response_model_exclude_unset=True)
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 633 bytes
    - Viewed (0)
  4. docs_src/body_updates/tutorial001_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)
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 900 bytes
    - Viewed (0)
  5. docs/de/docs/tutorial/body-nested-models.md

        ```
    
    ## Set-Typen
    
    Aber dann denken wir darรผber nach und stellen fest, dass sich die Tags nicht wiederholen sollen, es sollen eindeutige Strings sein.
    
    Python hat einen Datentyp speziell fรผr Mengen eindeutiger Dinge: das <abbr title="Menge">`set`</abbr>.
    
    Deklarieren wir also `tags` als Set von Strings.
    
    === "Python 3.10+"
    
        ```Python hl_lines="12"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  6. docs/en/docs/advanced/generate-clients.md

    <img src="/img/tutorial/generate-clients/image05.png">
    
    ## FastAPI App with Tags
    
    In many cases your FastAPI app will be bigger, and you will probably use tags to separate different groups of *path operations*.
    
    For example, you could have a section for **items** and another section for **users**, and they could be separated by tags:
    
    === "Python 3.9+"
    
        ```Python hl_lines="21  26  34"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  7. tests/test_include_router_defaults_overrides.py

            500: {"description": "Server error level 0"},
        },
        default_response_class=ResponseLevel0,
        callbacks=callback_router0.routes,
    )
    
    router2_override = APIRouter(
        prefix="/level2",
        tags=["level2a", "level2b"],
        dependencies=[Depends(dep2)],
        responses={
            402: {"description": "Client error level 2"},
            502: {"description": "Server error level 2"},
        },
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 358.6K bytes
    - Viewed (0)
  8. docs/em/docs/tutorial/metadata.md

    โฎ๏ธ ๐Ÿ‘‰ ๐Ÿ“ณ, ๐Ÿง ๐Ÿ› ๏ธ ๐Ÿฉบ ๐Ÿ”œ ๐Ÿ‘€ ๐Ÿ’–:
    
    <img src="/img/tutorial/metadata/image01.png">
    
    ## ๐Ÿ—ƒ ๐Ÿ”–
    
    ๐Ÿ‘† ๐Ÿ’ช ๐Ÿšฎ ๐ŸŒ– ๐Ÿ—ƒ ๐ŸŽ ๐Ÿ”– โš™๏ธ ๐Ÿ‘ช ๐Ÿ‘† โžก ๐Ÿ› ๏ธ โฎ๏ธ ๐Ÿ”ข `openapi_tags`.
    
    โšซ๏ธ โœŠ ๐Ÿ“‡ โš— 1๏ธโƒฃ ๐Ÿ“– ๐Ÿ”  ๐Ÿ”–.
    
    ๐Ÿ”  ๐Ÿ“– ๐Ÿ’ช ๐Ÿ”Œ:
    
    * `name` (**โœ”**): `str` โฎ๏ธ ๐ŸŽ ๐Ÿ“› ๐Ÿ‘† โš™๏ธ `tags` ๐Ÿ”ข ๐Ÿ‘† *โžก ๐Ÿ› ๏ธ* &amp; `APIRouter`โ“‚.
    * `description`: `str` โฎ๏ธ ๐Ÿ“ ๐Ÿ“› ๐Ÿ”–. โšซ๏ธ ๐Ÿ’ช โœ”๏ธ โœ &amp; ๐Ÿ”œ ๐ŸŽฆ ๐Ÿฉบ ๐ŸŽš.
    * `externalDocs`: `dict` ๐Ÿ”ฌ ๐Ÿ”ข ๐Ÿงพ โฎ๏ธ:
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_bigger_applications/test_main_an.py

        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/users/": {
                    "get": {
                        "tags": ["users"],
                        "summary": "Read Users",
                        "operationId": "read_users_users__get",
                        "parameters": [
                            {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 24.6K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_bigger_applications/test_main_an_py39.py

        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/users/": {
                    "get": {
                        "tags": ["users"],
                        "summary": "Read Users",
                        "operationId": "read_users_users__get",
                        "parameters": [
                            {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 24.9K bytes
    - Viewed (0)
Back to top