Python Create UUID from random string of words

Context: I'm loading data from one database (A) to another database (Weaviate). Weaviate only supports UUID, however database A is using strings as the primary identifier for some tables.

Problem: In order to not duplicate data I need to ensure that the string identifier gets converted to an UUID in …

Continue reading »

Python Create UUID from integer

Code:

import uuid
my_uuid = uuid.UUID(int=1)
print(my_uuid)

That should show the following string:

00000000-0000-0000-0000-000000000001

You can also convert back to integer by doing:

my_uuid.int()

For my use case this was needed because my source database has integer based IDs, however the destination …

Continue reading »