from configman import DotDict # create a new DotDict instance config = DotDict() # set some keys and values config.foo = 'bar' config.baz = 42 # access the keys using dot notation print(config.foo) # prints 'bar' print(config.baz) # prints 42
from configman import DotDict # create a new DotDict instance with some initial values config = DotDict(foo='bar', baz=42) # update the value of a key config.baz = 'hello' # access the keys using dot notation print(config.foo) # prints 'bar' print(config.baz) # prints 'hello'This example shows how you can create a new DotDict instance with some initial values, update the value of a key, and access the keys using dot notation. In conclusion, the Python package library used in these examples is "configman" which provides a DotDict class to easily manage configurations that can be accessed using dot notation.