isomer.misc.path module

get_etc_instance_path()[source]

Get currently set instance configurations base path, e.g. /etc/isomer/instances/

get_etc_path()[source]

Get currently set configuration base path

get_etc_remote_keys_path()[source]

Get currently set remote keys base path

get_etc_remote_path()[source]

Get currently set remote configurations base path

get_log_path()[source]

Get currently set logging base path

get_path(location: str, subfolder: str, ensure: bool = False, instance: str = '', environment: str = '')[source]

Return a normalized path for the running instance and environment

Parameters:
  • location (str) – Either cache, local or lib - all reside in /var
  • subfolder (str) – Subfolder inside location
  • ensure (bool) – Create the folder, if it doesn’t exist and this parameter is True
  • instance (str) – Temporarily override to get at another instance’s folder
  • environment (str) – Temporarily override to pick a specific environment
get_prefix_path()[source]

Get the base prefix

set_etc_path(path)[source]

Override the base path - dangerous! Only use for testing.

set_instance(instance, environment, prefix=None)[source]

Sets the global instance and environment

set_prefix_path(prefix)[source]

Set a new base prefix (Caution!)