httk.workflow.runtime_utils¶
Safe replacements for small conveniences used by shell runners.
Functions¶
|
Evaluate a bounded arithmetic expression without Python |
|
Render |
|
Compress regular files atomically with a stdlib codec. |
|
Decompress |
Module Contents¶
- httk.workflow.runtime_utils.evaluate_expression(expression: str) int | float | bool[source]¶
Evaluate a bounded arithmetic expression without Python
eval.
- httk.workflow.runtime_utils.render_template(template_path: str | os.PathLike[str], output_path: str | os.PathLike[str], values: collections.abc.Mapping[str, object]) pathlib.Path[source]¶
Render
string.Templateplaceholders from an explicit mapping.
- httk.workflow.runtime_utils.compress_files(paths: collections.abc.Sequence[str | os.PathLike[str]], *, method: str = 'bz2', remove_source: bool = False) tuple[pathlib.Path, Ellipsis][source]¶
Compress regular files atomically with a stdlib codec.
- httk.workflow.runtime_utils.decompress_files(paths: collections.abc.Sequence[str | os.PathLike[str]], *, remove_source: bool = False) tuple[pathlib.Path, Ellipsis][source]¶
Decompress
.bz2,.gz, or.xzfiles atomically.