env_keyval

privex.helpers.common.env_keyval(env_key: str, env_default=None, valsplit=':', csvsplit=',') → List[Tuple[str, str]][source]

Parses an environment variable containing key:val,key:val into a list of tuples [(key,val), (key,val)]

See parse_keyval()

Parameters
  • env_key (str) – Environment var to attempt to load

  • env_default (any) – Fallback value if the env var is empty / not set (Default: None)

  • valsplit (str) – A character (or several) used to split the key from the value (default: colon :)

  • csvsplit (str) – A character (or several) used to terminate each keyval pair (default: comma ,)