snsary.utils.tracing.config

Path-based key / value store with optional defaults.

Basic key / value access looks like this:

config = Config()
config.set("some.unique.path.attribute", 1)
config.get("some.unique.path.attribute")  # => 1

Defaults can be set for each key access:

config.get("some.other.path.attribute", default=2)  # => 2

Attribute defaults can also be set globally:

config.set("attribute", 3)
config.get("some.other.path.attribute", default=2)  # => 3

Module Contents

class snsary.utils.tracing.config.Config
get(path, default=None)
set(path, value)
reset()