Settings and configuration

Module is containing all necessary global variables for package.

Module also has ability to read user-defined data from two paths: $HOME/_SETTINGS_PATH and /etc/_SETTINGS_PATH.


If the first path is found, other is ignored.

Example of the configuration file ($HOME/edeposit/aleph.json):

    "EDEPOSIT_EXPORT_SIGNATURE": "edeposit fancy signature",
    "EDEPOSIT_EXPORT_REFERER": "from edeposit ^-^"


aleph.settings.BASE_PATH = '/home/docs/checkouts/'

Module’s path.

aleph.settings.ALEPH_DEFAULT_BASE = 'nkc'

Default base used to search in Aleph

aleph.settings.DEFAULT_LIBRARY = 'CZE01'

Default library in aleph.

aleph.settings.ALEPH_URL = ''

URL used to read from Aleph. See Aleph’s X-service module.

aleph.settings.EDEPOSIT_EXPORT_SIGNATURE = 'edeposit'

Signature used when the module is writing to the Aleph

aleph.settings.EDEPOSIT_EXPORT_REFERER = 'edeposit'

Referer, which is used when module is writing to the Aleph

aleph.settings.ALEPH_EXPORT_URL = ''

URL, of form, which is used to write to the Aleph


Get list of all uppercase, non-private globals (doesn’t start with _).

Vrací:Uppercase names defined in globals() (variables from this module).
Typ návratové hodnoty:

Set global variables to values defined in config_dict.

Parametry:config_dict (dict) – dictionary with data, which are used to set globals.


config_dict have to be dictionary, or it is ignored. Also all variables, that are not already in globals, or are not types defined in _ALLOWED (str, int, float) or starts with _ are silently ignored.