CodeGenerator.generate_modules()
Generate a multi-module Python package for target cells.
Usage
CodeGenerator.generate_modules(
targets=None,
*,
constant_types=None,
constant_ranges=None,
constant_blanks=False,
input_ranges=None,
blank_ranges=None,
series_bindings=None,
bindings_workbook=None,
series_docstring_callback=None,
docstring_renderer="google"
)Returns a mapping of module filenames to file contents. Callers choose how to lay out files on disk (e.g. a package directory).
The generated package has five flat files: - init.py: exports compute_all and DEFAULT_INPUTS - api.py: compute_all, make_context, and series-binding set_* / compute_* functions - data.py: DEFAULT_INPUTS and CONSTANTS - runtime.py: embedded Excel runtime (emit_runtime) - internals.py: formula cell functions + resolver dispatch