Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for read_items (0.07 sec)

  1. fastapi/applications.py

                    ```python
                    from fastapi import FastAPI
    
                    app = FastAPI(redirect_slashes=True)  # the default
    
                    @app.get("/items/")
                    async def read_items():
                        return [{"item_id": "Foo"}]
                    ```
    
                    With this app, if a client goes to `/items` (without a trailing slash),
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Aug 17 04:52:31 UTC 2024
    - 172.2K bytes
    - Viewed (0)
  2. fastapi/routing.py

            ## Example
    
            ```python
            from fastapi import APIRouter, FastAPI
    
            app = FastAPI()
            router = APIRouter()
    
            @router.get("/items/")
            def read_items():
                return [{"name": "Empanada"}, {"name": "Arepa"}]
    
            app.include_router(router)
            ```
            """
            return self.api_route(
                path=path,
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Oct 12 09:44:57 UTC 2024
    - 172.1K bytes
    - Viewed (0)
Back to top