attributes of object python code example
Example 1: python get attributes of object
getattr(object, 'attribute_name')
Example 2: python object with attributes
class Object(object):
pass
a = Object()
a.somefield = somevalue
getattr(object, 'attribute_name')
class Object(object):
pass
a = Object()
a.somefield = somevalue