--- id: hashids version: "1.3.1" license: unclear license_treatment: permissive maintenance: abandoned --- # hashids — Implements the hashids algorithm in python. For more information, visit http://hashids.org/ License: permissive · Maintenance: abandoned · Downloads: 2.6M/mo ## What it is and what it does Hashids is a Python port of the JavaScript hashids library that converts integers into short, unique, non-sequential hashes suitable for embedding in URLs and user-facing contexts. It encodes one or many numbers into a hash string and decodes them back to the original integers, making it useful for hiding database IDs from end users while maintaining reversibility. The library supports customization through salt strings (for uniqueness), minimum hash length (for padding), and custom alphabets, and it deliberately avoids generating common English curse words. The package has no external runtime dependencies and installs with low friction. It is tested against Python 2.7 and 3.5–3.8, though the project is now abandoned and has not been updated since its latest release. For most use cases involving ID obfuscation in web applications, it remains functional and stable, but you should be aware that no new features or compatibility updates will be released. Use it for: - Hide sequential database IDs in REST API URLs by encoding them as short hashes that decode back to the original ID. - Generate obfuscated short codes for sharing links or resources without exposing the underlying numeric ID. - Encode multiple related IDs into a single hash for compact URL parameters or API responses. - Customize hash appearance with a salt to prevent third parties from easily predicting or decoding your ID scheme. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Generates short, unique, non-sequential hashes from integers, reversibly encoding and decoding them to obfuscate database IDs in URLs and user-facing contexts. Yes, if you need reversible integer-to-hash encoding for ID obfuscation in web URLs or APIs and are comfortable with an abandoned but stable codebase. The package has no dependencies, installs easily, and works reliably on current Python versions. Install only if you do not expect future maintenance or updates; for new projects requiring active support or enhanced security properties, consider whether a maintained alternative better fits your risk tolerance. ## Install pip install hashids uv add hashids poetry add hashids ## Installing hashids Before you install: Installation is straightforward with no runtime dependencies. However, the package is abandoned—last release was 2020-07-26. It remains compatible with current Python versions but will not receive updates for new issues or language changes. License in practice: Licensed under MIT (permissive), allowing use in open source and commercial projects without restriction. No notable licensing constraints. Quickstart: pip install hashids from hashids import Hashids hashids = Hashids() hashid = hashids.encode(123) # Returns 'Mj3' ints = hashids.decode('Mj3') # Returns (123,) Verify before relying: - Whether the package's obfuscation properties remain adequate for current security expectations or threat models. - Whether abandonment affects compatibility with Python versions released after 3.8. - How long the package has been without updates and whether that impacts production use. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 2.6M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags encode integers to short hashes, obfuscate database ids, youtube-like hash generation, reversible integer encoding, url-safe id obfuscation, hashids algorithm python, non-sequential hash encoding, id-obfuscation, url-encoding [View on SkillFed](https://skillfed.io/packages/hashids) · [View on PyPI](https://pypi.org/project/hashids/)