MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / get_token

Method get_token

src/core/database.py:962–970  ·  view source on GitHub ↗

Get token by ID

(self, token_id: int)

Source from the content-addressed store, hash-verified

960 return token_id
961
962 async def get_token(self, token_id: int) -> Optional[Token]:
963 """Get token by ID"""
964 async with self._connect() as db:
965 db.row_factory = aiosqlite.Row
966 cursor = await db.execute("SELECT * FROM tokens WHERE id = ?", (token_id,))
967 row = await cursor.fetchone()
968 if row:
969 return Token(**dict(row))
970 return None
971
972 async def get_token_by_st(self, st: str) -> Optional[Token]:
973 """Get token by ST"""

Callers 2

update_tokenFunction · 0.45
refresh_atFunction · 0.45

Calls 2

_connectMethod · 0.95
TokenClass · 0.85

Tested by

no test coverage detected