Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 34 for Mounting (0.16 sec)

  1. docs/de/docs/how-to/custom-request-and-route.md

    ```Python hl_lines="8-15"
    {!../../../docs_src/custom_request_and_route/tutorial001.py!}
    ```
    
    ### Eine benutzerdefinierte `GzipRoute`-Klasse erstellen
    
    Als Nächstes erstellen wir eine benutzerdefinierte Unterklasse von `fastapi.routing.APIRoute`, welche `GzipRequest` nutzt.
    
    Dieses Mal wird die Methode `APIRoute.get_route_handler()` überschrieben.
    
    Diese Methode gibt eine Funktion zurück. Und diese Funktion empfängt einen Request und gibt eine Response zurück.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:18:23 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  2. fastapi/routing.py

        is_body_allowed_for_status_code,
    )
    from pydantic import BaseModel
    from starlette import routing
    from starlette.concurrency import run_in_threadpool
    from starlette.exceptions import HTTPException
    from starlette.requests import Request
    from starlette.responses import JSONResponse, Response
    from starlette.routing import (
        BaseRoute,
        Match,
        compile_path,
        get_name,
        request_response,
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 170.1K bytes
    - Viewed (0)
  3. docs/de/docs/alternatives.md

    Uvicorn ist ein blitzschneller ASGI-Server, der auf uvloop und httptools basiert.
    
    Es handelt sich nicht um ein Webframework, sondern um einen Server. Beispielsweise werden keine Tools für das Routing von Pfaden bereitgestellt. Das ist etwas, was ein Framework wie Starlette (oder **FastAPI**) zusätzlich bieten würde.
    
    Es ist der empfohlene Server für Starlette und **FastAPI**.
    
    !!! check "**FastAPI** empfiehlt es als"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:26:28 GMT 2024
    - 26.7K bytes
    - Viewed (0)
  4. docs_src/path_operation_advanced_configuration/tutorial002.py

    from fastapi import FastAPI
    from fastapi.routing import APIRoute
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items():
        return [{"item_id": "Foo"}]
    
    
    def use_route_names_as_operation_ids(app: FastAPI) -> None:
        """
        Simplify operation IDs so that generated API clients have simpler function
        names.
    
        Should be called only after all routes have been added.
        """
        for route in app.routes:
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 572 bytes
    - Viewed (0)
  5. fastapi/applications.py

                    [FastAPI docs for Testing Dependencies with Overrides](https://fastapi.tiangolo.com/advanced/testing-dependencies/).
                    """
                ),
            ] = {}
            self.router: routing.APIRouter = routing.APIRouter(
                routes=routes,
                redirect_slashes=redirect_slashes,
                dependency_overrides_provider=self,
                on_startup=on_startup,
                on_shutdown=on_shutdown,
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 172.2K bytes
    - Viewed (0)
  6. fastapi/openapi/utils.py

    
    def generate_operation_summary(*, route: routing.APIRoute, method: str) -> str:
        if route.summary:
            return route.summary
        return route.name.replace("_", " ").title()
    
    
    def get_openapi_operation_metadata(
        *, route: routing.APIRoute, method: str, operation_ids: Set[str]
    ) -> Dict[str, Any]:
        operation: Dict[str, Any] = {}
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 21.8K bytes
    - Viewed (0)
  7. docs_src/custom_request_and_route/tutorial001.py

    import gzip
    from typing import Callable, List
    
    from fastapi import Body, FastAPI, Request, Response
    from fastapi.routing import APIRoute
    
    
    class GzipRequest(Request):
        async def body(self) -> bytes:
            if not hasattr(self, "_body"):
                body = await super().body()
                if "gzip" in self.headers.getlist("Content-Encoding"):
                    body = gzip.decompress(body)
                self._body = body
            return self._body
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 973 bytes
    - Viewed (0)
  8. docs_src/generate_clients/tutorial003_py39.py

    from fastapi import FastAPI
    from fastapi.routing import APIRoute
    from pydantic import BaseModel
    
    
    def custom_generate_unique_id(route: APIRoute):
        return f"{route.tags[0]}-{route.name}"
    
    
    app = FastAPI(generate_unique_id_function=custom_generate_unique_id)
    
    
    class Item(BaseModel):
        name: str
        price: float
    
    
    class ResponseMessage(BaseModel):
        message: str
    
    
    class User(BaseModel):
        username: str
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 04 22:02:18 GMT 2022
    - 914 bytes
    - Viewed (0)
  9. tests/test_route_scope.py

    import pytest
    from fastapi import FastAPI, Request, WebSocket, WebSocketDisconnect
    from fastapi.routing import APIRoute, APIWebSocketRoute
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    @app.get("/users/{user_id}")
    async def get_user(user_id: str, request: Request):
        route: APIRoute = request.scope["route"]
        return {"user_id": user_id, "path": route.path}
    
    
    @app.websocket("/items/{item_id}")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Feb 08 10:23:07 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  10. docs/tr/docs/alternatives.md

    !!! check "**FastAPI**'a nasıl ilham verdi?"
        Gereken araçları ve parçaları birleştirip eşleştirmeyi kolaylaştıracak bir mikro framework olmalı.
    
        Basit ve kullanması kolay bir <abbr title="Yönlendirme: Routing">yönlendirme sistemine</abbr> sahip olmalı.
    
    ### <a href="https://requests.readthedocs.io" class="external-link" target="_blank">Requests</a>
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 28.8K bytes
    - Viewed (0)
Back to top