Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 142 for Tags (0.16 sec)

  1. docs/en/docs/tutorial/metadata.md

    !!! tip
        You don't have to add metadata for all the tags that you use.
    
    ### Use your tags
    
    Use the `tags` parameter with your *path operations* (and `APIRouter`s) to assign them to different tags:
    
    ```Python hl_lines="21  26"
    {!../../../docs_src/metadata/tutorial004.py!}
    ```
    
    !!! info
        Read more about tags in [Path Operation Configuration](path-operation-configuration.md#tags){.internal-link target=_blank}.
    
    ### Check the docs
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Mar 31 23:52:53 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  2. docs_src/path_operation_configuration/tutorial002b.py

    from enum import Enum
    
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    class Tags(Enum):
        items = "items"
        users = "users"
    
    
    @app.get("/items/", tags=[Tags.items])
    async def get_items():
        return ["Portal gun", "Plumbus"]
    
    
    @app.get("/users/", tags=[Tags.users])
    async def read_users():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Jan 23 17:43:04 GMT 2022
    - 323 bytes
    - Viewed (0)
  3. docs_src/path_operation_configuration/tutorial002.py

        price: float
        tax: Union[float, None] = None
        tags: Set[str] = set()
    
    
    @app.post("/items/", response_model=Item, tags=["items"])
    async def create_item(item: Item):
        return item
    
    
    @app.get("/items/", tags=["items"])
    async def read_items():
        return [{"name": "Foo", "price": 42}]
    
    
    @app.get("/users/", tags=["users"])
    async def read_users():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 580 bytes
    - Viewed (0)
  4. docs_src/path_operation_configuration/tutorial002_py39.py

        price: float
        tax: Union[float, None] = None
        tags: set[str] = set()
    
    
    @app.post("/items/", response_model=Item, tags=["items"])
    async def create_item(item: Item):
        return item
    
    
    @app.get("/items/", tags=["items"])
    async def read_items():
        return [{"name": "Foo", "price": 42}]
    
    
    @app.get("/users/", tags=["users"])
    async def read_users():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 575 bytes
    - Viewed (0)
  5. tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial007_pv1.py

                                        "required": ["name", "tags"],
                                        "type": "object",
                                        "properties": {
                                            "name": {"title": "Name", "type": "string"},
                                            "tags": {
                                                "title": "Tags",
                                                "type": "array",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial007.py

                                        "required": ["name", "tags"],
                                        "type": "object",
                                        "properties": {
                                            "name": {"title": "Name", "type": "string"},
                                            "tags": {
                                                "title": "Tags",
                                                "type": "array",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  7. docs_src/bigger_applications/app_an_py39/routers/users.py

    from fastapi import APIRouter
    
    router = APIRouter()
    
    
    @router.get("/users/", tags=["users"])
    async def read_users():
        return [{"username": "Rick"}, {"username": "Morty"}]
    
    
    @router.get("/users/me", tags=["users"])
    async def read_user_me():
        return {"username": "fakecurrentuser"}
    
    
    @router.get("/users/{username}", tags=["users"])
    async def read_user(username: str):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 407 bytes
    - Viewed (0)
  8. docs/en/docs/how-to/general.md

    ## Documentation Tags - OpenAPI
    
    To add tags to your *path operations*, and group them in the docs UI, read the docs for [Tutorial - Path Operation Configurations - Tags](../tutorial/path-operation-configuration.md#tags){.internal-link target=_blank}.
    
    ## Documentation Summary and Description - OpenAPI
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Aug 19 19:54:04 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_dataclasses/test_tutorial002.py

                            "name": {"title": "Name", "type": "string"},
                            "price": {"title": "Price", "type": "number"},
                            "tags": IsDict(
                                {
                                    "title": "Tags",
                                    "type": "array",
                                    "items": {"type": "string"},
                                }
                            )
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Aug 04 20:47:07 GMT 2023
    - 3.5K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_response_model/test_tutorial004.py

                                {"title": "Description", "type": "string"}
                            ),
                            "tax": {"title": "Tax", "type": "number", "default": 10.5},
                            "tags": {
                                "title": "Tags",
                                "type": "array",
                                "items": {"type": "string"},
                                "default": [],
                            },
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Aug 04 20:47:07 GMT 2023
    - 5K bytes
    - Viewed (0)
Back to top