boss.configuration¶
Classes¶
dict() -> new empty dictionary |
|
dict() -> new empty dictionary |
Functions¶
|
Replace |
Module Contents¶
- boss.configuration._resolve_references(value: object, realm: str) object[source]¶
Replace
$namestrings at any depth with remote HEROs.A leading
$$is an escape: one$is stripped and the string is passed on literally. Dict keys are not resolved. Containers are rebuilt, the input is not modified.- Parameters:
value – argument value, possibly a nested dict, list or tuple
realm – realm in which the referenced HEROs are looked up
- Returns:
The value with all references resolved.
- class boss.configuration.Document[source]¶
Bases:
dictdict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
- classmethod parse_string(s: str)[source]¶
Parse a document in JSON format from a string.
- Parameters:
s – string containing the JSON representation of the config
- classmethod parse_url(url: str)[source]¶
Parse a document in JSON format from a URL.
- Parameters:
url – any URL supported by urllib (e.g. file://local.json or https://user:pass@couch.db/database/my_doc)
- class boss.configuration.WorkerConfigurationDocument[source]¶
Bases:
Documentdict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)