simvx.core.scene_codegen

Scene-to-code conversion – generate Python source from serialized scene JSON.

Reads a .json scene file (as produced by :func:simvx.core.scene.save_scene) and emits an equivalent Python module with a build_scene() factory function.

Public API: scene_to_code(scene_path) – file path → Python source string scene_dict_to_code(data, name) – parsed dict → Python source string

Module Contents

Functions

scene_to_code

Convert a .json scene file to equivalent Python source.

scene_dict_to_code

Convert a serialized scene dict to Python source.

Data

API

simvx.core.scene_codegen.__all__

[‘scene_to_code’, ‘scene_dict_to_code’]

simvx.core.scene_codegen.scene_to_code(scene_path: str | pathlib.Path) str

Convert a .json scene file to equivalent Python source.

simvx.core.scene_codegen.scene_dict_to_code(data: dict, scene_name: str = 'scene') str

Convert a serialized scene dict to Python source.