pyjob.config module

class pyjob.config.ImmutableDictMixin[source]

Bases: object

static assert_lock(fn)[source]
lock()[source]
unlock()[source]
class pyjob.config.PyJobConfig(**kwargs)[source]

Bases: collections.UserDict, pyjob.config.ImmutableDictMixin

file = '/home/docs/.pyjob/pyjob.yml'
classmethod from_default()[source]

Construct the configuration from the default file

Returns:A PyJobConfig instance
Return type:PyJobConfig
static read_yaml(yamlf)[source]

Read a YAML file

Parameters:yamlf (str) – The path to a PyJob YAML config file
Returns:A PyJobConfig instance
Return type:PyJobConfig
Raises:FileNotFoundError – Cannot find YAML file
setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D[source]
update([E, ]**F) → None. Update D from mapping/iterable E and F.[source]

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

write()[source]