{
  "id": "python-uuid-table",
  "kind": "table",
  "slug": "python-uuid",
  "iil_id": null,
  "note_url": "https://iinventedlight.com/library/notes/python-uuid/",
  "title": "Python uuid: uuid4 for random IDs, uuid5 for name-based IDs, uuid7 for time-ordered IDs",
  "columns": [
    "name",
    "source",
    "detail"
  ],
  "rows": [
    {
      "name": "uuid1()",
      "source": "Python docs",
      "detail": "host ID, sequence number, and the current time"
    },
    {
      "name": "uuid3() / uuid5()",
      "source": "Python docs",
      "detail": "MD5 / SHA-1 hash of a namespace UUID and a name"
    },
    {
      "name": "uuid4()",
      "source": "Python docs",
      "detail": "random"
    },
    {
      "name": "uuid6()",
      "source": "Python docs",
      "detail": "sequence number and current time; improves database locality over uuid1()"
    },
    {
      "name": "uuid7()",
      "source": "Python docs",
      "detail": "48-bit timestamp plus a 42-bit counter for monotonicity within a millisecond"
    },
    {
      "name": "uuid8()",
      "source": "Python docs",
      "detail": "pseudo-random, with optional custom bits"
    },
    {
      "name": "hex",
      "source": "Python docs",
      "detail": "is a 32-character lowercase hexadecimal string; int is a 128-bit integer."
    },
    {
      "name": "is_safe",
      "source": "Python docs",
      "detail": "reports whether the platform generated the UUID in a multiprocessing-safe way."
    },
    {
      "name": "getnode()",
      "source": "Python docs",
      "detail": "may launch a separate program the first time it runs, which could be quite slow."
    }
  ],
  "related_slugs": [
    "python-secrets",
    "python-dataclasses",
    "python-json"
  ],
  "license": "CC-BY-4.0",
  "source_license": "PSF-2.0 (Python docs); PSF-2.0 (python/cpython (GitHub)); prose restates cited source lines in own words",
  "as_of": "2026-11-18",
  "status": "fill-draft-20261118",
  "note": "Restated from the note's GREEN sources; check those sources before relying on a value."
}