I am not sure if I understand your question correctly. If you are trying to find the type of a given instance, you can use the built-in function type .
an_object = Car(name = "foo", speed = 80) an_object.save() type(an_object) # <class 'project.app.models.Car'>
Or, if you want to check if an_object instance of Car , you can use isinstance .
isinstance(an_object, Car)
Manoj govindan
source share