boss.configuration - heros-boss unknown documentation

Skip to content
Back to top
View this page

# boss.configuration

## Classes

`Document` | dict() -> new empty dictionary
`WorkerConfigurationDocument` | dict() -> new empty dictionary

## Module Contents

class boss.configuration.Document

  Bases: `dict`

  dict() -> 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)

    Parse a document in JSON format from a string.

    Parameters:

      s – string containing the JSON representation of the config

  classmethod parse_url(url: str)

    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

  Bases: `Document`

  dict() -> 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)

  datasource_config()
  build_hero_for_boss(boss_object, realm='heros')