api/lyric_search_new/constructors.py

17 lines
360 B
Python
Raw Normal View History

2025-01-13 20:47:39 -05:00
#!/usr/bin/env python3.12
from dataclasses import dataclass, asdict
@dataclass
class LyricsResult:
"""Class for returned Lyrics Results"""
artist: str
song: str
src: str
lyrics: str
2025-01-17 06:41:56 -05:00
confidence: int
2025-01-15 20:17:49 -05:00
time: float = 0.00
2025-01-13 20:47:39 -05:00
def dict(self):
"""Return as dict"""
return {k: str(v) for k, v in asdict(self).items()}