I was wondering if anyone knows of a good way to generate GUIDs on python google app engine. I feel like there is a simple way that people are using, what would you suggest.
You cannot change an app's region after you set it. Note: Two locations, which are called europe-west and us-central in App Engine commands and in the Google Cloud console, are called europe-west1 and us-central1 , respectively, elsewhere in Google documentation.
Individuals and organizations can create GUIDs using a free GUID generator that is available online. An online generator constructs a unique GUID according to RFC 4122. When creating a GUID, users should note the timestamp, clock sequence and the node ID -- such as a Media Access Control (MAC) address.
The uuid module should be available.
Why do you need uuids? Usually they're necessary to make really unique primary keys, but GAE's datastore essentially ought to be taking care of that for you.
Code example using the uuid module:
from uuid import uuid4
print(uuid4())
# Output: 7d720c5a-b3e9-455e-961c-0e37b330b098
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With