- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 70 for APIRouter (0.08 seconds)
-
docs/ru/docs/tutorial/bigger-applications.md
В дальнейшем используйте `APIRouter` для объявления *эндпоинтов*, точно также, как вы используете класс `FastAPI`: {* ../../docs_src/bigger_applications/app_an_py39/routers/users.py hl[6,11,16] title["app/routers/users.py"] *} Вы можете думать об `APIRouter` как об "уменьшенной версии" класса FastAPI`. `APIRouter` поддерживает все те же самые опции.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Thu Dec 11 21:25:03 GMT 2025 - 30.4K bytes - Click Count (0) -
docs/de/docs/tutorial/bigger-applications.md
Sie können die *Pfadoperationen* für dieses Modul mit `APIRouter` erstellen. ### `APIRouter` importieren { #import-apirouter } Sie importieren ihn und erstellen eine „Instanz“ auf die gleiche Weise wie mit der Klasse `FastAPI`: {* ../../docs_src/bigger_applications/app_an_py39/routers/users.py hl[1,3] title["app/routers/users.py"] *} ### *Pfadoperationen* mit `APIRouter` { #path-operations-with-apirouter }Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 10 13:54:34 GMT 2025 - 21.3K bytes - Click Count (0) -
docs/es/docs/tutorial/bigger-applications.md
Puedes crear las *path operations* para ese módulo usando `APIRouter`. ### Importar `APIRouter` { #import-apirouter } Lo importas y creas una "instance" de la misma manera que lo harías con la clase `FastAPI`: {* ../../docs_src/bigger_applications/app_an_py39/routers/users.py hl[1,3] title["app/routers/users.py"] *} ### *Path operations* con `APIRouter` { #path-operations-with-apirouter } Y luego lo usas para declarar tus *path operations*.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Dec 16 16:33:45 GMT 2025 - 19.6K bytes - Click Count (0) -
docs/pt/docs/tutorial/bigger-applications.md
Você pode criar as *operações de rotas* para esse módulo usando o `APIRouter`. ### Importe `APIRouter` { #import-apirouter } você o importa e cria uma "instância" da mesma maneira que faria com a classe `FastAPI`: {* ../../docs_src/bigger_applications/app_an_py39/routers/users.py hl[1,3] title["app/routers/users.py"] *} ### *Operações de Rota* com `APIRouter` { #path-operations-with-apirouter }Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Dec 16 20:32:40 GMT 2025 - 19.7K bytes - Click Count (0) -
docs/en/docs/tutorial/bigger-applications.md
You can create the *path operations* for that module using `APIRouter`. ### Import `APIRouter` { #import-apirouter } You import it and create an "instance" the same way you would with the class `FastAPI`: {* ../../docs_src/bigger_applications/app_an_py39/routers/users.py hl[1,3] title["app/routers/users.py"] *} ### *Path operations* with `APIRouter` { #path-operations-with-apirouter } And then you use it to declare your *path operations*.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 10 08:55:32 GMT 2025 - 18.6K bytes - Click Count (0) -
cmd/object-handlers_test.go
} // Since `apiRouter` satisfies `http.Handler` it has a ServeHTTP to execute the logic of the handler. // Call the ServeHTTP to execute the handler,`func (api objectAPIHandlers) GetObjectHandler` handles the request. apiRouter.ServeHTTP(rec, req) // Assert the response code with the expected status.
Created: Sun Dec 28 19:28:13 GMT 2025 - Last Modified: Sun Sep 28 20:59:21 GMT 2025 - 163.1K bytes - Click Count (0) -
tests/test_router_events.py
def app_shutdown() -> None: state.app_shutdown = True router = APIRouter() @router.on_event("startup") def router_startup() -> None: state.router_startup = True @router.on_event("shutdown") def router_shutdown() -> None: state.router_shutdown = True sub_router = APIRouter() @sub_router.on_event("startup") def sub_router_startup() -> None:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 7.3K bytes - Click Count (0) -
docs_src/bigger_applications/app_py39/routers/items.py
from fastapi import APIRouter, Depends, HTTPException 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_dbCreated: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 1011 bytes - Click Count (0) -
fastapi/__init__.py
from .param_functions import Query as Query from .param_functions import Security as Security from .requests import Request as Request from .responses import Response as Response from .routing import APIRouter as APIRouter from .websockets import WebSocket as WebSocket
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 15:19:50 GMT 2025 - 1.1K bytes - Click Count (0) -
tests/test_ws_dependencies.py
from typing import Annotated from fastapi import APIRouter, Depends, FastAPI, WebSocket from fastapi.testclient import TestClient def dependency_list() -> list[str]: return [] DepList = Annotated[list[str], Depends(dependency_list)] def create_dependency(name: str): def fun(deps: DepList): deps.append(name) return Depends(fun) router = APIRouter(dependencies=[create_dependency("router")])
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 2.1K bytes - Click Count (0)