Skip to content

Db viewer entry point

db_viewer_entry_point

Functions:

main

main() -> None

Launch the database viewer dashboard.

Raises:

  • ImportError –

    If the dashboard extra is not installed.

Source code in src\vimseo\dashboards\database_viewer\db_viewer_entry_point.py
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
def main() -> None:
    """Launch the database viewer dashboard.

    Raises:
        ImportError: If the ``dashboard`` extra is not installed.
    """
    import_optional("streamlit", "dashboard", feature="The database viewer dashboard")

    from vimseo.dashboards.database_viewer import db_viewer

    sys.argv = [
        "streamlit",
        "run",
        str(Path(db_viewer.__file__)),
    ]
    runpy.run_module("streamlit", run_name="__main__")