Use db.allocate_ids()as described here to generate unique identifiers for your objects.
Here is an example in the example from the link above:
from google.appengine.ext import db
new_ids = db.allocate_ids(handmade_key, 1)
new_id_num = int(new_id[0])
new_key = db.Key.from_path('MyModel', new_id_num)
new_instance = MyModel(key=new_key)
...
new_instance.put()
( link 2970 link )