I would like to generate a UUID v4 string starting from the uuid import from the Python standard library. I know I can cast a UUID to str by doing str(uuid.uuid4()), however I am trying to understand what the bytes in that class instance mean. While trying to decode those bytes I see all sorts of errors, either the string
Tag: uuid
How to generate a random UUID which is reproducible (with a seed) in Python
The uuid4() function of Python’s module uuid generates a random UUID, and seems to generate a different one every time: I would like to be able to generate the same random UUID every time I run a script – that is, I’d like to seed the random generator in uuid4(). Is there a way to do this? (Or achieve this
How does a Django UUIDField generate a UUID in Postgresql?
After reading this blog post https://blog.starkandwayne.com/2015/05/23/uuid-primary-keys-in-postgresql/ I wanted to know more about how Django generates uuid because I am using them as my pk. Well, according to the docs, https://docs.djangoproject.com/es/1.9/ref/models/fields/#uuidfield, Django is relying on the Python UUID module https://docs.python.org/3/library/uuid.html#uuid.UUID. But there are many kinds of UUID, and it is not at all clear to me which one is being generated
How to generate SOPInstance UID for DICOM file?
I am developing a system which will be able to create structured report for PACS. Obviously in order to create a DICOM instance (file containing Report data), I need three UIDs for Study, Series and Instance. StudyUID and SeriesUID must be the same as that of study and series that report is created for. But for SOPInstanceUID, I need to