tea.dsa Module

Data structures and algorithms module.

class tea.dsa.config.Config(filename=None, data=None, fmt=None, encoding='utf-8', auto_save=True)[source]

Configuration class.

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

Return a set of top level keys in this configuration.

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

Return a value from configuration.

Safe version which always returns a default value if the value is not found.

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

Delete an item from configuration.

Safe version, never, raises an error.

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

Insert at the index.

If the index is not provided appends to the end of the list.

class tea.dsa.config.MultiConfig(filename=None, data=None, fmt=None, encoding='utf-8', auto_save=True)[source]

Base class for configuration management.

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

Return a merged set of top level keys from all configurations.

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

Return a value from configuration.

Safe version which always returns a default value if the value is not found.

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

Delete an item from configuration.

Safe version, never, raises an error.