MCPcopy Index your code
hub / github.com/python/cpython / _uuid7_get_counter_and_tail

Function _uuid7_get_counter_and_tail

Lib/uuid.py:836–842  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

834_last_counter_v7 = 0 # 42-bit counter
835
836def _uuid7_get_counter_and_tail():
837 rand = int.from_bytes(os.urandom(10))
838 # 42-bit counter with MSB set to 0
839 counter = (rand >> 32) & 0x1ff_ffff_ffff
840 # 32-bit random data
841 tail = rand & 0xffff_ffff
842 return counter, tail
843
844
845def uuid7():

Callers 1

uuid7Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…