get_base

get_base(key, ensure_exists=True)[source]

Get the base directory for a module.

Parameters:
  • key (str) – The name of the module. No funny characters. The envvar <key>_HOME where key is uppercased is checked first before using the default home directory.

  • ensure_exists (bool) – Should all directories be created automatically? Defaults to true.

Return type:

Path

Returns:

The path to the given

Raises:

ValueError – if the key is invalid (e.g., has a dot in it)