--- id: sqids version: "0.5.2" license: MIT License Copyright (c) 2023-present Sqids maintainers. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the… (full text in the JSON record) license_treatment: permissive maintenance: aging --- # sqids — Generate YouTube-like ids from numbers. License: permissive · Maintenance: aging · Downloads: 614.3K/mo ## What it is and what it does Sqids is a lightweight library for bidirectional conversion between numbers and short, unique, URL-safe identifiers. It takes one or more non-negative numbers and generates a compact string ID that can be decoded back to the original numbers. The library is designed for public-facing use cases like link shortening and event tracking, where you need readable IDs that don't reveal sensitive information but can be looked up quickly in a database. The package offers several customization options: you can set a minimum ID length for uniformity, provide a custom alphabet to randomize output, and block specific words from appearing in generated IDs. It's implemented as a pure Python module with no external dependencies, making it simple to integrate. The algorithm is deterministic—the same input always produces the same ID—but the library explicitly warns that multiple different number sequences can theoretically decode to the same ID, so canonical verification may be needed in strict applications. Use it for: - Generate short, shareable links for public URLs without exposing internal database IDs - Create event tracking IDs for internal systems that can be quickly decoded for database lookups - Build URL-safe identifiers for APIs where sequential or predictable IDs are undesirable - Encode multiple related numbers into a single compact token for reference in logs or reports - Prevent profanity or blocked words from appearing in auto-generated public-facing IDs ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Sqids encodes numbers into short, unique, URL-safe IDs and decodes them back, with support for custom alphabets, minimum length padding, and profanity filtering. Yes. Sqids is a straightforward, dependency-free library for a specific and common need—converting numbers to short IDs and back. It has no known vulnerabilities, permissive licensing, and broad Python version support. The aging maintenance status is not a blocker for a stable, focused tool. Install it if you need URL-safe ID generation; skip it if you need cryptographic security or true uniqueness guarantees. ## Install pip install sqids uv add sqids poetry add sqids ## Installing sqids Before you install: Low friction: pure Python wheel with no runtime dependencies. Maintenance status is aging (458 days since last release), but the package is stable and supports current Python versions. License in practice: MIT license is permissive; you can use, modify, and distribute this package freely in commercial and open-source projects with minimal restrictions. Quickstart: pip install sqids from sqids import Sqids sqids = Sqids() id = sqids.encode([1, 2, 3]) # "86Rf07" numbers = sqids.decode(id) # [1, 2, 3] Note: multiple IDs can decode to the same number sequence; if canonical IDs matter, re-encode decoded numbers and verify the result matches. Verify before relying: - Performance characteristics for encoding/decoding large batches of numbers or very large number values - Whether the blocklist feature covers all common profanity or requires custom configuration for specific domains ## Package facts - License: MIT License Copyright (c) 2023-present Sqids maintainers. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 614.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags encode numbers to short ids, url-safe id generation, decode ids back to numbers, link shortening library, youtube-like id generator, unique id from numbers, hashids alternative, id-generation, url-safe, encoding [View on SkillFed](https://skillfed.io/packages/sqids) · [View on PyPI](https://pypi.org/project/sqids/)