Coverage for src/ipyvizzustory/env/py/story.py: 100%
8 statements
« prev ^ index » next coverage.py v7.5.4, created at 2024-07-10 10:22 +0000
« prev ^ index » next coverage.py v7.5.4, created at 2024-07-10 10:22 +0000
1"""A module for working with presentation stories in `Python` environment."""
3from typing import Optional
5from ipyvizzu import Data, Style
7from ipyvizzustory.storylib.story import Story as StoryLib
10class Story(StoryLib):
11 """A class for representing a presentation story in `Python` environment."""
13 def __init__(self, data: Data, style: Optional[Style] = None):
14 """
15 Presentation Story constructor.
17 Args:
18 data: Data set for the whole presentation story.
19 After initialization `data` can not be modified,
20 but it can be filtered.
21 style: Style settings for the presentation story.
22 `style` can be changed at each presentation step.
23 """
25 super().__init__(data=data, style=style)
27 def play(self) -> str:
28 """
29 A method for returning the assembled `HTML` code in `Python` environment.
31 Returns:
32 The assembled `HTML` code as string.
33 """
35 return self.to_html()