MCPcopy
hub / github.com/lingfengQAQ/webnovel-writer / get_entity

Function get_entity

webnovel-writer/dashboard/app.py:345–350  ·  view source on GitHub ↗
(entity_id: str)

Source from the content-addressed store, hash-verified

343
344 @app.get("/api/entities/{entity_id}")
345 def get_entity(entity_id: str):
346 with closing(_get_db()) as conn:
347 row = conn.execute("SELECT * FROM entities WHERE id = ?", (entity_id,)).fetchone()
348 if not row:
349 raise HTTPException(404, "实体不存在")
350 return dict(row)
351
352 @app.get("/api/relationships")
353 def list_relationships(entity: Optional[str] = None, limit: int = 200):

Callers

nothing calls this directly

Calls 1

_get_dbFunction · 0.85

Tested by

no test coverage detected