Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 157 for outer (0.16 sec)

  1. docs/en/docs/tutorial/bigger-applications.md

    We are importing the submodule `items` directly, instead of importing just its variable `router`.
    
    This is because we also have another variable named `router` in the submodule `users`.
    
    If we had imported one after the other, like:
    
    ```Python
    from .routers.items import router
    from .routers.users import router
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 18.4K bytes
    - Viewed (0)
  2. tests/test_custom_route_class.py

    
    @router_b.get("/")
    def get_b():
        return {"msg": "B"}
    
    
    @router_c.get("/")
    def get_c():
        return {"msg": "C"}
    
    
    router_b.include_router(router=router_c, prefix="/c")
    router_a.include_router(router=router_b, prefix="/b")
    app.include_router(router=router_a, prefix="/a")
    
    
    client = TestClient(app)
    
    
    @pytest.mark.parametrize(
        "path,expected_status,expected_response",
        [
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  3. docs_src/bigger_applications/app_an/main.py

    from .internal import admin
    from .routers import items, users
    
    app = FastAPI(dependencies=[Depends(get_query_token)])
    
    
    app.include_router(users.router)
    app.include_router(items.router)
    app.include_router(
        admin.router,
        prefix="/admin",
        tags=["admin"],
        dependencies=[Depends(get_token_header)],
        responses={418: {"description": "I'm a teapot"}},
    )
    
    
    @app.get("/")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 552 bytes
    - Viewed (0)
  4. istioctl/pkg/authz/testdata/configdump.yaml

                  ]
                 }
                ]
               },
               "http_filters": [
                {
                 "name": "envoy.filters.http.router",
                 "typed_config": {
                  "@type": "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router"
                 }
                }
               ]
              }
             }
            ]
           }
          ]
         },
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Wed Jun 21 14:20:23 UTC 2023
    - 206.7K bytes
    - Viewed (0)
  5. docs_src/bigger_applications/app_an_py39/internal/admin.py

    from fastapi import APIRouter
    
    router = APIRouter()
    
    
    @router.post("/")
    async def update_admin():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 147 bytes
    - Viewed (0)
  6. docs/de/docs/tutorial/bigger-applications.md

    Wir importieren das Submodul `items` direkt, anstatt nur seine Variable `router` zu importieren.
    
    Das liegt daran, dass wir im Submodul `users` auch eine weitere Variable namens `router` haben.
    
    Wenn wir eine nach der anderen importiert hรคtten, etwa:
    
    ```Python
    from .routers.items import router
    from .routers.users import router
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 21K bytes
    - Viewed (0)
  7. docs/em/docs/tutorial/bigger-applications.md

    ///
    
    ### โŽ ๐Ÿ“› ๐Ÿ’ฅ
    
    ๐Ÿ‘ฅ ๐Ÿญ ๐Ÿ” `items` ๐Ÿ”—, โ†ฉ๏ธ ๐Ÿญ ๐Ÿšฎ ๐Ÿ”ข `router`.
    
    ๐Ÿ‘‰ โ†ฉ๏ธ ๐Ÿ‘ฅ โœ”๏ธ โž•1๏ธโƒฃ ๐Ÿ”ข ๐Ÿ“› `router` ๐Ÿ” `users`.
    
    ๐Ÿšฅ ๐Ÿ‘ฅ โœ”๏ธ ๐Ÿ—„ 1๏ธโƒฃ โฎ๏ธ ๐ŸŽ, ๐Ÿ’–:
    
    ```Python
    from .routers.items import router
    from .routers.users import router
    ```
    
    `router` โšช๏ธโžก๏ธ `users` ๐Ÿ”œ ๐Ÿ“ 1๏ธโƒฃ โšช๏ธโžก๏ธ `items` & ๐Ÿ‘ฅ ๐Ÿšซ๐Ÿ”œ ๐Ÿ’ช โš™๏ธ ๐Ÿ‘ซ ๐ŸŽ ๐Ÿ•ฐ.
    
    , ๐Ÿ’ช โš™๏ธ ๐Ÿ‘ฏโ€โ™‚๏ธ ๐Ÿ‘ซ ๐ŸŽ ๐Ÿ“, ๐Ÿ‘ฅ ๐Ÿ—„ ๐Ÿ” ๐Ÿ”—:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  8. tests/test_modules_same_name_body/app/b.py

    from fastapi import APIRouter, Body
    
    router = APIRouter()
    
    
    @router.post("/compute/")
    def compute(a: int = Body(), b: str = Body()):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 161 bytes
    - Viewed (0)
  9. tests/test_additional_response_extra.py

    from fastapi import APIRouter, FastAPI
    from fastapi.testclient import TestClient
    
    router = APIRouter()
    
    sub_router = APIRouter()
    
    app = FastAPI()
    
    
    @sub_router.get("/")
    def read_item():
        return {"id": "foo"}
    
    
    router.include_router(sub_router, prefix="/items")
    
    app.include_router(router)
    
    client = TestClient(app)
    
    
    def test_path_operation():
        response = client.get("/items/")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  10. docs_src/custom_request_and_route/tutorial003.py

            return custom_route_handler
    
    
    app = FastAPI()
    router = APIRouter(route_class=TimedRoute)
    
    
    @app.get("/")
    async def not_timed():
        return {"message": "Not timed"}
    
    
    @router.get("/timed")
    async def timed():
        return {"message": "It's the time of my life"}
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 1K bytes
    - Viewed (0)
Back to top