settings submodule¶
Module is containing all necessary global variables for the package.
Module also has the ability to read user-defined data from following paths:
SETTINGS_PATHenv variable file pointer to .json file.$HOME/_SETTINGS_PATH/etc/_SETTINGS_PATH
See _SETTINGS_PATH for details.
Note
When the first path is found, others is ignored.
Example of the configuration file ($HOME/edeposit/storage.json):
{
"PRIVATE_INDEX_USERNAME": "username",
"PRIVATE_INDEX_PASSWORD": "password"
}
Example of starting the program with env variable:
export WA_KAT_SETTINGS="/tmp/conf.json"; bin/edeposit_storage_server.py
Attributes¶
-
storage.settings.ZCONF_PATH= '/home/docs/checkouts/readthedocs.org/user_builds/edeposit-amqp-storage/checkouts/stable/src/edeposit/amqp/storage/zconf'¶ Path to the directory with zeo.conf and zeo_client.conf.
-
storage.settings.ZEO_SERVER_PATH= '/home/docs/checkouts/readthedocs.org/user_builds/edeposit-amqp-storage/checkouts/stable/src/edeposit/amqp/storage/zconf/zeo.conf'¶
-
storage.settings.ZEO_CLIENT_PATH= '/home/docs/checkouts/readthedocs.org/user_builds/edeposit-amqp-storage/checkouts/stable/src/edeposit/amqp/storage/zconf/zeo_client.conf'¶
-
storage.settings.PUB_PROJECT_KEY= 'pub_storage'¶ This is used in ZODB. DON’T CHANGE THIS.
-
storage.settings.ARCH_PROJECT_KEY= 'archive_storage'¶ This is used in ZODB. DON’T CHANGE THIS.
-
storage.settings.TREE_PROJECT_KEY= 'tree_storage'¶ This is used in ZODB. DON’T CHANGE THIS.
-
storage.settings.PRIVATE_INDEX= False¶ Should the index be private?
-
storage.settings.PRIVATE_INDEX_USERNAME= 'edeposit'¶ Username for private index.
-
storage.settings.PRIVATE_INDEX_PASSWORD= ''¶ Password for private index. You HAVE TO set it.
-
storage.settings.PUBLIC_DIR= ''¶ Path to the directory for public publications.
-
storage.settings.PRIVATE_DIR= ''¶ Path to the private directory, for non-downloadabe pubs.
-
storage.settings.ARCHIVE_DIR= ''¶ Path to the directory, where the archives will be stored.
-
storage.settings.HNAS_INDICATOR= ''¶ Path to the file saved on HNAS, which is used to indicate that HNAS is mounted.
-
storage.settings.HNAS_IND_ALLOWED= False¶ Should the HNAS indicator be used or not?
-
storage.settings.WEB_ADDR= 'localhost'¶ Address where the webserver should listen.
-
storage.settings.WEB_PORT= 8080¶ Port for the webserver.
-
storage.settings.WEB_SERVER= 'wsgiref'¶ Use paste for threading.
-
storage.settings.WEB_DB_TIMEOUT= 30¶ How often should web refresh connection to DB.
-
storage.settings.DOWNLOAD_KEY= 'download'¶ Used as part of the url. Don’t change this later.
-
storage.settings.UUID_DOWNLOAD_KEY= 'UUID'¶ Used as part of the url. Don’t change this.
-
storage.settings.PATH_DOWNLOAD_KEY= 'tree_by_path'¶ Key used for URL composition for trees.
-
storage.settings.ISSN_DOWNLOAD_KEY= 'tree_by_issn'¶ Key used for URL composition for trees.
-
storage.settings._SETTINGS_PATH= 'edeposit/storage.json'¶ Appended to default search paths.
-
storage.settings._ALLOWED= [<type 'str'>, <type 'unicode'>, <type 'int'>, <type 'float'>, <type 'long'>, <type 'bool'>]¶ Allowed types.