mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-23 06:35:23 +01:00
25 lines
504 B
Python
25 lines
504 B
Python
import json
|
|
import base64
|
|
import hashlib
|
|
from collections import OrderedDict
|
|
from quart import url_for
|
|
from typing import NamedTuple, Optional, List, Dict
|
|
from sqlite3 import Row
|
|
|
|
|
|
class Jukebox(NamedTuple):
|
|
id: str
|
|
user: str
|
|
title: str
|
|
wallet: str
|
|
sp_user: str
|
|
sp_secret: str
|
|
sp_access_token: str
|
|
sp_refresh_token: str
|
|
sp_device: str
|
|
sp_playlists: str
|
|
price: int
|
|
|
|
@classmethod
|
|
def from_row(cls, row: Row) -> "Jukebox":
|
|
return cls(**dict(row))
|