On this page

new_ulid๏ƒ

Use md.new_ulid from the public package namespace.

Implementation source

new_ulid() → str[source]๏ƒ

Return one freshly minted 26-character ULID string.

Contract:

  • 48-bit millisecond timestamp in the high bits keeps outputs lexicographically sortable across calls in different ms.

  • 80 random bits from os.urandom make collisions negligible (2^80 space per millisecond).

Returns:

A fresh 26-character ULID.

Return type:

str

Topic reference ยท Full contents