privex.helpers.common.env_csv¶
-
privex.helpers.common.
env_csv
(env_key: str, env_default=None, csvsplit=', ') → List[str][source]¶ Quick n’ dirty parsing of simple CSV formatted environment variables, with fallback to user specified
env_default
(defaults to None)Example:
>>> os.setenv('EXAMPLE', ' hello , world, test') >>> env_csv('EXAMPLE', []) ['hello', 'world', 'test'] >>> env_csv('NONEXISTANT', []) []
- Parameters
- Return List[str] parsed_data
A list of str values parsed from the env var