Package gavo :: Package base :: Module config
[frames] | no frames]

Module config

source code

Definition of DC config options and their management including I/O.

Classes
  RootRelativeConfigItem
  WebRelativeConfigItem
  RelativeURL
is a configuration item that is interpreted relative to the server's root URL.
  EatTrailingSlashesItem
is a config item that must not end with a slash.
  EnsureTrailingSlashesItem
is a config item that must end with a slash.
  ProfileItem
is a config item within the profiles magic section.
  AuthorityConfigItem
an IVOA Identifers-compatible authority.
  Error
  ProfileParseError
  DBProfile
is a profile for DB access.
  ProfileParser
is a parser for DB profiles.
  Configuration
A container for settings.
Functions
 
loadConfig() source code
 
get(arg1, arg2=None, default=<class 'gavo.utils.fancyconfig._Undefined'>) source code
 
set(arg1, arg2, arg3=None, origin='user')
sets a configuration item to a value.
source code
 
getDBProfile(profileName) source code
 
makeFallbackMeta(reload=False)
fills meta.configMeta with items from $configDir/defaultmeta.txt.
source code
 
main() source code
Variables
  defaultSettingsPath = '/etc/gavo.rc'
  __package__ = 'gavo.base'
Function Details

set(arg1, arg2, arg3=None, origin='user')

source code 

sets a configuration item to a value.

arg1 can be a section, in which case arg2 is a key and arg3 is a value; alternatively, if arg3 is not given, arg1 is a key in the defaultSection, and arg2 is the value.

All arguments are strings that must be parseable by the referenced item's _parse method.

Origin is a tag you can use to, e.g., determine what to save.