class foxes.utils.FDict(foxes.utils.Dict)[source]

A dictionary with factory support

Attributes

store_created: bool

Flag for storing created objects

factories: list of foxes.utils.Factory

The factories

Public members

FDict(*args, store_created=True, **kwargs)[source]

Constructor.

add_factory(*args, factory=None, **kwargs)[source]

Adds a Factory object.

add_k_factory(*args, **kwargs)[source]

Adds a WakeKFactory.

__contains__(key)[source]

True if the dictionary has the specified key, else False.

get_item(key, prnt=True)[source]

Gets an item, prints readable error if not found

__getitem__(key)[source]

x.__getitem__(y) <==> x[y]

property name

The dictionary name

pop_item(key, *deflt, prnt=True)[source]

Pops an item, prints readable error if not found

__setitem__(key, value)[source]

Set self[key] to value.

update(*args, **kwargs)[source]

Update the dictionary with the key/value pairs from other, overwriting existing keys.

eval(globals=None, locals=None)[source]

Tries to evaluate all string values, recursively.

classmethod from_yaml(yml_file, verbosity=1)[source]

Reads a yaml file