title: get_by_id method on Model classes in Google App Engine Datastore
body: <p>I'm unable to workout how you can get objects from the Google App Engine Datastore using get_by_id. Here is the model</p>
  
  <pre><code>from google.appengine.ext import db
  
  class Address(db.Model):
    description = db.StringProperty(multiline=True)
    latitude = db.FloatProperty()
    longitdue = db.FloatProperty()
    date = db.DateTimeProperty(auto_now_add=True)
  </code></pre>
  
  <p>I can create them, put them, and retrieve them with gql. </p>
  
  <pre><code>address = Address()
  address.description = self.request.get('name')
  address.latitude = float(self.request.get('latitude'))
  address.longitude = float(self.request.get('longitude'))
  address.put()
  </code></pre>
  
  <p>A saved address has values for </p>
  
  <pre><code>&gt;&gt; address.key()
  aglndWVzdGJvb2tyDQsSB0FkZHJlc3MYDQw
  &gt;&gt; address.key().id()
  14
  </code></pre>
  
  <p>I can find them using the key</p>
  
  <pre><code>from google.appengine.ext import db
  address = db.get('aglndWVzdGJvb2tyDQsSB0FkZHJlc3MYDQw')
  </code></pre>
  
  <p>But can't find them by id  </p>
  
  <pre><code>&gt;&gt; from google.appengine.ext import db
  &gt;&gt; address = db.Model.get_by_id(14)
  </code></pre>
  
  <p>The address is None, when I try </p>
  
  <pre><code>&gt;&gt; Address.get_by_id(14)
  AttributeError: type object 'Address' has no attribute 'get_by_id'
  </code></pre>
  
  <p>How can I find by id?</p>
  
  <p>EDIT: It turns out I'm an idiot and was trying find an Address Model in a function called Address. Thanks for your answers, I've marked Brandon as the correct answer as he got in first and demonstrated it should all work.   </p>