pandagg.interactive.abstract module

class pandagg.interactive.abstract.Obj(**kwargs)[source]

Bases: object

Object class that allows to get items both by attribute __getattribute__ access: obj.attribute or by dict __getitem__ access: >>> obj = Obj(key=’value’) >>> obj.key ‘value’ >>> obj[‘key’] ‘value’

In Ipython interpreter, attributes will be available in autocomplete (except private ones): >>> obj = Obj(key=’value’, key2=’value2’) >>> obj.k # press tab for autocompletion key key2

Items names that are not compliant with python attributes (accepted characters are [a-zA-Z0-9_] without beginning with a figure), will be only available through dict __getitem__ access.

class pandagg.interactive.abstract.TreeBasedObj(tree, root_path=None, depth=1, initial_tree=None)[source]

Bases: pandagg.interactive.abstract.Obj

Recursive Obj whose structure is defined by a treelib.Tree object.

The main purpose of this object is to iteratively expand the tree as attributes of this object. To avoid creating useless instances, only direct children of accessed nodes are expanded.

pandagg.interactive.abstract.is_valid_attr_name(item)[source]