Search code examples
pythonpython-3.xuuidzero

Create UUID with Zeros in Python


In python how can a UUID be created with all zero values?

There is a similar question that is asked and answered for java, this question is specific to python.


Solution

  • According to the docs:

    import uuid
    uuid.UUID(int=0)
    # UUID('00000000-0000-0000-0000-000000000000')