larzuuid
Sortable IDs — UUIDv7, ULID, nanoid.
Time-sortable identifiers — UUIDv7, ULID and nanoid — for database keys that order by creation time without a separate timestamp column.
larzscript pkg install uuid
What you get
- UUIDv7 / ULID / nanoid
- Time-sortable
- URL-safe options
- Zero dependencies
Try it
import "uuid" as uuid
let id4 = uuid.v4()
let id7 = uuid.v7()
print(len(id4), len(id4.split("-")))
print(len(id7), id7[14:15])
print(len(uuid.ulid()))
print(len(uuid.nanoid()), len(uuid.nanoid(10)))Output
36 5 36 7 26 21 10
Why it's in the Larz Stack
larzuuid is a real Larzscript package (larzscript pkg install uuid) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.