Python 3.9 is now generally available.


Allocates a range of IDs of size for the model_key defined by model.

Allocates a range of IDs in the datastore such that those IDs will not be automatically assigned to new entities. You can only allocate IDs for model keys from your app. If there is an error, raises a subclass of datastore_errors.Error.

model Model instance, Key or string to serve as a template specifying the ID sequence in which to allocate IDs. Returned ids should only be used in entities with the same parent (if any) and kind as this key.
size Number of IDs to allocate.
config datastore_rpc.Configuration to use for this request.

(start, end) of the allocated range, inclusive.