Use a ksuid

Install

pip install ksuid

Basic Usage

from ksuid import ksuid

new_id = ksuid()

print(new_id)

Outputs something like:

0ec52752c841cdaef6dac38a2017f2deaac71fa3