--- id: djangorestframework-filters version: "0.11.1" license: MIT license_treatment: permissive maintenance: dormant --- # djangorestframework-filters — Better filtering for Django REST Framework License: permissive · Maintenance: dormant · Downloads: 347.8K/mo ## 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 above — 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 pip install djangorestframework-filters uv add djangorestframework-filters 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: unspecified - Install friction: low - Maintenance: dormant - Downloads: 347.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django rest framework filtering, filter across relationships django, drf advanced filtering, django api query filtering, relationship filtering rest api, django filter negation, rest framework filter backend, django-rest-framework, filtering, query-builder [View on SkillFed](https://skillfed.io/packages/djangorestframework-filters) · [View on PyPI](https://pypi.org/project/djangorestframework-filters/)