Module search_me.models
Expand source code
# -*- coding: utf-8 -*-
from dataclasses import dataclass, asdict
@dataclass
class SearchResult:
"""Search result model
"""
q: str
rating: int
uri: str
title: str
source: str
def to_dict(self):
"""Dict form of dataclass
Returns
-------
Dict
Dict
"""
return asdict(self)
Classes
class SearchResult (q: str, rating: int, uri: str, title: str, source: str)
-
Search result model
Expand source code
class SearchResult: """Search result model """ q: str rating: int uri: str title: str source: str def to_dict(self): """Dict form of dataclass Returns ------- Dict Dict """ return asdict(self)
Class variables
var q : str
var rating : int
var source : str
var title : str
var uri : str
Methods
def to_dict(self)
-
Dict form of dataclass
Returns
Dict
- Dict
Expand source code
def to_dict(self): """Dict form of dataclass Returns ------- Dict Dict """ return asdict(self)