title: Python Inspect - Lookup the data type for a property in a GAE db.model Class
body: <pre><code>class Employee(db.Model):
    firstname           = db.StringProperty()       
    lastname            = db.StringProperty()       
    address1            = db.StringProperty() 
    timezone            = db.FloatProperty()     #might be -3.5 (can contain fractions)
  
  
  class TestClassAttributes(webapp.RequestHandler):
    """
    Enumerate attributes of a db.Model class 
    """
    def get(self): 
       for item in Employee.properties(): 
           self.response.out.write("&lt;br/&gt;" + item)
           #for subitem in item.__dict__: 
           #   self.response.out.write("&lt;br/&gt;&amp;nbsp;&amp;nbsp;--" + subitem) 
  </code></pre>
  
  <p>The above will give me a list of the property names for the variable "item". 
  My idea of <code>item.__dict__</code> didn't work because <code>item</code> was a <code>str</code>.
  How can I then display the data field type for each property, such as <code>db.FloatProperty()</code> for the property called <code>timezone</code>? </p>
  
  <p>GAE = Google App Engine - but I'm sure the same answer would work for any class. </p>
  
  <p>Thanks,
  Neal Walters </p>