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 and django-filter's DjangoFilterBackend 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, 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.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 drf-query-method 0.1.0
File Size Uploaded Provenance Actions
drf_query_method-0.1.0.tar.gz 101.0 kB With provenance Details for drf_query_method-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 112.9 kB

Release files / drf_query_method-0.1.0.tar.gz

Download URL drf_query_method-0.1.0.tar.gz
Size 101.0 kB
Tags Source
SHA-256 checksum
How to use checksums
902ef204d98b9c300d0dd4181a4643ca43b0763057878b28ed7129038aa7c614
BLAKE2b-256 checksum
How to use checksums
098d0dd00df66334a8bb337ca85ba3550016c3ba5ee96bb0a18d317351778cbe
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.1.0-py3-none-any.whl

Download URL drf_query_method-0.1.0-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f0dbd5036d530994ad28e1c24add8e7ebd992b8bcde23b9c27e91ed5a5268e2e
BLAKE2b-256 checksum
How to use checksums
4f098df92009c542dc8996b623eeab46a10208f4a68c88425f21e85e32698a53
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.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 drf_query_method-0.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 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