f_lib.utils package

Utilities.

f_lib.utils.convert_kwargs_to_shell_list(**kwargs: bool | Iterable[pathlib.Path] | Iterable[str] | str | None) list[str][source]

Convert kwargs to a list of shell arguments.

f_lib.utils.convert_list_to_shell_str(split_command: Iterable[str]) str[source]

Combine a list of strings into a string that can be run as a command.

Handles multi-platform differences.

f_lib.utils.convert_to_cli_flag(arg_name: str, *, prefix: str = '--') str[source]

Convert string kwarg name into a CLI flag.