lnbits-legend/lnbits/extensions/tpos/models.py

14 lines
233 B
Python
Raw Normal View History

2020-05-08 21:11:59 +02:00
from sqlite3 import Row
2020-04-10 22:05:31 +01:00
from typing import NamedTuple
class TPoS(NamedTuple):
id: str
wallet: str
name: str
currency: str
2020-05-08 21:11:59 +02:00
@classmethod
def from_row(cls, row: Row) -> "TPoS":
return cls(**dict(row))