juturna.utils.jt_utils package¶
Module contents¶
- juturna.utils.jt_utils.check_name(name, kind: str) str¶
Check that a name taken from a configuration can be used as a file or folder name, so that joining it to a base folder cannot escape it.
- Parameters:
name (Any) – The name to check.
kind (str) – What the name identifies (
pipeline,node, …), used in the error message.
- Returns:
The name, unchanged.
- Return type:
str
- Raises:
ValueError – If the name is not a string of up to 128 letters, digits,
_,-and., starting with a letter, a digit or_.
- juturna.utils.jt_utils.get_env_var(var_name: str, default_value: T) T¶