uuid.uuid3() vs uuid.uuid5()
uuid.uuid3() and uuid.uuid5() are both Python UUID Module APIs, and choosing between them is a common point of confusion. This page compares their syntax, parameters, return values, and typical use cases so you can pick the right one. uuid.uuid3(): Generates a UUID v3 from a namespace UUID and a name (MD5 hash). Its syntax is uuid.uuid3(namespace, name), and it returns uUID object uuid.uuid5(): Generates a UUID v5 from a namespace UUID and a name (SHA-1 hash). Its syntax is uuid.uuid5(namespace, name), and it returns uUID object Example of uuid.uuid3(): uuid.uuid3(uuid.NAMESPACE_DNS, "example.com"). Example of uuid.uuid5(): uuid.uuid5(uuid.NAMESPACE_URL, "https://example.com"). Read the full references for uuid.uuid3() and uuid.uuid5() to see parameters, edge cases, and example code side by side. Other UUID Module APIs worth comparing: uuid.uuid4(), uuid.uuid1(), uuid.UUID. Both belong to the UUID Module category in the Python Reference documentation. Try both in the Python playground to see the behavioral difference live.