analyzer.utils.structure_tools

Classes

ItemWithMeta

SimpleCache

Store items in the order the keys were last added

Functions

dotFormat(s, **kwargs)

dictToDot(dictionary)

flatten(l[, limit_to_types])

freeze(data)

mergeUpdate(a, b[, max_depth])

deepMerge(a, *rest[, max_depth])

getWithMeta(directory, key)

globWithMeta(directory, pattern[, current_meta])

deepWalkMeta(directory[, pattern, current_meta, ...])

commonDict(items[, key])

addChain(d, new)

Module Contents

analyzer.utils.structure_tools.dotFormat(s, **kwargs)[source]
analyzer.utils.structure_tools.dictToDot(dictionary)[source]
analyzer.utils.structure_tools.flatten(l, limit_to_types=(list,))[source]
analyzer.utils.structure_tools.freeze(data)[source]
analyzer.utils.structure_tools.mergeUpdate(a: dict[Any, Any], b: dict[Any, Any], max_depth=None)[source]
analyzer.utils.structure_tools.deepMerge(a: dict[Any, Any], *rest, max_depth=None)[source]
class analyzer.utils.structure_tools.ItemWithMeta[source]

Bases: tuple

item[source]
metadata[source]
analyzer.utils.structure_tools.getWithMeta(directory, key)[source]
analyzer.utils.structure_tools.globWithMeta(directory, pattern, current_meta=None)[source]
analyzer.utils.structure_tools.deepWalkMeta(directory, pattern=None, current_meta=None, complete_path=None)[source]
class analyzer.utils.structure_tools.SimpleCache(*args, max_size=None, **kwargs)[source]

Bases: collections.OrderedDict

Store items in the order the keys were last added

max_size = None[source]
__setitem__(key, value)[source]

Set self[key] to value.

__getitem__(key)[source]

Return self[key].

analyzer.utils.structure_tools.commonDict(items, key=lambda x: ...)[source]
analyzer.utils.structure_tools.addChain(d, new)[source]