skillfed

djangorestframework-filters

Better filtering for Django REST Framework

djangorestframework-filters v0.11.1 347.8K downloads/30d#7,346 on PyPI853
Permissive license MIT DORMANT released

What it is and what it does

djangorestframework-filters is an extension to Django REST Framework and django-filter that simplifies filtering across model relationships in API endpoints. Instead of writing complex query logic, you can traverse foreign keys and reverse relations using double-underscore syntax (e.g., `/api/articles?author__first_name__icontains=john`) and apply exclusion filters with a `!=` operator. The package wraps FilterSet and provides a DRF-compatible backend.

The package's main appeal is relationship traversal and method-based filtering, though the description notes that many of its original features have been merged back into django-filter itself. It depends on both djangorestframework and django-filter as runtime dependencies. The codebase is dormant—no releases since 2019-03-21 and last activity in 2023-11-25—so it is stable but receives no active maintenance or updates for newer versions.

Use it for:

  • Filter API results by nested model fields without writing custom filter logic (e.g., find articles by author's first name).
  • Build exclusion filters using `!=` syntax to exclude records matching a condition in a single query parameter.
  • Traverse multiple relationship levels in a single filter call (e.g., company → department → manager).
  • Support method-based filtering across relationships, allowing custom logic to apply to related querysets.
  • Restrict related object querysets dynamically based on request context (e.g., show only departments in the user's company).

Worth the install?

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

Extends Django REST Framework with advanced filtering capabilities, enabling you to filter API results across model relationships and apply negation syntax like `param!=value`.

Yes, if you are using Django and DRF versions from the 2015–2019 era and need relationship-aware filtering without custom code. No, if you are on modern Django/DRF versions—compatibility is unverified, the package is dormant, and django-filter itself has absorbed many of the original features. Check whether django-filter's current capabilities meet your needs before adopting this package.

Install

djangorestframework-filters on PyPI

pip

pip install djangorestframework-filters

uv

uv add djangorestframework-filters

poetry

poetry add djangorestframework-filters

Installing djangorestframework-filters

Before you install

Low install friction with a pure-Python wheel. Maintenance is dormant—last release was 2019-03-21 and last commit 2023-11-25—so expect no active bug fixes or feature development, though the package remains stable for existing Django/DRF versions it targets.

License in practice

MIT license (permissive) means you can use, modify, and distribute this package freely in commercial and open-source projects with minimal restrictions.

Quickstart

pip install djangorestframework-filters

from djangorestframework_filters import FilterSet

class ProductFilter(FilterSet):
    class Meta:
        model = Product
        fields = {'name': ['exact', 'icontains']}

# In Django settings:
REST_FRAMEWORK = {
    'DEFAULT_FILTER_BACKENDS': (
        'rest_framework_filters.backends.DjangoFilterBackend',
    ),
}

Requires djangorestframework and django-filter to be installed; package is dormant and targets older Django/DRF versions, so compatibility with modern versions is unverified.

Verify before relying

  • Compatibility with Django and DRF versions released after 2019.
  • Whether the package's features have been superseded by django-filter or djangorestframework since 2019.
  • Active maintenance or community support status beyond the last commit date.

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 2 — djangorestframework, django-filter
Maintenance dormant — 2,703 days since the last release
Last repo commit
First released
Downloads 347,792/month — #7,346 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: djangorestframework_filters-0.11.1-py2.py3-none-any.whl

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Topic :: Internet :: WWW/HTTP

Tags

django rest framework filteringfilter across relationships djangodrf advanced filteringdjango api query filteringrelationship filtering rest apidjango filter negationrest framework filter backend
django-rest-frameworkfilteringquery-builder

More WWW/HTTP packages

urllib3

urllib3 is an HTTP client library that provides…

permissive · top 100 on PyPI

requests

Requests is a Python HTTP library that…

permissive · top 100 on PyPI

h11

h11 is a pure-Python HTTP/1.1 protocol…

permissive · top 100 on PyPI

httpx

HTTPX is a fully featured HTTP client library…

permissive · top 100 on PyPI

httpcore

A minimal low-level HTTP client library that…

permissive · top 100 on PyPI

aiohttp

aiohttp is an async HTTP client and server…

permissive · top 100 on PyPI

django-filter

Django-filter adds dynamic QuerySet filtering…

permissive · top 5,000 on PyPI

magic-filter

Provides a filter mechanism based on dynamic…

permissive · top 5,000 on PyPI

djangorestframework-jsonapi

Adapts Django REST framework to output…

permissive · top 15,000 on PyPI

djangorestframework-datatables

Adds server-side Datatables support to Django…

permissive · top 15,000 on PyPI

djangorestframework-role-filters

Adds role-based access control to Django REST…

permissive · top 5,000 on PyPI

django-mock-queries

Mocks Django QuerySet operations in memory for…

permissive · top 15,000 on PyPI

django-datatables-view

Provides a Django view base class that handles…

permissive · top 15,000 on PyPI

djangorestframework-bulk

Adds bulk create, update, and delete operations…

permissive · top 15,000 on PyPI

django-admin-list-filter-dropdown

Renders Django admin list filters as dropdown…

permissive · top 5,000 on PyPI

djangorestframework-guardian

Integrates django-guardian's object-level…

permissive · top 15,000 on PyPI