- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 101 for get_user (0.12 sec)
-
tests/test_dependency_contextvars.py
): response = await call_next(request) response.headers["custom"] = "foo" return response @app.get("/user", dependencies=[Depends(set_up_request_state_dependency)]) def get_user(): request_state = legacy_request_state_context_var.get() assert request_state return request_state["user"] client = TestClient(app) def test_dependency_contextvars(): """
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Feb 17 12:40:12 UTC 2022 - 1.5K bytes - Viewed (0) -
docs_src/sql_databases_peewee/sql_app/main.py
def read_users(skip: int = 0, limit: int = 100): users = crud.get_users(skip=skip, limit=limit) return users @app.get( "/users/{user_id}", response_model=schemas.User, dependencies=[Depends(get_db)] ) def read_user(user_id: int): db_user = crud.get_user(user_id=user_id) if db_user is None: raise HTTPException(status_code=404, detail="User not found")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 2.2K bytes - Viewed (0) -
tests/test_infer_param_optionality.py
from fastapi.testclient import TestClient app = FastAPI() user_router = APIRouter() item_router = APIRouter() @user_router.get("/") def get_users(): return [{"user_id": "u1"}, {"user_id": "u2"}] @user_router.get("/{user_id}") def get_user(user_id: str): return {"user_id": user_id} @item_router.get("/") def get_items(user_id: Optional[str] = None): if user_id is None:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 13.3K bytes - Viewed (0) -
docs/em/docs/tutorial/sql-databases.md
{!> ../../docs_src/sql_databases/sql_app_py39/main.py!} ``` //// 👥 🏗 💽 🎉 ⏭ 🔠 📨 🔗 ⏮️ `yield`, & ⤴️ 📪 ⚫️ ⏮️. & ⤴️ 👥 💪 ✍ 🚚 🔗 *➡ 🛠️ 🔢*, 🤚 👈 🎉 🔗. ⏮️ 👈, 👥 💪 🤙 `crud.get_user` 🔗 ⚪️➡️ 🔘 *➡ 🛠️ 🔢* & ⚙️ 👈 🎉. /// tip 👀 👈 💲 👆 📨 🇸🇲 🏷, ⚖️ 📇 🇸🇲 🏷.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 25K bytes - Viewed (0) -
docs/zh/docs/tutorial/sql-databases.md
{!> ../../docs_src/sql_databases/sql_app/main.py!} ``` //// 我们在依赖项中的每个请求之前利用`yield`创建数据库会话,然后关闭它。 所以我们就可以在*路径操作函数*中创建需要的依赖,就能直接获取会话。 这样,我们就可以直接从*路径操作函数*内部调用`crud.get_user`并使用该会话,来进行对数据库操作。 /// tip 请注意,您返回的值是 SQLAlchemy 模型或 SQLAlchemy 模型列表。 但是由于所有路径操作的response_model都使用 Pydantic模型/使用orm_mode模式,因此您的 Pydantic 模型中声明的数据将从它们中提取并返回给客户端,并进行所有正常的过滤和验证。 /// /// tip
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 27.1K bytes - Viewed (0) -
src/main/java/jcifs/smb1/ntlmssp/Type3Message.java
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Fri Mar 22 21:10:40 UTC 2019 - 22.9K bytes - Viewed (0) -
src/main/java/jcifs/smb/Kerb5Authenticator.java
* @param to * @param from */ public static void cloneInternal ( Kerb5Authenticator to, Kerb5Authenticator from ) { NtlmPasswordAuthenticator.cloneInternal(to, from); to.setUser(from.getUser()); to.setRealm(from.getRealm()); to.setService(from.getService()); to.setLifeTime(from.getLifeTime()); to.setUserLifeTime(from.getUserLifeTime());
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Sun Jul 01 13:12:10 UTC 2018 - 13K bytes - Viewed (0) -
src/main/java/jcifs/ntlmssp/Type3Message.java
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Tue Jul 07 12:07:20 UTC 2020 - 30.6K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/es/log/bsentity/BsSearchLog.java
registerModifiedProperty("searchWord"); this.searchWord = value; } public String getUser() { checkSpecifiedProperty("user"); return convertEmptyToNull(user); } public void setUser(String value) { registerModifiedProperty("user"); this.user = value; } public String getUserAgent() {
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:37:57 UTC 2024 - 12.2K bytes - Viewed (0) -
tests/create_test.go
*GetUser("bulk_4", Config{Account: true, Pets: 3, Toys: 0, Company: false, Manager: true, Team: 0, Languages: 3, Friends: 0}), *GetUser("bulk_5", Config{Account: false, Pets: 0, Toys: 3, Company: true, Manager: false, Team: 1, Languages: 3, Friends: 1}), *GetUser("bulk_6", Config{Account: true, Pets: 4, Toys: 3, Company: false, Manager: true, Team: 1, Languages: 3, Friends: 0}),
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Mar 19 03:50:28 UTC 2024 - 26.4K bytes - Viewed (0)