Search Options

Results per page
Sort
Preferred Languages
Advance

Results 161 - 170 of 297 for Routes (0.04 sec)

  1. docs_src/bigger_applications/app/routers/items.py

    from ..dependencies import get_token_header
    
    router = APIRouter(
        prefix="/items",
        tags=["items"],
        dependencies=[Depends(get_token_header)],
        responses={404: {"description": "Not found"}},
    )
    
    
    fake_items_db = {"plumbus": {"name": "Plumbus"}, "gun": {"name": "Portal Gun"}}
    
    
    @router.get("/")
    async def read_items():
        return fake_items_db
    
    
    @router.get("/{item_id}")
    async def read_item(item_id: str):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Nov 29 17:32:18 UTC 2020
    - 1011 bytes
    - Viewed (0)
  2. cmd/admin-handlers_test.go

    )
    
    // adminErasureTestBed - encapsulates subsystems that need to be setup for
    // admin-handler unit tests.
    type adminErasureTestBed struct {
    	erasureDirs []string
    	objLayer    ObjectLayer
    	router      *mux.Router
    	done        context.CancelFunc
    }
    
    // prepareAdminErasureTestBed - helper function that setups a single-node
    // Erasure backend for admin-handler tests.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jul 24 10:24:01 UTC 2024
    - 13.9K 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. okhttp/src/main/kotlin/okhttp3/internal/-MediaTypeCommon.kt

            token == null -> {
              // Value is "double-quoted". That's valid and our regex group already strips the quotes.
              parameter.groups[3]!!.value
            }
            token.startsWith("'") && token.endsWith("'") && token.length > 2 -> {
              // If the token is 'single-quoted' it's invalid! But we're lenient and strip the quotes.
              token.substring(1, token.length - 1)
            }
            else -> token
          }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  5. CHANGELOG/CHANGELOG-1.17.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 Jan 28 10:44:33 UTC 2021
    - 346.2K bytes
    - Viewed (1)
  6. 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)
  7. 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)
  8. docs/en/docs/how-to/custom-request-and-route.md

    {* ../../docs_src/custom_request_and_route/tutorial002.py hl[16:18] *}
    
    ## Custom `APIRoute` class in a router
    
    You can also set the `route_class` parameter of an `APIRouter`:
    
    {* ../../docs_src/custom_request_and_route/tutorial003.py hl[26] *}
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 22:39:38 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  9. 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)
  10. docs/fr/docs/advanced/response-directly.md

    ///
    
    ## Renvoyer une `Response` personnalisรฉe
    
    L'exemple ci-dessus montre toutes les parties dont vous avez besoin, mais il n'est pas encore trรจs utile, car vous auriez pu retourner l'`item` directement, et **FastAPI** l'aurait mis dans une `JSONResponse` pour vous, en le convertissant en `dict`, etc. Tout cela par dรฉfaut.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3.6K bytes
    - Viewed (0)
Back to top