Python:Presentation
Jump to navigation
Jump to search
from dataclasses import dataclass from typing import Optional import dacite @dataclass class Presentation:
""" a presentation of a lecture """ pageTitle:str key:Optional[str] # The key of the Presentation num:Optional[str] # The number of the Presentation name:Optional[str] # The name of the Presentation ppt_file:Optional[str] # The powert point file name of the Presentation sciebo:Optional[str] # The sciebo link suffix of this Presentation gitlab:Optional[str] # The gitlab url of the Presentation moodle:Optional[str] # The moodle pdf annotator page id of the Presentation
@classmethod def askQuery(cls): """ get the ask Query for Presentation Returns: str: the mediawiki markup for the ask query """
ask="""
"""
return ask @classmethod def fromDict(cls,data:dict): """ create a Presentation from the given dict Args: data(dict): the dict to create the Presentation from Returns: Presentation: the freshly created Presentation """ presentation=dacite.from_dict(data_class=cls,data=data) return presentation