nanome.util.config module

load_settings()[source]

Load settings from different sources, and combine them by priority.

Order of priority for settings: 1) Highest priority are CLI args used at runtime. 2) Then environment variables. 3) Finally, fall back on config file.

fetch(key)[source]
Fetch a configuration value
Built-in keys are:
host - your NTS server address
port - your NTS server port
key - your NTS key file or string
plugin_files_path - where your plugins will store files
write_log_file - if this is True, plugin will write Logs to a local .log file
Parameters:key (str) – The key of the config value to fetch
set(key, value)[source]
Set a configuration entry in your nanome configuration.
Built-in keys are host, port, key and plugin_files_path.
Parameters:
  • key (str) – The key of the config value to set
  • value (str) – The value to set the config item to
create_parser()[source]

Command Line Interface for Plugins.

rtype: argsparser: args parser