- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 62 for USER_ID (0.27 sec)
-
tests/test_route_scope.py
from fastapi.routing import APIRoute, APIWebSocketRoute from fastapi.testclient import TestClient app = FastAPI() @app.get("/users/{user_id}") async def get_user(user_id: str, request: Request): route: APIRoute = request.scope["route"] return {"user_id": user_id, "path": route.path} @app.websocket("/items/{item_id}") async def websocket_item(item_id: str, websocket: WebSocket):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Feb 08 10:23:07 UTC 2023 - 1.5K bytes - Viewed (0) -
docs_src/path_params/tutorial003.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 236 bytes - Viewed (0) -
tests/joins_test.go
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 17 03:58:13 UTC 2024 - 15K bytes - Viewed (0) -
docs_src/query_params/tutorial004_py310.py
from fastapi import FastAPI app = FastAPI() @app.get("/users/{user_id}/items/{item_id}") async def read_user_item( user_id: int, item_id: str, q: str | None = None, short: bool = False ): item = {"item_id": item_id, "owner_id": user_id} if q: item.update({"q": q}) if not short: item.update( {"description": "This is an amazing item that has a long description"} )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 436 bytes - Viewed (0) -
tests/test_dependency_normal_exceptions.py
@app.put("/invalid-user/{user_id}") def put_invalid_user( user_id: str, name: str = Body(), db: dict = Depends(get_database) ): db[user_id] = name raise HTTPException(status_code=400, detail="Invalid user") @app.put("/user/{user_id}") def put_user(user_id: str, name: str = Body(), db: dict = Depends(get_database)): db[user_id] = name return {"message": "OK"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 1.9K bytes - Viewed (0) -
docs_src/query_params/tutorial004.py
from typing import Union from fastapi import FastAPI app = FastAPI() @app.get("/users/{user_id}/items/{item_id}") async def read_user_item( user_id: int, item_id: str, q: Union[str, None] = None, short: bool = False ): item = {"item_id": item_id, "owner_id": user_id} if q: item.update({"q": q}) if not short: item.update(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 468 bytes - Viewed (0) -
tests/test_infer_param_optionality.py
@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: return [{"item_id": "i1", "user_id": "u1"}, {"item_id": "i2", "user_id": "u2"}] else:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 13.3K bytes - Viewed (0) -
samples/slack/src/main/java/okhttp3/slack/OAuthSession.java
public final String scope; public final String user_id; public final String team_name; public final String team_id; public OAuthSession( boolean ok, String accessToken, String scope, String userId, String teamName, String teamId) { this.ok = ok; this.access_token = accessToken; this.scope = scope; this.user_id = userId; this.team_name = teamName; this.team_id = teamId; }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Oct 23 15:24:22 UTC 2016 - 1.4K bytes - Viewed (0) -
clause/joins_test.go
}, }, sql: "LEFT JOIN `user` ON `user_info`.`user_id` = `users`.`id`", }, { name: "RIGHT JOIN", join: clause.Join{ Type: clause.RightJoin, Table: clause.Table{Name: "user"}, ON: clause.Where{ Exprs: []clause.Expression{clause.Eq{clause.Column{Table: "user_info", Name: "user_id"}, clause.PrimaryColumn}}, }, },
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Nov 03 13:03:13 UTC 2022 - 2.6K bytes - Viewed (0) -
docs_src/sql_databases_peewee/sql_app/main.py
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") return db_user @app.post( "/users/{user_id}/items/", response_model=schemas.Item,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 2.2K bytes - Viewed (0)