Python:Sheet
Jump to navigation
Jump to search
from dataclasses import dataclass from typing import Optional import dacite @dataclass class Sheet:
""" I am a relevance level """ pageTitle:str gid:Optional[str] # the gid of this Sheet concept:Optional[str] # the concept this Sheet hold data for url:Optional[str] # the base url for the sheet
@classmethod def askQuery(cls): """ get the ask Query for Sheet Returns: str: the mediawiki markup for the ask query """
ask="""
"""
return ask @classmethod def fromDict(cls,data:dict): """ create a Sheet from the given dict Args: data(dict): the dict to create the Sheet from Returns: Sheet: the freshly created Sheet """ sheet=dacite.from_dict(data_class=cls,data=data) return sheet