Coverage for src/ipyvizzustory/st_env/story.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v7.2.2, created at 2023-03-23 18:23 +0100

1"""A module for working with ipyvizzu-story presentations.""" 

2 

3from typing import Optional 

4 

5from streamlit.components.v1 import html 

6 

7from ipyvizzu import Data, Style 

8 

9from ipyvizzustory.storylib.story import Story as StoryLib 

10 

11 

12class Story(StoryLib): 

13 """A class for representing a presentation story in Jupyter environment.""" 

14 

15 def __init__(self, data: Data, style: Optional[Style] = None): 

16 super().__init__(data=data, style=style) 

17 

18 def play(self) -> None: 

19 """A method for displaying the html code.""" 

20 

21 html(self.to_html())