django-citext
PostgreSQL CIText integration for Django.
Decision gist · record as of 2026-08-14
Yes, if you use PostgreSQL and need case-insensitive text fields in Django. Low friction, active maintenance, permissive license, and no known vulnerabilities. The main constraint is PostgreSQL dependency—this only works with PostgreSQL databases, not SQLite or MySQL. Suitable for production use in Django 4.2+ projects.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires PostgreSQL database; does not work with SQLite or MySQL.
- Low install friction with a single django dependency.
- Actively maintained with recent commits and compatible with Django 4.2 through 5.2 and Python 3.9+.
License · maintenance · safety
permissive license (permissive) — Permissive license means you can use, modify, and distribute this package with minimal restrictions in both open-source and commercial projects.
last release 2025-12-01 (256 days) · last repo commit 2026-08-11 · 23 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 78,371 downloads/mo, #14,446 on PyPI
Alternatives
Verify before relying
pip install django-citext
# settings.py
INSTALLED_APPS = [
"citext",
]
# models.py
from citext import CITextField, CIEmailField
class MyModel(models.Model):
name = CITextField()
email = CIEmailField(unique=True)- Whether CITextField and CIEmailField support all Django field options beyond the basic usage shown
- Performance characteristics when querying large tables with case-insensitive lookups
- Compatibility with Django ORM features like Q objects and complex queries
What it is and what it does
Django-citext restores PostgreSQL's CIText field support to Django after it was removed in Django 5.0. It provides CITextField and CIEmailField that store text in PostgreSQL's case-insensitive citext type, making queries case-insensitive at the database level rather than in application code. The package is a thin wrapper around Django's model field API, requiring only django as a runtime dependency.
You add it to INSTALLED_APPS, then use CITextField or CIEmailField in your models just like standard Django fields. Queries automatically become case-insensitive—a lookup for 'user@example.com' will match 'USER@EXAMPLE.COM' in the database without extra application logic. This is useful when you need case-insensitive matching but want the database to handle it efficiently.
Use it for
- Store user emails with case-insensitive uniqueness constraints to prevent duplicate accounts with different casing
- Build case-insensitive username or slug fields that match user input regardless of capitalization
- Query product names or tags without worrying about case variations in the stored data
- Migrate from Django's removed CIText implementation to a compatible replacement
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you use PostgreSQL and need case-insensitive text fields in Django.
Low friction, active maintenance, permissive license, and no known vulnerabilities. The main constraint is PostgreSQL dependency—this only works with PostgreSQL databases, not SQLite or MySQL. Suitable for production use in Django 4.2+ projects.
Install
django-citext on PyPI
Before you install
Low install friction with a single django dependency. Actively maintained with recent commits and compatible with Django 4.2 through 5.2 and Python 3.9+.
Requires PostgreSQL database; does not work with SQLite or MySQL.
License in practice
Permissive license means you can use, modify, and distribute this package with minimal restrictions in both open-source and commercial projects.
Quickstart
pip install django-citext
# settings.py
INSTALLED_APPS = [
"citext",
]
# models.py
from citext import CITextField, CIEmailField
class MyModel(models.Model):
name = CITextField()
email = CIEmailField(unique=True)
Verify before relying
- Whether CITextField and CIEmailField support all Django field options beyond the basic usage shown
- Performance characteristics when querying large tables with case-insensitive lookups
- Compatibility with Django ORM features like Q objects and complex queries
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagedjango |
| Maintenance | Actively maintained 256 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 78,371 / month, #14,446 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 1 - PlanningEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 4.2Framework :: Django :: 5.1Framework :: Django :: 5.2Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: DatabaseTopic :: Software DevelopmentTopic :: Software Development :: Libraries :: Python Modules |
Evidence: django_citext-1.0.3-py3-none-any.whl
Tags
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 postgresql case insensitive”
- django-citextProvides PostgreSQL CIText field types for Django models, enabling…
- str2boolConverts string representations like 'yes', 'true', '1', 'no',…
- jaraco.textProvides utility functions for common text operations including…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
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.
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.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also django-postgres-extra · django-netfields · django-postgres-copy · django-add-default-value · django-deprecate-fields · sqlalchemy-searchable · django-colorfield · django-pglocks · django-pg-returning · django-types