- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 31 for cdef (0.12 sec)
-
docs_src/dependencies/tutorial003.py
fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}] class CommonQueryParams: def __init__(self, q: Union[str, None] = None, skip: int = 0, limit: int = 100): self.q = q self.skip = skip self.limit = limit @app.get("/items/") async def read_items(commons=Depends(CommonQueryParams)): response = {} if commons.q: response.update({"q": commons.q})
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 635 bytes - Viewed (0) -
docs_src/extra_models/tutorial003.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 644 bytes - Viewed (1) -
docs_src/handling_errors/tutorial003.py
from fastapi import FastAPI, Request from fastapi.responses import JSONResponse class UnicornException(Exception): def __init__(self, name: str): self.name = name app = FastAPI() @app.exception_handler(UnicornException) async def unicorn_exception_handler(request: Request, exc: UnicornException): return JSONResponse( status_code=418,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 626 bytes - Viewed (0) -
docs_src/body_nested_models/tutorial003.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 414 bytes - Viewed (0) -
docs_src/additional_responses/tutorial003.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 837 bytes - Viewed (0) -
docs_src/websockets/tutorial003.py
</html> """ class ConnectionManager: def __init__(self): self.active_connections: List[WebSocket] = [] async def connect(self, websocket: WebSocket): await websocket.accept() self.active_connections.append(websocket) def disconnect(self, websocket: WebSocket): self.active_connections.remove(websocket) async def send_personal_message(self, message: str, websocket: WebSocket):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun Aug 09 13:52:19 GMT 2020 - 2.5K bytes - Viewed (0) -
docs_src/custom_request_and_route/tutorial003.py
from typing import Callable from fastapi import APIRouter, FastAPI, Request, Response from fastapi.routing import APIRoute class TimedRoute(APIRoute): def get_route_handler(self) -> Callable: original_route_handler = super().get_route_handler() async def custom_route_handler(request: Request) -> Response: before = time.time() response: Response = await original_route_handler(request)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 1K bytes - Viewed (0) -
docs_src/metadata/tutorial003.py
from fastapi import FastAPI app = FastAPI(docs_url="/documentation", redoc_url=None) @app.get("/items/") async def read_items():
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 02 04:55:20 GMT 2020 - 161 bytes - Viewed (0) -
docs_src/body/tutorial003.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Jan 09 14:28:58 GMT 2024 - 362 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial003.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 329 bytes - Viewed (0)