I have an object in python like <Person at /project/persons/id>
. Now I want to see all the attributes of the person like I have FirstName, LastName and title of the person. What I would like to get is
{'FirstName':'Anna', 'LastName': 'Perry', 'Title' : 'Ms.'}
.
I tried object.__dict__
but it gives me other built-in attributes as well. I would only like to get user specified attributes. Can anyone help me with this?