vuegen.streamlit_reportview module#

StreamlitReportView class for generating Streamlit reports based on a configuration file.

class vuegen.streamlit_reportview.StreamlitReportView(report: Report, report_type: ReportType, streamlit_autorun: bool = False, static_dir: str = PosixPath('streamlit_report/static'), sections_dir: str = PosixPath('streamlit_report/sections'))[source]#

Bases: WebAppReportView

A Streamlit-based implementation of the WebAppReportView abstract base class.

BASE_DIR = 'streamlit_report'#
REPORT_MANAG_SCRIPT = 'report_manager.py'#
SECTIONS_DIR = PosixPath('streamlit_report/sections')#
STATIC_FILES_DIR = PosixPath('streamlit_report/static')#
generate_report(output_dir: str = None) None[source]#

Generates the Streamlit report and creates Python files for each section and its subsections and plots.

Parameters:

output_dir (str, optional) – The folder where the generated report files will be saved (default is SECTIONS_DIR).

run_report(output_dir: str = None) None[source]#

Runs the generated Streamlit report.

Parameters:

output_dir (str, optional) – The folder where the report was generated (default is SECTIONS_DIR).

vuegen.streamlit_reportview.write_python_file(fpath: str, imports: list[str], contents: list[str]) None[source]#

Write a Python file with the given imports and contents.