- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 175 for Sauter (0.36 sec)
-
tests/test_ws_router.py
def test_router(): client = TestClient(app) with client.websocket_connect("/router") as websocket: data = websocket.receive_text() assert data == "Hello, router!" def test_prefix_router(): client = TestClient(app) with client.websocket_connect("/prefix/") as websocket: data = websocket.receive_text() assert data == "Hello, router with prefix!" def test_native_prefix_router():
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sun Jun 11 19:08:14 GMT 2023 - 7.5K bytes - Viewed (0) -
tests/test_default_response_class_router.py
) router_b_override.include_router(router_b_a, prefix="/a") router_a.include_router(router_a_a, prefix="/a") router_a.include_router( router_a_b_override, prefix="/b", default_response_class=PlainTextResponse ) app.include_router(router_a, prefix="/a") app.include_router( router_b_override, prefix="/b", default_response_class=PlainTextResponse ) client = TestClient(app)
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sun Mar 01 20:49:20 GMT 2020 - 5K bytes - Viewed (0) -
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 ```
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 18.6K bytes - Viewed (0) -
.github/actions/people/app/main.py
if response.status_code != 200: logging.error( f"Response was not 200, after: {after}, category_id: {category_id}" ) logging.error(response.text) raise RuntimeError(response.text) data = response.json() if "errors" in data: logging.error(f"Errors in response, after: {after}, category_id: {category_id}") logging.error(data["errors"])
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Mar 26 17:38:21 GMT 2024 - 19.2K bytes - Viewed (1) -
docs/en/docs/how-to/custom-request-and-route.md
{!../../../docs_src/custom_request_and_route/tutorial002.py!} ``` ## Custom `APIRoute` class in a router You can also set the `route_class` parameter of an `APIRouter`: ```Python hl_lines="26" {!../../../docs_src/custom_request_and_route/tutorial003.py!} ```
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sun Mar 31 23:52:53 GMT 2024 - 4.4K bytes - Viewed (0) -
docs/en/docs/deployment/https.md
Then, using the certificate, the client and the TLS Termination Proxy **decide how to encrypt** the rest of the **TCP communication**. This completes the **TLS Handshake** part.
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Jan 11 16:31:18 GMT 2024 - 12K bytes - Viewed (0) -
tests/test_dependency_overrides.py
@router.get("/router-depends/") async def router_depends(commons: dict = Depends(common_parameters)): return {"in": "router-depends", "params": commons} @router.get("/router-decorator-depends/", dependencies=[Depends(common_parameters)]) async def router_decorator_depends(): return {"in": "router-decorator-depends"} app.include_router(router) client = TestClient(app)
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 15.4K bytes - Viewed (0) -
tests/test_operations_signatures.py
for method_name in method_names: router_method = getattr(APIRouter, method_name) app_method = getattr(FastAPI, method_name) router_sig = inspect.signature(router_method) app_sig = inspect.signature(app_method) param: inspect.Parameter for key, param in base_sig.parameters.items(): router_param: inspect.Parameter = router_sig.parameters[key]
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Mon May 27 12:08:13 GMT 2019 - 934 bytes - Viewed (0) -
docs_src/bigger_applications/app_an_py39/routers/users.py
from fastapi import APIRouter router = APIRouter() @router.get("/users/", tags=["users"]) async def read_users(): return [{"username": "Rick"}, {"username": "Morty"}] @router.get("/users/me", tags=["users"]) async def read_user_me(): return {"username": "fakecurrentuser"} @router.get("/users/{username}", tags=["users"]) async def read_user(username: str):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 407 bytes - Viewed (0) -
docs/en/docs/release-notes.md
That means that, for example, to apply authentication to all the *path operations* in a router it would end up being done in a different file, instead of keeping related logic together.
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sun Apr 28 00:28:00 GMT 2024 - 385.5K bytes - Viewed (1)