Registry / serialization / svix-ksuid

svix-ksuid

JSON →
library0.7.0pypypi✓ verified 84d ago

A pure-Python implementation of KSUIDs (K-Sortable Unique IDentifiers). Version 0.7.0 requires Python >= 3.10 and changes KsuidMs precision to 4ms. Library is stable with occasional minor releases.

pip install svix-ksuid
INSTALL
IMPORT
SIG · SVIX-KSUID
S
svix-ksuid
serializationpythonv0.7.0
Install
3.0s avg
Import
24ms
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.7.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.024s · 19.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.0s · import 0.024s · 20MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Ksuid
from ksuid import Ksuid
from svix_ksuid import Ksuid
The top-level package is 'ksuid', not 'svix_ksuid'.

Basic usage: generate, parse, and work with KSUIDs.

from ksuid import Ksuid # Generate a new KSUID ksuid = Ksuid() print(ksuid) # e.g., '0oGHV0fW3W7oJ9s8X5K0l1vU9T2F' print(ksuid.timestamp) # datetime object # Parse from string parsed = Ksuid.from_string('0oGHV0fW3W7oJ9s8X5K0l1vU9T2F') # Generate a KSUID with millisecond precision from ksuid import KsuidMs ms_ksuid = KsuidMs()
Debug
Known issues
breakingIn v0.7.0, KsuidMs precision changed from 1/256s to 4ms. Existing KsuidMs values generated with older versions will have different timing semantics.
fix
Regenerate any KsuidMs values if millisecond precision is critical.
affects: >=0.7.0
gotchaDo not import from 'svix_ksuid' or any other submodule. The correct import is 'from ksuid import Ksuid'.
fix
Use 'from ksuid import Ksuid'.
affects: all
deprecatedMinimum Python version is now 3.10. Older Python versions are unsupported.
fix
Upgrade Python to 3.10+.
affects: 0.7.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'svix_ksuid'
Incorrect import path; the package is 'ksuid' after installation.
fix
Install the package with 'pip install svix-ksuid' and import from 'ksuid', e.g., 'from ksuid import Ksuid'.
AttributeError: module 'ksuid' has no attribute 'KsuidMs'
KsuidMs was added in v0.6.0; older versions do not have it.
fix
Upgrade to svix-ksuid >=0.6.0: 'pip install --upgrade svix-ksuid'
Upgrade
Version history
0.7.0latest on PyPI · released Mar 14, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
svix-ksuid — pip install svix-ksuid · libregistry