- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for tool (0.13 sec)
-
docs_src/query_params/tutorial003_py310.py
from fastapi import FastAPI app = FastAPI() @app.get("/items/{item_id}") async def read_item(item_id: str, q: str | None = None, short: bool = False): item = {"item_id": item_id} if q: item.update({"q": q}) if not short: item.update( {"description": "This is an amazing item that has a long description"} )
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 374 bytes - Viewed (0) -
docs_src/security/tutorial003_py310.py
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token") class User(BaseModel): username: str email: str | None = None full_name: str | None = None disabled: bool | None = None class UserInDB(User): hashed_password: str def get_user(db, username: str): if username in db: user_dict = db[username] return UserInDB(**user_dict)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 2.4K bytes - Viewed (0)