Coverage for src / marimushka / __init__.py: 100%
4 statements
« prev ^ index » next coverage.py v7.13.2, created at 2026-01-27 07:24 +0000
« prev ^ index » next coverage.py v7.13.2, created at 2026-01-27 07:24 +0000
1"""Marimushka - Export marimo notebooks to HTML/WebAssembly with custom templates.
3This package provides tools for exporting marimo notebooks to static HTML and
4interactive WebAssembly formats. It generates an index page listing all exported
5notebooks, enabling deployment to static hosting platforms like GitHub Pages,
6S3, or any web server without requiring Python on the viewer's side.
8Key Features:
9 - Export marimo notebooks to static HTML or interactive WebAssembly
10 - Support for three export modes: static notebooks, interactive notebooks, and apps
11 - Customizable index page generation using Jinja2 templates
12 - Parallel export for improved performance
13 - Watch mode for automatic re-export on file changes
15Typical usage example:
16 from marimushka.export import main
18 # Export all notebooks in the default directories
19 main()
21 # Export with custom settings
22 main(
23 output="_site",
24 notebooks="my_notebooks",
25 apps="my_apps",
26 parallel=True,
27 max_workers=8,
28 )
30CLI usage:
31 # Export notebooks
32 marimushka export --output _site --notebooks notebooks --apps apps
34 # Watch mode for development
35 marimushka watch --notebooks notebooks --apps apps
37Exports:
38 This module re-exports the exception hierarchy and result types for
39 convenient access by library users. See the exceptions module for
40 detailed documentation of each exception class.
41"""
43import importlib.metadata
45from .exceptions import (
46 BatchExportResult,
47 ExportError,
48 ExportExecutableNotFoundError,
49 ExportSubprocessError,
50 IndexWriteError,
51 MarimushkaError,
52 NotebookError,
53 NotebookExportResult,
54 NotebookInvalidError,
55 NotebookNotFoundError,
56 OutputError,
57 TemplateError,
58 TemplateInvalidError,
59 TemplateNotFoundError,
60 TemplateRenderError,
61)
63__version__ = importlib.metadata.version("marimushka")
65__all__ = [
66 "BatchExportResult",
67 # Export exceptions
68 "ExportError",
69 "ExportExecutableNotFoundError",
70 "ExportSubprocessError",
71 "IndexWriteError",
72 # Base exceptions
73 "MarimushkaError",
74 # Notebook exceptions
75 "NotebookError",
76 # Result types
77 "NotebookExportResult",
78 "NotebookInvalidError",
79 "NotebookNotFoundError",
80 # Output exceptions
81 "OutputError",
82 # Template exceptions
83 "TemplateError",
84 "TemplateInvalidError",
85 "TemplateNotFoundError",
86 "TemplateRenderError",
87 "__version__",
88]