Skip to main content

drf-query-method

PyPI version

Support for the HTTP QUERY method (RFC 10008) in Django REST framework.

QUERY is safe and idempotent like GET, but carries a request body like POST. It suits searches whose parameters are too long or too structured for a URL.

Usage

Define a query() handler, then call patch() once at startup:

import drf_query_method

drf_query_method.patch()


class NoteViewSet(ModelViewSet):
    ...

    def query(self, request, *args, **kwargs):
        return self.list(request, *args, **kwargs)

Routers then send QUERY /notes/ to query(), and SearchFilter, OrderingFilter, django-filter's DjangoFilterBackend and django-rest-framework-datatables read their parameters from the request body. If you'd rather not patch DRF, import drop-in classes with the same names from drf_query_method instead. See the documentation for both approaches, and for sending QUERY requests from JavaScript and other clients.

The package is in early development and not yet released.

Compatibility

  • Python 3.10+
  • Django 4.2, 5.0, 5.1, 5.2, 6.0 and 6.1. Django 6.2 adds QUERY natively; on earlier versions this package adds it.
  • Django REST framework 3.16+
  • django-filter and django-rest-framework-datatables, optionally

Installation

pip install drf-query-method

Contributing

See CONTRIBUTING.md for development setup, testing, and release instructions.

Metadata

Release files for drf-query-method 0.2.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 drf-query-method 0.2.0
File Size Uploaded Provenance Actions
drf_query_method-0.2.0.tar.gz 102.5 kB With provenance Details for drf_query_method-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for drf-query-method 0.2.0
File Interpreter ABI Platform Actions
drf_query_method-0.2.0-py3-none-any.whl Python 3 none any Details for drf_query_method-0.2.0-py3-none-any.whl

Total release size: 114.7 kB

Release files / drf_query_method-0.2.0.tar.gz

Download URL drf_query_method-0.2.0.tar.gz
Size 102.5 kB
Tags Source
SHA-256 checksum
How to use checksums
36247a6bfe1ce956a4ed17f425680b527a98e1f7ecf596b647ef0a7e8933da6e
BLAKE2b-256 checksum
How to use checksums
1d6d077af10f7a1dd067136387b1a5603dd595aefab50ee63c63118c0ae59f55
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 Oct 30, 2026.

Transparency log

Release files / drf_query_method-0.2.0-py3-none-any.whl

Download URL drf_query_method-0.2.0-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9c3d4803d7e0b1cbd4cd2bff79852d8875b7950c223e1ebaf5423f54869e03f1
BLAKE2b-256 checksum
How to use checksums
43cfdf1581cefaa8d791d88e936b890c239c07d8de4777b38dd443d7f29f86fe
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 Oct 30, 2026.

Transparency log

Security for drf-query-method 0.2.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 drf_query_method-0.2.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 Oct 30, 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