Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 179 for Routen (0.04 sec)

  1. tests/test_additional_responses_router.py

        message: str
    
    
    app = FastAPI()
    router = APIRouter()
    
    
    @router.get("/a", responses={501: {"description": "Error 1"}})
    async def a():
        return "a"
    
    
    @router.get(
        "/b",
        responses={
            502: {"description": "Error 2"},
            "4XX": {"description": "Error with range, upper"},
        },
    )
    async def b():
        return "b"
    
    
    @router.get(
        "/c",
        responses={
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 5.1K bytes
    - Viewed (0)
  2. tests/test_custom_middleware_exception.py

                return
    
            wrapper = self.receive_wrapper(receive)
            await self.app(scope, wrapper, send)
    
    
    @router.post("/middleware")
    def run_middleware(file: UploadFile = File(..., description="Big File")):
        return {"message": "OK"}
    
    
    app.include_router(router)
    app.add_middleware(ContentSizeLimitMiddleware, max_content_size=2**8)
    
    
    client = TestClient(app)
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Thu Aug 25 21:44:40 UTC 2022
    - 2.8K bytes
    - Viewed (0)
  3. docs_src/bigger_applications/app_an_py39/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 Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 552 bytes
    - Viewed (0)
  4. tests/test_router_prefix_with_template.py

    from fastapi import APIRouter, FastAPI
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    router = APIRouter()
    
    
    @router.get("/users/{id}")
    def read_user(segment: str, id: str):
        return {"segment": segment, "id": id}
    
    
    app.include_router(router, prefix="/{segment}")
    
    
    client = TestClient(app)
    
    
    def test_get():
        response = client.get("/seg/users/foo")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Apr 08 04:37:38 UTC 2020
    - 484 bytes
    - Viewed (0)
  5. tests/test_modules_same_name_body/app/main.py

    from fastapi import FastAPI
    
    from . import a, b
    
    app = FastAPI()
    
    app.include_router(a.router, prefix="/a")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Jun 28 17:35:16 UTC 2019
    - 150 bytes
    - Viewed (0)
  6. tests/test_modules_same_name_body/app/a.py

    from fastapi import APIRouter, Body
    
    router = APIRouter()
    
    
    @router.post("/compute")
    def compute(a: int = Body(), b: str = Body()):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 160 bytes
    - Viewed (0)
  7. src/main/java/jcifs/pac/PacMac.java

         *
         * @param data the input data to expand
         * @param outlen the desired output length in bytes
         * @return the n-folded data of the specified length
         */
        public static byte[] expandNFold(byte[] data, int outlen) {
            int lcm = lcm(outlen, data.length);
            byte[] buf = new byte[outlen];
            int carry = 0;
            for (int i = lcm - 1; i >= 0; i--) {
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 9K bytes
    - Viewed (0)
  8. docs_src/bigger_applications/app_py39/internal/admin.py

    from fastapi import APIRouter
    
    router = APIRouter()
    
    
    @router.post("/")
    async def update_admin():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 147 bytes
    - Viewed (0)
  9. tests/test_annotated.py

        assert response.json() == {"foo": "baz"}
    
    
    def test_nested_router():
        app = FastAPI()
    
        router = APIRouter(prefix="/nested")
    
        @router.get("/test")
        async def test(var: Annotated[str, Query()] = "bar"):
            return {"foo": var}
    
        app.include_router(router)
    
        client = TestClient(app)
    
        response = client.get("/nested/test")
        assert response.status_code == 200
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 9.6K bytes
    - Viewed (0)
  10. docs/en/docs/how-to/extending-openapi.md

    * `summary`: A short summary of the API.
    * `description`: The description of your API, this can include markdown and will be shown in the docs.
    * `routes`: A list of routes, these are each of the registered *path operations*. They are taken from `app.routes`.
    
    /// info
    
    The parameter `summary` is available in OpenAPI 3.1.0 and above, supported by FastAPI 0.99.0 and above.
    
    ///
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 3.4K bytes
    - Viewed (0)
Back to top