Python API ========== The Python API mirrors the command-line host. It discovers installed components, loads a component by group and name, and dispatches arguments to that component. .. code-block:: python from heliokit import Heliokit kit = Heliokit() for component in kit.list_components(): print(component.metadata.kind, component.metadata.operation, component.metadata.name) summary = kit.read_data( "vti", input=r"D:\data\volume.vti", ) result = kit.run_component( "model", "kp", mode="predict", results_dir=r"D:\runs\kp", ) Installation API ---------------- Use ``mode="online"`` to install component packages from the configured Python package index. This is the mode expected for normal user environments. .. code-block:: python from heliokit import Heliokit kit = Heliokit() kit.install_packages("heliokit-data-vti", mode="online") kit.install_packages("heliokit-data-vti", "heliokit-viz3d-volume", mode="online") Component metadata ------------------ Components expose metadata through ``heliokit-base``. A host can inspect ``kind``, ``operation``, ``name``, and command argument specifications before executing the component. .. code-block:: python component = kit.get_component("data", "vti") print(component.metadata) output = component.run(input=r"D:\data\volume.vti")