$npx skillfedfor your agent

django-bitfield

BitField in Django

With conditionsPyPI Software DevelopmentReleased Aug 2026216.8K downloads / moPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — django_bitfield-2.4.0-py2.py3-none-any.whl
v2.4.0 · released 2026-08-02 · 1 runtime deps: Django

Yes, if you use PostgreSQL and need to store multiple boolean flags efficiently in Django models. The package is actively maintained, has no known vulnerabilities, and low install friction. However, verify the license before use and confirm PostgreSQL compatibility with your deployment. Not suitable for SQLite or MySQL projects.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires PostgreSQL; SQLite does not support save operations using Bit, and MySQL fails on most BitField queries.
  • Django >= 1.11 required.
  • Low friction installation with a single dependency on Django.

License · maintenance · safety

(unclear) — License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license before use in proprietary or restricted contexts.

last release 2026-08-02 (12 days) · last repo commit 2026-08-02 · 383 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 216,818 downloads/mo, #9,371 on PyPI

Verify before relying

pip install django-bitfield

from bitfield import BitField

class MyModel(models.Model):
    flags = BitField(flags=('awesome_flag', 'flaggy_foo'))

o = MyModel.objects.create(flags=0)
if o.flags.awesome_flag:
    print('Flag is set')
  • Exact Python version requirements (requires_python is unspecified in metadata)
  • Whether the package is compatible with the latest Django LTS versions
  • Performance characteristics when dealing with large numbers of flags
Same gist for agents: .md · .json

What it is and what it does

django-bitfield adds a BitField model field to Django that packs multiple boolean flags into a single database BigIntegerField (stored as BIGINT). Instead of creating separate boolean columns for each flag, you define them once in the field definition and then query and manipulate them using familiar Django ORM syntax—bitwise operations, filtering, and exclusion all work through the standard QuerySet API.

The package includes admin integration via a checkbox widget and list filter, making it easy to manage flags in Django's admin interface. It's designed for PostgreSQL; SQLite and MySQL have significant limitations. The field stores flags efficiently and allows you to test, set, and clear individual flags or combinations of flags using intuitive Python syntax on model instances.

Use it for

  • Store user permissions or feature flags in a single database column instead of many boolean columns
  • Implement role-based access control where each role is a bit in a flags field
  • Track feature toggles or configuration states for A/B testing or gradual rollouts
  • Query models by multiple flag combinations efficiently using bitwise filtering
  • Manage admin UI for flag-based settings using the built-in checkbox widget

Worth the install?

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

With conditions

Yes, if you use PostgreSQL and need to store multiple boolean flags efficiently in Django models.

The package is actively maintained, has no known vulnerabilities, and low install friction. However, verify the license before use and confirm PostgreSQL compatibility with your deployment. Not suitable for SQLite or MySQL projects.

Install

django-bitfield on PyPI

Before you install

Low friction installation with a single dependency on Django. Actively maintained as of 2026-08-02 with recent Python 3.14 support added. Repository shows 383 stars and no archived status.

Requires PostgreSQL; SQLite does not support save operations using Bit, and MySQL fails on most BitField queries. Django >= 1.11 required.

License in practice

License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license before use in proprietary or restricted contexts.

Quickstart

pip install django-bitfield

from bitfield import BitField

class MyModel(models.Model):
    flags = BitField(flags=('awesome_flag', 'flaggy_foo'))

o = MyModel.objects.create(flags=0)
if o.flags.awesome_flag:
    print('Flag is set')

Verify before relying

  • Exact Python version requirements (requires_python is unspecified in metadata)
  • Whether the package is compatible with the latest Django LTS versions
  • Performance characteristics when dealing with large numbers of flags

Package facts

LicenseNot declared unclear
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
Django
MaintenanceActively maintained 12 days since the last release
Last repo commit
First released
Downloads216,818 / month, #9,371 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Framework :: DjangoIntended Audience :: DevelopersIntended Audience :: System AdministratorsOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development

Evidence: django_bitfield-2.4.0-py2.py3-none-any.whl

Tags

Capabilities
django bitfield flagsdjango boolean flags databasedjango bigintegerfield flagsdjango admin checkbox flagsdjango bit operations model field
Topics
django-ormdatabase-optimizationflags-permissions

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 bitfield flags”

  • django-bitfieldProvides a BitField model field for Django that stores multiple…
  • django-enumProvides a Django model field type that stores Python enumerations…
  • django-flagsDjango-Flags provides a feature flag system for Django projects,…

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

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

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.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

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.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
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
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
distlib With conditions
PyPI · Software Development · released Jun 2026

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.

permissive licensepure Python
323.3Mdownloads / mo

See also django-enumfields · django-multiselectfield · django-sqids · django-flags · jsonfield · djfernet · django-enum · django-fernet-fields-v2 · django-pydantic-field · django-better-admin-arrayfield