Skip to main content

Filternaut

Filternaut is a simple library which generates arbitrarily complex Django Q-objects from simple data. It fits nicely into situations where users provide data which you want to filter a queryset with. For example, if you have an API listing and want to let the requester filter that listing with query params, Filternaut is the ticket.

Using Filternaut, you put together filters of different types — e.g. a date filter and an email filter — and say what their logical relationships are.

Quickstart

# first define how you will parse the incoming filters choices.
filters = (
    DateTimeFilter('created_date', lookups=['lt', 'gt']) &
    CharFilter('username', lookups=['icontains'])
)

# then use this to parse anything dict-like. This returns a Django
# Q-object for use with the ORM's .filter().
try:
    query = filters.parse(request.GET)
    return queryset.filter(query)
except filternaut.InvalidData as ex:
    raise HttpResponseBadRequest(ex.errors)

Installation

$ pip install django-filternaut

Filternaut is compatible with:

  • Python 3.10+

  • Django 4.2, 5.2 and 6.1

  • Django REST Framework (optional), any release supporting your Django version

Development

Filternaut uses uv:

$ uv sync
$ uv run pytest
$ uv run ruff check

The test suite includes doctests from docs/.

To test against another Python or Django version, as CI does:

$ uv run --isolated --python 3.10 pytest
$ uv run --isolated --python 3.12 --with "django~=4.2.0" --with djangorestframework pytest

The isolated flag will leave your .venv untouched.

Documentation

See https://filternaut.readthedocs.org for full documentation.

Metadata

Release files for django-filternaut 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-filternaut 1.1.0
File Size Uploaded Provenance
django_filternaut-1.1.0.tar.gz 9.9 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-filternaut 1.1.0
File Interpreter ABI Platform
django_filternaut-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.5 kB

Release files / django_filternaut-1.1.0.tar.gz

Download URL django_filternaut-1.1.0.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f0677831fe382eef8cfbd5474252e7575eab3dea6cbb58a8d80141df5694c8b2
BLAKE2b-256 checksum
How to use checksums
46ca78180a290f3a87bf275ff20cdbeda4f2d7c4d36a4ab7161c9a91a4be98c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

Release files / django_filternaut-1.1.0-py3-none-any.whl

Download URL django_filternaut-1.1.0-py3-none-any.whl
Size 11.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a7d57bba6b49958bf091e4e81ee8e1385e503f83771b30e4facefa98f238ff1e
BLAKE2b-256 checksum
How to use checksums
2b774ba2b3c33b886b831be16018a026c69b1012ed1376b22b3597e977ba0321
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

Security for django-filternaut 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for django_filternaut-1.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page