On this page
  1. uuid.uuid3
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

uuid.uuid3

Prev: uuid.uuid1 | Up: uuid | Next: uuid.uuid4
Rel: uuid.bytes_, uuid.Enum, uuid.getnode, uuid.int_
Ref: docs.python.org — uuid.uuid3
Tags: #public #python3 #stdlib #uuid


Import

import uuid
from uuid import uuid3

Signature & Overview

uuid.uuid3(namespace, name)

Generate a UUID from the MD5 hash of a namespace UUID and a name.

Usage

import uuid

u = uuid.uuid3(uuid.NAMESPACE_DNS, 'example.com')
assert u.version == 3 and u == uuid.uuid3(uuid.NAMESPACE_DNS, 'example.com')

Gotchas

REPL Inspect

from uuid import uuid3
help(uuid3)

Linked from

Related notes