--- id: pksuid version: "1.1.2" license: MIT license_treatment: permissive maintenance: abandoned --- # pksuid — Python package for generating prefixed ksuids. License: permissive · Maintenance: abandoned · Downloads: 359.2K/mo ## What it is and what it does PKSUID is a Python implementation of prefixed k-sortable unique identifiers, extending the KSUID specification (originally from Segment.io) by adding a human-readable prefix inspired by Stripe's ID format. When you generate a PKSUID with a prefix like 'usr', you get an identifier such as 'usr_24OnhzwMpa4sh0NQmTmICTYuFaD'—the prefix immediately signals the resource type, making logs and traces easier to read and debug. The library encodes a timestamp and a random payload into each ID, making them sortable by creation time. You can extract the prefix, timestamp, datetime, and raw payload from any PKSUID, parse IDs back from string or byte representations, and compare IDs using standard comparison operators. The package depends only on pybase62 for base-62 encoding and is tested on Python 3.6 through 3.10. Use it for: - Generate resource IDs in APIs or databases where you want the type visible at a glance (e.g., 'usr_...', 'txn_...'). - Create sortable audit logs or event streams where IDs encode creation time and can be ordered without a separate timestamp field. - Parse and extract metadata (prefix, timestamp, payload) from existing PKSUIDs for debugging or resource tracking. - Replace generic UUIDs in microservices where human-readable prefixes improve operational visibility. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Generates prefixed, k-sortable unique identifiers (PKSUIDs) that combine a human-readable prefix with a timestamp and random payload, making resource types immediately visible in logs and traces. No. The package is abandoned (last release 2022-05-07, no commits since) and receives no maintenance or security updates. While the code is simple and low-friction to install, relying on unmaintained ID generation in production is a risk. For new projects, consider an actively maintained alternative; for existing code already using pksuid, evaluate whether you can migrate to a supported library. ## Install pip install pksuid uv add pksuid poetry add pksuid ## Installing pksuid Before you install: Low install friction; pure Python wheel with a single dependency (pybase62). However, the package is abandoned—last release was 2022-05-07 and no commits since then. No maintenance or security updates are forthcoming. License in practice: MIT license is permissive and imposes no restrictions on use, modification, or redistribution in commercial or private projects. Quickstart: pip install pksuid from pksuid import PKSUID # Generate a new prefixed ID uid = PKSUID('usr') print(uid) # e.g., 'usr_24OnhzwMpa4sh0NQmTmICTYuFaD' # Extract components print(uid.get_prefix()) # 'usr' print(uid.get_timestamp()) # Unix timestamp print(uid.get_datetime()) # Human-readable datetime # Parse from string uid_from_string = PKSUID.parse('usr_24OnhzwMpa4sh0NQmTmICTYuFaD') print(uid_from_string.get_timestamp()) Verify before relying: - Whether the package remains compatible with Python versions released after 2022-05-07. - Whether pybase62 has received security or compatibility updates that pksuid does not track. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 359.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags prefixed unique identifier generation, ksuid with prefix, sortable id generator, resource type prefix ids, timestamp-based unique ids, human-readable unique identifiers, unique-identifiers, abandoned [View on SkillFed](https://skillfed.io/packages/pksuid) · [View on PyPI](https://pypi.org/project/pksuid/)