skillfed

django-filter

Django-filter is a reusable Django application for allowing users to filter querysets dynamically.

django-filter v26.1 17.3M downloads/30d#1,125 on PyPI4,685
Permissive license Active released

What it is and what it does

Django-filter is a mature, production-stable Django application that lets you build dynamic filtering interfaces by declaring which model fields should be filterable, then automatically generates query filters from URL parameters. It mirrors Django's ModelForms API, making it familiar to Django developers. The package handles the common pattern of turning GET parameters into QuerySet filters without requiring you to write custom filter logic for each view.

It integrates with both traditional Django views and Django REST Framework, offering a dedicated FilterSet and filter backend for REST APIs. The package supports current Python versions (3.10 through 3.14) and recent Django releases, with an explicit commitment to supporting all current Django versions and matching Python versions. It has no known vulnerabilities and receives regular maintenance.

Use it for:

  • Build admin-style filterable list pages where users select criteria from URL parameters to narrow results.
  • Add filtering to Django REST Framework API endpoints without writing custom filter backends.
  • Quickly prototype search and filter interfaces for model-based data without hand-coding QuerySet logic.
  • Implement multi-field filtering by category, price range, or status in a single FilterSet declaration.
  • Migrate filtering logic from custom views to a reusable FilterSet that works across multiple endpoints.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Django-filter adds dynamic QuerySet filtering to Django views and REST Framework APIs, letting you declaratively build filterable interfaces from URL parameters without writing custom filter logic.

Yes. Django-filter is a stable, well-maintained package in the top 5000 PyPI downloads with zero known vulnerabilities, low install friction, and permissive licensing. It solves a common Django pattern (dynamic filtering from URL parameters) with a proven API. Install it if you need to add filtering to Django views or REST APIs without writing custom filter code.

Install

django-filter on PyPI

pip

pip install django-filter

uv

uv add django-filter

poetry

poetry add django-filter

Installing django-filter

Before you install

Low friction: pure Python wheel, single runtime dependency (Django), and actively maintained with releases within the last month. Supports current Python versions (3.10–3.14) and recent Django versions (5.2, 6.0, 6.1).

License in practice

Permissive BSD license; no restrictions on commercial or proprietary use.

Quickstart

pip install django-filter

# In settings.py
INSTALLED_APPS = [
    'django_filters',
]

# In your view
filter = ProductFilter(request.GET, queryset=Product.objects.all())

Verify before relying

  • Whether the package maintains backward compatibility across minor version updates as claimed in its 'Year plus two' deprecation policy.
  • Performance characteristics when filtering large querysets or with complex filter definitions.
  • Exact API surface and available filter field types beyond the basic example in the description.

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 1 — Django
Maintenance actively maintained — 34 days since the last release
Last repo commit
First released
Downloads 17,280,685/month — #1,125 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: django_filter-26.1-py3-none-any.whl

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 5.2Framework :: Django :: 6.0Framework :: Django :: 6.1Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating 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.14

Tags

django queryset filteringdynamic url parameter filtersdjango admin-style list filtersrest framework filter backenddjango model filteringdeclarative query filtersdjango filterset
django-ecosystemquery-filteringrest-framework

More Dynamic Content packages

MarkupSafe

MarkupSafe provides a text object that escapes…

permissive · top 100 on PyPI

Jinja2

Jinja2 is a templating engine that renders…

permissive · top 100 on PyPI

soupsieve

Soupsieve is a CSS selector library designed to…

permissive · top 100 on PyPI

Werkzeug

Werkzeug is a WSGI utility library providing…

permissive · top 1,000 on PyPI

Flask

Flask is a lightweight WSGI web application…

permissive · top 1,000 on PyPI

Mako

Mako compiles Python-embedded templates into…

permissive · top 1,000 on PyPI

adblockparser

Parses Adblock Plus filter rules and matches…

permissive · top 15,000 on PyPI

djangorestframework-filters

Extends Django REST Framework with advanced…

permissive · top 15,000 on PyPI

magic-filter

Provides a filter mechanism based on dynamic…

permissive · top 5,000 on PyPI

django-admin-list-filter-dropdown

Renders Django admin list filters as dropdown…

permissive · top 5,000 on PyPI

djangorestframework-datatables

Adds server-side Datatables support to Django…

permissive · top 15,000 on PyPI

django-admin-rangefilter

Adds date range, datetime range, and numeric…

permissive · top 5,000 on PyPI

django-more-admin-filters

Provides a collection of Django admin filter…

permissive · top 15,000 on PyPI

django-admin-autocomplete-filter

Adds autocomplete-based filtering to Django…

copyleft · top 15,000 on PyPI

django-mathfilters

Provides Django template filters for basic…

permissive · top 15,000 on PyPI

djangorestframework-role-filters

Adds role-based access control to Django REST…

permissive · top 5,000 on PyPI