uuid now properly supports version 7 counters (opens in new tab)
The uuid library added support for the newly specified version 7 UUID format in its 1.6.0 release recently. You can use version 7 UUIDs to generate random but sortable identifiers that make great keys in database tables. They combine a Unix timestamp in millisecond precision, a counter of user-specified width, and random data, in that order into a unique identifier. The initial implementation in uuid didn’t use a counter when generating version 7 UUIDs, just the timestamp and random data. Tha...
Read the original article