Skip to content

Ipy

ipyvizzustory.env.ipy

Jupyter/IPython environment dependent modules.

ipyvizzustory.env.ipy.story

A module for working with presentation stories in Jupyter/IPython environment.

Story

Bases: StoryLib

A class for representing a presentation story in Jupyter/IPython environment.

Source code in ipyvizzustory/env/ipy/story.py
class Story(StoryLib):
    """A class for representing a presentation story in Jupyter/IPython environment."""

    def __init__(self, data: Data, style: Optional[Style] = None):
        """
        Presentation Story constructor.

        Args:
            data: Data set for the whole presentation story.
                After initialization `data` can not be modified,
                but it can be filtered.
            style (optional): Style settings for the presentation story.
                `style` can be changed at each presentation step.
        """

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

    def _repr_html_(self) -> str:
        return self.to_html()

    def play(self) -> None:
        """A method for displaying the assembled html code in Jupyter/IPython environment."""

        display_html(HTML(self.to_html()))
__init__(data, style=None)

Presentation Story constructor.

Parameters:

Name Type Description Default
data Data

Data set for the whole presentation story. After initialization data can not be modified, but it can be filtered.

required
style optional

Style settings for the presentation story. style can be changed at each presentation step.

None
Source code in ipyvizzustory/env/ipy/story.py
def __init__(self, data: Data, style: Optional[Style] = None):
    """
    Presentation Story constructor.

    Args:
        data: Data set for the whole presentation story.
            After initialization `data` can not be modified,
            but it can be filtered.
        style (optional): Style settings for the presentation story.
            `style` can be changed at each presentation step.
    """

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

A method for displaying the assembled html code in Jupyter/IPython environment.

Source code in ipyvizzustory/env/ipy/story.py
def play(self) -> None:
    """A method for displaying the assembled html code in Jupyter/IPython environment."""

    display_html(HTML(self.to_html()))