How do I convert a Python UUID into a string?
You can also do this. Removes the dashes as a bonus. link to docs.
import uuidmy_id = uuid.uuid4().hex
ffba27447d8e4285b7bdb4a6ec76db5c
UPDATE: trimmed UUIDs (without the dashes) are functionally identical to full UUIDS (discussion). The dashes in full UUIDs are always in the same position (article).