$npx skillfedfor your agent

django-sqids

Non-intrusive sqids library for Django

With conditionsPyPI Application FrameworksReleased Jul 202588.6K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — django_sqids-0.2.2-py3-none-any.whl
v0.2.2 · released 2025-07-09 · Python <4,>=3.8.1 · 1 runtime deps: sqids

Yes, if you need to expose model IDs as obfuscated strings in URLs or APIs without database changes. The package is low-friction, well-tested across modern Django and Python versions, and has no known vulnerabilities. The aging status (401 days since last release) is not a blocker—the last commit is recent and the codebase is stable—but verify that the documented Django and Python versions match your project before committing.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Django 3.2 or later and Python 3.8.1 or later.
  • Low friction—single runtime dependency (sqids) and a pure-Python wheel.
  • Actively maintained with a recent commit (2025-07-09) and tested against Django 3.2, 4.2, 5.0 and Python 3.8–3.12, though the project is aging (401 days since last release).

License · maintenance · safety

MIT (permissive) — MIT license is permissive; you may use, modify, and distribute this package freely in commercial and private projects without restriction.

last release 2025-07-09 (401 days) · last repo commit 2025-07-09 · 90 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 88,554 downloads/mo, #13,717 on PyPI

Verify before relying

pip install django-sqids

from django_sqids import SqidsField
from django.db import models

class Item(models.Model):
    sqid = SqidsField(real_field_name="id")

item = Item.objects.create()
item.sqid  # e.g., '1Z'
Item.objects.get(sqid="1Z")
  • Performance impact of sqid encoding/decoding on large querysets or high-throughput applications.
  • Compatibility with Django ORM features beyond the documented lookups (in, isnull, gt, gte, lt, lte).
  • Behavior when used with Django's prefetch_related or select_related optimizations.
Same gist for agents: .md · .json

What it is and what it does

django-sqids is a Django model field that transparently encodes your model's primary key as a sqid—a short, URL-safe, obfuscated string—without storing anything extra in the database or altering your model schema. It acts as a proxy over the real `id` field, so queries and filtering work seamlessly: you can filter by sqid string, use it in URLs as a slug, and even search by sqid in Django Admin. The underlying integer ID remains unchanged; the sqid is computed on the fly.

The package is built on the sqids library and supports customization per field (min_length, alphabet, prefix) or globally via Django settings. It integrates with Django REST Framework serializers and supports standard ORM lookups like `in`, `gt`, `gte`, `lt`, `lte`, and `isnull`. The project was forked from django-hashids to adopt the newer Sqids library, which removed the "salt" parameter; django-sqids provides a `shuffle_alphabet` helper to achieve similar per-field uniqueness.

Use it for

  • Expose model IDs in URLs and APIs as short, non-sequential sqid strings instead of raw integers.
  • Hide internal database IDs from external users while keeping queries simple and database-native.
  • Search and filter records by sqid in Django Admin without writing custom code.
  • Generate unique, obfuscated identifiers for each model or field using per-instance alphabet shuffling.
  • Build REST APIs that accept sqid strings in place of numeric IDs without custom serializer logic.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need to expose model IDs as obfuscated strings in URLs or APIs without database changes.

The package is low-friction, well-tested across modern Django and Python versions, and has no known vulnerabilities. The aging status (401 days since last release) is not a blocker—the last commit is recent and the codebase is stable—but verify that the documented Django and Python versions match your project before committing.

Install

django-sqids on PyPI

Before you install

Low friction—single runtime dependency (sqids) and a pure-Python wheel. Actively maintained with a recent commit (2025-07-09) and tested against Django 3.2, 4.2, 5.0 and Python 3.8–3.12, though the project is aging (401 days since last release).

Requires Django 3.2 or later and Python 3.8.1 or later.

License in practice

MIT license is permissive; you may use, modify, and distribute this package freely in commercial and private projects without restriction.

Quickstart

pip install django-sqids

from django_sqids import SqidsField
from django.db import models

class Item(models.Model):
    sqid = SqidsField(real_field_name="id")

item = Item.objects.create()
item.sqid  # e.g., '1Z'
Item.objects.get(sqid="1Z")

Verify before relying

  • Performance impact of sqid encoding/decoding on large querysets or high-throughput applications.
  • Compatibility with Django ORM features beyond the documented lookups (in, isnull, gt, gte, lt, lte).
  • Behavior when used with Django's prefetch_related or select_related optimizations.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release <4,>=3.8.1
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
sqids
MaintenanceAging 401 days since the last release
Last repo commit
First released
Downloads88,554 / month, #13,717 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9

Evidence: django_sqids-0.2.2-py3-none-any.whl

Tags

Capabilities
django model field sqidsencode primary key sqidobfuscate database ids djangosqid proxy fielddjango url slug sqidshide internal ids django
Topics
django-fieldid-obfuscationurl-slug
PyPI keywords
djangosqidssqidhashidshashid

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “django model field sqids”

Give your agent the search over MCP, or paste the wish link into any chat.

More Application Frameworks packages

fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
textual Worth it
PyPI · Application Frameworks · released Jun 2026

Textual is a Python framework for building cross-platform user interfaces that run in the terminal or web browser using a modern, component-based API.

Install it if you're developing CLI tools, dashboards, or interactive terminal applications.

MITpure Python
443.6Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
mcp Worth it
PyPI · Application Frameworks · released Jul 2026

Build and connect to Model Context Protocol servers that expose tools, resources, and prompts to LLM applications over stdio, HTTP, or SSE transports.

Install it if you need to build or connect to servers.

MITpure Python · 3.10+
319.3Mdownloads / mo
Werkzeug Worth it
PyPI · Application Frameworks · released Apr 2026

Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.

BSD-3-Clausepure Python · 3.9+
268.1Mdownloads / mo

See also django-hashids · sqids · django-hashid-field · hashids · shortuuid · django-bitfield · django-picklefield · django-netfields · djangoql · django-deprecate-fields