- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for sync (0.16 sec)
-
docs_src/path_operation_advanced_configuration/tutorial005.py
from fastapi import FastAPI app = FastAPI() @app.get("/items/", openapi_extra={"x-aperture-labs-portal": "blue"}) async def read_items():
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jul 29 20:01:13 GMT 2021 - 180 bytes - Viewed (0) -
docs_src/path_params_numeric_validations/tutorial005.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 298 bytes - Viewed (0) -
docs_src/security/tutorial005.py
@app.get("/users/me/", response_model=User) async def read_users_me(current_user: User = Depends(get_current_active_user)): return current_user @app.get("/users/me/items/") async def read_own_items( current_user: User = Security(get_current_active_user, scopes=["items"]), ): return [{"item_id": "Foo", "owner": current_user.username}] @app.get("/status/")
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 5.1K bytes - Viewed (0) -
docs_src/custom_response/tutorial005.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 186 bytes - Viewed (0) -
docs_src/extra_models/tutorial005.py
from typing import Dict from fastapi import FastAPI app = FastAPI() @app.get("/keyword-weights/", response_model=Dict[str, float]) async def read_keyword_weights():
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 205 bytes - Viewed (0) -
docs_src/handling_errors/tutorial005.py
@app.exception_handler(RequestValidationError) async def validation_exception_handler(request: Request, exc: RequestValidationError): return JSONResponse( status_code=status.HTTP_422_UNPROCESSABLE_ENTITY, content=jsonable_encoder({"detail": exc.errors(), "body": exc.body}), ) class Item(BaseModel): title: str size: int @app.post("/items/") async def create_item(item: Item):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 667 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial005.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 276 bytes - Viewed (0) -
docs_src/path_operation_configuration/tutorial005.py
tax: Union[float, None] = None tags: Set[str] = set() @app.post( "/items/", response_model=Item, summary="Create an item", response_description="The created item", ) async def create_item(item: Item): """ Create an item with all the information: - **name**: each item must have a name - **description**: a long description - **price**: required
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 741 bytes - Viewed (0) -
docs_src/body_multiple_params/tutorial005.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 407 bytes - Viewed (0) -
docs_src/body_nested_models/tutorial005.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 517 bytes - Viewed (0)