title: gae Model get_by_id() vs get_by_key_name()
body: <p>I am wondering about fetching records using Model.get_by_key_name() vs Model.get_by_id()</p>
  
  <p>For example, let's say I am returning some JSON that will be used to display a table of records, and for each record, there is a button to delete that record. Suppose I have model 'Foo' and model instance 'foo'.</p>
  
  <p>I believe I can associate each button with the appropriate record using either:</p>
  
  <pre><code>str(foo.key())  #suppose it eval's to "axhYm92ZZXJvY2tyDgsSCENhnb3J5GBQM"
  </code></pre>
  
  <p>or</p>
  
  <pre><code>foo.key().id()  #suppose it eval's to "57"
  </code></pre>
  
  <p>One of these values will make its way into an HTML form, and user may click the button which makes the request to delete the record with this key/id.</p>
  
  <p>The request would then result in either:</p>
  
  <pre><code>Foo.get_by_key_name("axhYm92ZZXJvY2tyDgsSCENhnb3J5GBQM").delete()
  </code></pre>
  
  <p>or</p>
  
  <pre><code>Foo.get_by_id(57).delete()
  </code></pre>
  
  <p>Now, being the indecision-riddled ADHD programmer that I am, I need to know ... which is the "right" way? They both seem to work, but are there circumstances that make one preferable to the other? Is there some advantage to using the 'key' way vs the 'id' way?</p>