edeposit.amqp.settings module

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.

Note

If the first path is found, other is ignored.

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

{
    "RABBITMQ_HOST": "localhost",
    "RABBITMQ_PORT": "2222"
}

Attributes

edeposit.amqp.settings.RABBITMQ_ALEPH_DAEMON_KEY = 'request'
edeposit.amqp.settings.RABBITMQ_ALEPH_DAEMON_QUEUE = 'daemon'
edeposit.amqp.settings.RABBITMQ_ALEPH_EXCEPTION_KEY = 'exception'
edeposit.amqp.settings.RABBITMQ_ALEPH_EXCHANGE = 'search'
edeposit.amqp.settings.RABBITMQ_ALEPH_PLONE_KEY = 'result'
edeposit.amqp.settings.RABBITMQ_ALEPH_PLONE_QUEUE = 'plone'
edeposit.amqp.settings.RABBITMQ_ALEPH_VIRTUALHOST = 'aleph'
edeposit.amqp.settings.RABBITMQ_HOST = '127.0.0.1'
edeposit.amqp.settings.RABBITMQ_PORT = '5672'
edeposit.amqp.settings.RABBITMQ_USER_NAME = 'guest'
edeposit.amqp.settings.RABBITMQ_USER_PASSWORD = 'guest'
edeposit.amqp.settings.SETTINGS_PATH = '/edeposit/amqp.json'

Path which is appended to default search paths ($HOME and /etc).

Note

It has to start with /. Variable is appended to the default search paths, so this doesn’t mean, that the path is absolute!

edeposit.amqp.settings.get_all_constants()[source]

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

Returns:list – Uppercase names defined in globals() (variables from this module).
edeposit.amqp.settings.substitute_globals(config_dict)[source]

Set global variables to values defined in config_dict.

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

Note

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.

Table Of Contents

Previous topic

edeposit.amqp.pikadaemon module

This Page