Skip to main content

ts-django-filtering

In-house solution for kwarg and attribute access based filtering of Django ORM models.

Install

$ pip install ts-django-filtering

Usage

from my_app.models import Person
from django_filtering import Filter, FilterSet

my_filters = [
    {
        "path": "job.name",
        "operator": "iexact",
        "value": "Engineer"
    },
    {
        "path": "job.requirement.name",
        "operator": "icontains",
        "value": "Plumbing"
    },
]

filters = Filter.from_list(my_filters)
print(Filter.merge_to_dict(*filters))
# {'job__name__iexact': 'Engineer', 'job__requirement__name__icontains': 'Plumbing'}

print(FilterSet(filters=filters).filter(Person))
# <QuerySet [<Person: Person object (1)>]>

Metadata

Release files for ts-django-filtering 1.0.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 ts-django-filtering 1.0.0
File Size Uploaded
ts_django_filtering-1.0.0.tar.gz 17.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ts-django-filtering 1.0.0
File Interpreter ABI Platform
ts_django_filtering-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 34.7 kB

Release files / ts_django_filtering-1.0.0.tar.gz

Download URL ts_django_filtering-1.0.0.tar.gz
Size 17.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6d1cbde56ed026f2af45508907ee3c4b0d5b3afbc8cd971bfdd1adc082aae5d6
BLAKE2b-256 checksum
How to use checksums
01915d1dc2e1e6d97806e1961fbd9652981504c2dd15717b76eb93809ab5aedc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.5

Release files / ts_django_filtering-1.0.0-py3-none-any.whl

Download URL ts_django_filtering-1.0.0-py3-none-any.whl
Size 17.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3af81a7dd33d5791e83f9d39c6660907627b7d7a84781ba1d129272f4aab06cf
BLAKE2b-256 checksum
How to use checksums
61f8163541f23c1b9d1fb17c939cf2aac61904646ee16b5bff361a9fca63d5dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.5

Release history Release notifications | RSS feed

1.1.0

2 release files

This release

1.0.0 This release

2 release files

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