{"id":22428,"library":"svix-ksuid","title":"svix-ksuid","description":"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.","status":"active","version":"0.7.0","language":"python","source_language":"en","source_url":"https://github.com/svix/python-ksuid","tags":["ksuid","unique-id","sortable","uuid-alternative"],"install":[{"cmd":"pip install svix-ksuid","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"The top-level package is 'ksuid', not 'svix_ksuid'.","wrong":"from svix_ksuid import Ksuid","symbol":"Ksuid","correct":"from ksuid import Ksuid"}],"quickstart":{"code":"from ksuid import Ksuid\n\n# Generate a new KSUID\nksuid = Ksuid()\nprint(ksuid)  # e.g., '0oGHV0fW3W7oJ9s8X5K0l1vU9T2F'\nprint(ksuid.timestamp)  # datetime object\n\n# Parse from string\nparsed = Ksuid.from_string('0oGHV0fW3W7oJ9s8X5K0l1vU9T2F')\n\n# Generate a KSUID with millisecond precision\nfrom ksuid import KsuidMs\nms_ksuid = KsuidMs()","lang":"python","description":"Basic usage: generate, parse, and work with KSUIDs."},"warnings":[{"fix":"Regenerate any KsuidMs values if millisecond precision is critical.","message":"In v0.7.0, KsuidMs precision changed from 1/256s to 4ms. Existing KsuidMs values generated with older versions will have different timing semantics.","severity":"breaking","affected_versions":">=0.7.0"},{"fix":"Use 'from ksuid import Ksuid'.","message":"Do not import from 'svix_ksuid' or any other submodule. The correct import is 'from ksuid import Ksuid'.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade Python to 3.10+.","message":"Minimum Python version is now 3.10. Older Python versions are unsupported.","severity":"deprecated","affected_versions":"0.7.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Install the package with 'pip install svix-ksuid' and import from 'ksuid', e.g., 'from ksuid import Ksuid'.","cause":"Incorrect import path; the package is 'ksuid' after installation.","error":"ModuleNotFoundError: No module named 'svix_ksuid'"},{"fix":"Upgrade to svix-ksuid >=0.6.0: 'pip install --upgrade svix-ksuid'","cause":"KsuidMs was added in v0.6.0; older versions do not have it.","error":"AttributeError: module 'ksuid' has no attribute 'KsuidMs'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}