get object python code example
Example 1: python get object class
user = User()
type(user).__name__
>> 'User'
Example 2: python get attributes of object
getattr(object, 'attribute_name')
user = User()
type(user).__name__
>> 'User'
getattr(object, 'attribute_name')