cuid2
Next generation GUIDs. Collision-resistant ids optimized for horizontal scaling and performance.
Decision gist · record as of 2026-08-14
Yes. The package is lightweight, actively maintained, has no dependencies, and solves a real problem for distributed systems. MIT licensing is permissive. No known vulnerabilities. Install if you need collision-resistant IDs for horizontal scaling or prefer CUID2 properties over UUID.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later.
- Low friction installation with no runtime dependencies.
- Actively maintained as of 2026-08-12 with stable production status.
License · maintenance · safety
permissive license (permissive) — MIT license permits unrestricted use, modification, and distribution in both open and closed projects with minimal obligations.
last release 2024-04-16 (850 days) · last repo commit 2026-08-12 · 59 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 486,138 downloads/mo, #6,391 on PyPI
Alternatives
Verify before relying
pip install cuid2
from cuid2 import cuid_wrapper
cuid_gen = cuid_wrapper()
my_id = cuid_gen()- Actual collision probability and uniqueness guarantees under stated conditions
- Performance characteristics (generation speed, memory overhead) compared to UUID or other CUID implementations
- Whether cryptographic security claim is formally validated or audited
What it is and what it does
cuid2 is a Python port of the CUID2 reference implementation, providing a generator for collision-resistant identifiers designed for distributed systems. Unlike UUIDs, CUIDs are optimized for horizontal scaling—you can generate IDs on multiple machines simultaneously without central coordination or network calls. The package offers both a simple wrapper for basic use and a configurable class for explicit control over ID length and generation parameters.
The library generates URL-friendly, non-guessable IDs that are secure against prediction attacks. It requires no external dependencies and works offline, making it suitable for applications that need unique identifiers across microservices, databases, or edge deployments where UUID collisions or coordination overhead are concerns.
Use it for
- Generate unique identifiers for database records in distributed microservice architectures without a central ID service.
- Create collision-resistant session or request IDs across multiple application servers running in parallel.
- Build offline-first applications that need to generate unique identifiers without network connectivity.
- Replace UUIDs in systems where readability, URL-safety, or reduced collision probability are priorities.
- Assign unique IDs to events or logs in horizontally scaled systems without coordination overhead.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is lightweight, actively maintained, has no dependencies, and solves a real problem for distributed systems. MIT licensing is permissive. No known vulnerabilities. Install if you need collision-resistant IDs for horizontal scaling or prefer CUID2 properties over UUID.
Install
cuid2 on PyPI
Before you install
Low friction installation with no runtime dependencies. Actively maintained as of 2026-08-12 with stable production status.
Requires Python 3.8 or later.
License in practice
MIT license permits unrestricted use, modification, and distribution in both open and closed projects with minimal obligations.
Quickstart
pip install cuid2
from cuid2 import cuid_wrapper
cuid_gen = cuid_wrapper()
my_id = cuid_gen()
Verify before relying
- Actual collision probability and uniqueness guarantees under stated conditions
- Performance characteristics (generation speed, memory overhead) compared to UUID or other CUID implementations
- Whether cryptographic security claim is formally validated or audited
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 850 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 486,138 / month, #6,391 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.8Topic :: Security :: CryptographyTyping :: Typed |
Evidence: cuid2-2.0.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “distributed guid generation”
- cuid2Generates collision-resistant, cryptographically secure unique…
- uuidProvides UUID object creation and RFC 4122-compliant unique…
- cuidGenerates fast, sequentially-ordered unique identifiers (CUIDs)…
Give your agent the search over MCP, or paste the wish link into any chat.
More Cryptography packages
Certifi provides Mozilla's curated collection of root SSL certificates for Python applications to validate TLS hosts and verify certificate trustworthiness.
cryptography provides cryptographic recipes and low-level primitives for symmetric encryption, message digests, key derivation, and other common cryptographic algorithms in Python.
Pure-Python RSA encryption, decryption, signing, and key generation following PKCS#1 v1.5, with command-line and library interfaces.
pyOpenSSL wraps OpenSSL's SSL/TLS functionality for Python, providing high-level connection objects and certificate handling through a Python-friendly interface around OpenSSL's cryptographic operations.
Provides Microsoft Entra ID token-based authentication for Azure SDK clients through a set of TokenCredential implementations that handle OAuth flows and managed identity support.
PyNaCl provides Python bindings to libsodium for digital signatures, secret-key and public-key encryption, hashing, message authentication, and password-based key derivation.
See also cuid · py-machineid · uuid · nanoid · ulid · fastnanoid · shortuuid · uuid-v7 · sqids · py-cid