Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 332 for routes (0.09 sec)

  1. docs_src/custom_request_and_route/tutorial003.py

                response.headers["X-Response-Time"] = str(duration)
                print(f"route duration: {duration}")
                print(f"route response: {response}")
                print(f"route response headers: {response.headers}")
                return response
    
            return custom_route_handler
    
    
    app = FastAPI()
    router = APIRouter(route_class=TimedRoute)
    
    
    @app.get("/")
    async def not_timed():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 1K bytes
    - Viewed (0)
  2. docs/pt/docs/tutorial/bigger-applications.md

    * Há um subdiretório `app/routers/` com outro arquivo `__init__.py`, então ele é um "subpacote Python": `app.routers`.
    * O arquivo `app/routers/items.py` está dentro de um pacote, `app/routers/`, portanto, é um "submódulo": `app.routers.items`.
    * O mesmo com `app/routers/users.py`,  ele é outro submódulo: `app.routers.users`.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  3. tests/test_include_route.py

    from fastapi.responses import JSONResponse
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    router = APIRouter()
    
    
    @router.route("/items/")
    def read_items(request: Request):
        return JSONResponse({"hello": "world"})
    
    
    app.include_router(router)
    
    client = TestClient(app)
    
    
    def test_sub_router():
        response = client.get("/items/")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Apr 08 04:37:38 UTC 2020
    - 496 bytes
    - Viewed (0)
  4. docs/pt/docs/how-to/custom-request-and-route.md

    {!../../docs_src/custom_request_and_route/tutorial002.py!}
    ```
    
    ## Classe `APIRoute` personalizada em um router
    
    você também pode definir o parametro `route_class` de uma `APIRouter`;
    
    ```Python hl_lines="26"
    {!../../docs_src/custom_request_and_route/tutorial003.py!}
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Oct 22 17:33:00 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  5. docs_src/bigger_applications/app_an_py39/main.py

    from fastapi import Depends, FastAPI
    
    from .dependencies import get_query_token, get_token_header
    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)],
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 552 bytes
    - Viewed (0)
  6. docs_src/bigger_applications/app_an/main.py

    from fastapi import Depends, FastAPI
    
    from .dependencies import get_query_token, get_token_header
    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)],
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 552 bytes
    - Viewed (0)
  7. common-protos/k8s.io/api/core/v1/generated.proto

      // than a virtual IP.
      // "NodePort" builds on ClusterIP and allocates a port on every node which
      // routes to the same endpoints as the clusterIP.
      // "LoadBalancer" builds on NodePort and creates an external load-balancer
      // (if supported in the current cloud) which routes to the same endpoints
      // as the clusterIP.
      // "ExternalName" aliases this service to the specified externalName.
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Mon Mar 11 18:43:24 UTC 2024
    - 255.8K bytes
    - Viewed (0)
  8. docs/em/docs/how-to/custom-request-and-route.md

    ```
    
    ## 🛃 `APIRoute` 🎓 📻
    
    👆 💪 ⚒ `route_class` 🔢 `APIRouter`:
    
    ```Python hl_lines="26"
    {!../../docs_src/custom_request_and_route/tutorial003.py!}
    ```
    
    👉 🖼, *➡ 🛠️* 🔽 `router` 🔜 ⚙️ 🛃 `TimedRoute` 🎓, & 🔜 ✔️ ➕ `X-Response-Time` 🎚 📨 ⏮️ 🕰 ⚫️ ✊ 🏗 📨:
    
    ```Python hl_lines="13-20"
    {!../../docs_src/custom_request_and_route/tutorial003.py!}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  9. docs/fr/docs/tutorial/first-steps.md

    ```Python hl_lines="1"
    {!../../docs_src/first_steps/tutorial001.py!}
    ```
    
    `FastAPI` est une classe Python qui fournit toutes les fonctionnalités nécessaires au lancement de votre API.
    
    /// note | "Détails techniques"
    
    `FastAPI` est une classe héritant directement de `Starlette`.
    
    Vous pouvez donc aussi utiliser toutes les fonctionnalités de <a href="https://www.starlette.io/" class="external-link" target="_blank">Starlette</a> depuis `FastAPI`.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  10. CHANGELOG/CHANGELOG-1.15.md

    - Fix route conflicted operations when updating multiple routes together ([#88209](https://github.com/kubernetes/kubernetes/pull/88209), [@feiskyer](https://github.com/feiskyer)) [SIG Cloud Provider]
    Registered: Fri Nov 01 09:05:11 UTC 2024
    - Last Modified: Thu May 05 13:44:43 UTC 2022
    - 278.9K bytes
    - Viewed (0)
Back to top