django-filter
Django-filter is a reusable Django application for allowing users to filter querysets dynamically.
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-filteruv
uv add django-filterpoetry
poetry add django-filterInstalling 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
Tags
More Dynamic Content packages
MarkupSafe provides a text object that escapes…
permissive · top 100 on PyPI
Jinja2Jinja2 is a templating engine that renders…
permissive · top 100 on PyPI
soupsieveSoupsieve is a CSS selector library designed to…
permissive · top 100 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
FlaskFlask is a lightweight WSGI web application…
permissive · top 1,000 on PyPI
MakoMako compiles Python-embedded templates into…
permissive · top 1,000 on PyPI
adblockparserParses Adblock Plus filter rules and matches…
permissive · top 15,000 on PyPI
djangorestframework-filtersExtends Django REST Framework with advanced…
permissive · top 15,000 on PyPI
magic-filterProvides a filter mechanism based on dynamic…
permissive · top 5,000 on PyPI
django-admin-list-filter-dropdownRenders Django admin list filters as dropdown…
permissive · top 5,000 on PyPI
djangorestframework-datatablesAdds server-side Datatables support to Django…
permissive · top 15,000 on PyPI
django-admin-rangefilterAdds date range, datetime range, and numeric…
permissive · top 5,000 on PyPI
django-more-admin-filtersProvides a collection of Django admin filter…
permissive · top 15,000 on PyPI
django-admin-autocomplete-filterAdds autocomplete-based filtering to Django…
copyleft · top 15,000 on PyPI
django-mathfiltersProvides Django template filters for basic…
permissive · top 15,000 on PyPI
djangorestframework-role-filtersAdds role-based access control to Django REST…
permissive · top 5,000 on PyPI