title: python get all class level attributes on an instance, including parent class
body: <p>I'm trying to get all the class level attributes on a python instance, but when I access the class dictionary (<code>inst.__class__.__dict__</code>), I won't get the class level attributes from the parent type
  ex:</p>
  
  <pre><code>class Parent:
      var1 = ''
  
  class Child(Parent):
      var2 = ''
  
  child_inst = Child()
  for key in child_inst.__class__.__dict__:
      print(key)
  </code></pre>
  
  <p>output: 'var2' (ignoring <code>__atr__</code> attributes)</p>
  
  <p>I can achieve what I want by doing a second loop through</p>
  
  <pre><code>for key in child_inst.__class__.__base__.__dict__:
      print(key)
  </code></pre>
  
  <p>output: 'var1'</p>
  
  <p>but for a complex inheritance hierarchy I'd need to do this an unknown number of times.
  is there a simpler way to do this?</p>
  
  <p>Edit:</p>
  
  <p>I need to get unresolved properties for what I'm attempting to do, not the attribute values themselves I tried using inspect.getmembers, however that appears to resolve the properties</p>