Drf Url Filters

screenshot of Drf Url Filters
django

A django app to apply filters on drf querysets using query params with validations using voluptuous.

Overview

If you're working with Django Rest Framework (DRF) and need an efficient way to manage filtering of your queryset, drf-url-filters is an excellent solution. This straightforward yet powerful app allows you to apply customizable filters to your ModelViewSet's querysets easily. It enhances the querying capability by allowing validation of incoming query parameters using the voluptuous Python package, ensuring that your application receives only the valid data it needs.

The benefit of drf-url-filters extends beyond mere filter application; it allows for quick adjustments and configurations to meet specific project requirements. Whether you're an experienced developer or just starting with Django, you'll appreciate the simplicity with which you can establish and manage query filtering.

Features

  • Easy Integration: Quickly add drf-url-filters to your Django project by installing it via pip and updating your settings.py file.
  • Flexible Filtering: Customize your filtering by mapping incoming query parameters to database column names seamlessly.
  • Validation Support: Utilize the voluptuous library for robust query parameter validation, ensuring only the right data types are processed.
  • Preprocessing Capabilities: Employ functions to preprocess incoming values before they are used in filtering, providing flexibility in how data is handled.
  • Simplicity in Expansion: Adding or removing filters is as simple as modifying a key in the mapping dictionary, making it easy to adapt to changing requirements.
  • Community Driven: Built with the open-source spirit in mind, benefiting from contributions and support from developers in the community.
django
Django

Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. It follows the model-view-controller (MVC) architectural pattern, providing an extensive set of built-in tools and conventions to streamline the creation of robust and scalable web applications.