CUID2 for Python 3. Next generation GUIDs. Collision-resistant ids optimized for horizontal scaling and performance.
A port of the CUID2 reference implementation by Parallel Drive to Python 3.
- Secure: It's not possible to guess the next ID.
- Collision resistant: It's extremely unlikely to generate the same ID twice.
- Horizontally scalable: Generate IDs on multiple machines without coordination.
- Offline-compatible: Generate IDs without a network connection.
- URL and name-friendly: No special characters.
For more information on the theory and usage of CUID2, see the following.
For more information on the improvements of CUID2 over CUID, see the following.
pip install cuid2
You can generate CUIDs with the following:
from cuid2 import cuid
def main():
my_cuid: str = cuid()