I/O Runner

paperplane.parser.main._execute(backend_module_name: str, **kwargs) → Any

Invoke run method of the specified module with the given keyword arguments

Parameters
  • backend_module_name (str) – Name of the module to import and invoke the run method of

  • kwargs (Any) – Keyword arguments to pass to the run method

Returns

The value returned by the run method of the given module

Return type

Any

paperplane.parser.main._expand_macro(key: str, params: dict, param_key: str, inputs: dict) → None

Expand params.<param_key> if it contains a known macro.

Modifies the params dict in-place.

Parameters
  • key (str) – Key of the I/O block object

  • params (dict) – Params for the I/O block object

  • param_key (str) – The key in params to check/expand macros for

  • inputs (dict) – Input values collected so far

Returns

None

Return type

NoneType

paperplane.parser.main.parse_and_execute(config: dict) → Dict[str, Any]

Validate, parse and transform the config. Execute backends based on the transformed config to perform I/O operations.

If prompt and/or default contains a macro, it will be expanded.

Parameters

config (dict) – The original config

Returns

A dict containing values collected during I/O operations for the corresponding key

Return type

dict