CfgBase#

class pyedb.configuration.cfg_common.CfgBase#

Provide common attribute export and assignment helpers.

Overview#

get_attributes

Return a filtered dictionary of instance attributes.

set_attributes

Set all non-protected attributes from this instance onto pedb_object.

Import detail#

from pyedb.configuration.cfg_common import CfgBase

Attribute detail#

CfgBase.protected_attributes = ['pedb', 'pyedb_obj', 'api']#

Method detail#

CfgBase.get_attributes(exclude=None)#

Return a filtered dictionary of instance attributes.

Parameters:
excludestr or list of str, optional

Attribute names to exclude in addition to the built-in protected_attributes.

Returns:
dict

Attribute name → value pairs, with None, empty lists, and empty dicts omitted, and private (_-prefixed) names excluded.

CfgBase.set_attributes(pedb_object)#

Set all non-protected attributes from this instance onto pedb_object.

Parameters:
pedb_objectobject

Target object that must already expose the same attribute names.

Raises:
AttributeError

If an attribute returned by get_attributes() is not present on pedb_object.