MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _load_profiles

Function _load_profiles

experiments/token_cost/measure_day_token_usage.py:212–219  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

210
211
212def _load_profiles() -> Dict[str, Dict[str, Any]]:
213 conn = db_ops.get_connection()
214 rows = conn.execute("SELECT user_id, profile_json FROM profiles ORDER BY user_id").fetchall()
215 conn.close()
216 result: Dict[str, Dict[str, Any]] = {}
217 for row in rows:
218 result[str(row["user_id"])] = json.loads(row["profile_json"])
219 return result
220
221
222def _load_roles() -> Dict[str, Dict[str, Any]]:

Callers 1

mainFunction · 0.85

Calls 3

fetchallMethod · 0.45
executeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected