Pre-allocating IDs for App Engine datastore
App Engine SDK 1.2.5 is out and there's an unheralded feature that makes datastore backup and restores much easier. The feature didn't warrant a bullet in the revision history or the python SDK release notes.
I present to you the glorious
db.allocate_ids(model_instance_or_key, number_of_ids)
You may use this method to pre-allocate blocks of IDs. It returns a tuple giving you (start_id, end_id).
Why ...