phenopacket_mapper.utils.create_ipynb_in_code module

class phenopacket_mapper.utils.create_ipynb_in_code.NotebookBuilder[source]

Bases: object

A class to build a Jupyter notebook programmatically.

notebook_content

A dictionary representing the notebook structure.

Type:

dict

add_markdown_cell(text)[source]

Adds a Markdown cell to the notebook.

Parameters:

text (str) – The Markdown content to be added to the cell.

add_code_cell(code)[source]

Adds a code cell to the notebook.

Parameters:

code (str) – The Python code to be added to the cell.

write_to_file(path: Path)[source]

Writes the notebook content to a file.

Parameters:

path (str) – The name of the file where the notebook will be saved.