Skip to main content

Fast application/x-www-form-urlencoded parser for Django QueryDict, with optional html-json-forms nesting, in one pass

Project description

fast-querydict

A fast, entity-agnostic parser for application/x-www-form-urlencoded request bodies, built for Django. One pass over the raw bytes yields both the flat data (ready to become a real django.http.QueryDict) and, optionally, the generic html-json-forms nesting of the same body.

import fast_querydict

grouped, nested = fast_querydict.parse(request.body, build_json=True)
# grouped -> {"units": ["a", "b"], "id": ["9"], ...}   raw, first-seen order
# nested  -> {"units": [{"capacity": "100"}], "id": "9", ...}  or None
  • grouped is {key: [value, ...]} with raw values (percent- and +-decoded, not trimmed) in first-seen key order — exactly the internal storage of a QueryDict, so Python can adopt it with a single dict.update.
  • nested is the html-json-forms nesting (a[0][b]{"a": [{"b": …}]}), with single scalar values trimmed and "" nulled, or None when build_json is false.

See projects/fast_post.py in the GEM project DB for the Django glue: a QueryDict subclass carrying .json, and a pre-CSRF middleware that builds it lazily on first request.POST access.

Build / develop

cd fast_querydict
cargo test                 # pure-Rust logic tests (no Python needed)
maturin develop --release  # build + install into the active venv

The Python side imports it opportunistically and falls back to Django's own parser if it is missing or fails to import, so it is safe to ship without it.

Publish

Wheels are built and uploaded to PyPI by the publish-fast-querydict GitHub Actions workflow (manylinux wheels + sdist via PyO3/maturin-action, uploaded with maturin upload — the same approach as jsonlinesrust/flatterer). It is manual / click-to-deploy: Actions → publish-fast-querydict → Run workflow.

One-time setup: add a PyPI API token as the repo secret PYPI_API_TOKEN. Bump version in Cargo.toml before publishing a new release.

Consumers then install the prebuilt wheel — no Rust toolchain needed at deploy:

pip install fast-querydict

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fast_querydict-0.1.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

fast_querydict-0.1.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (224.0 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

fast_querydict-0.1.0-cp315-cp315t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (219.6 kB view details)

Uploaded CPython 3.15tmanylinux: glibc 2.17+ x86-64

fast_querydict-0.1.0-cp315-cp315-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (220.0 kB view details)

Uploaded CPython 3.15manylinux: glibc 2.17+ x86-64

fast_querydict-0.1.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (219.6 kB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.17+ x86-64

fast_querydict-0.1.0-cp314-cp314-win_amd64.whl (115.5 kB view details)

Uploaded CPython 3.14Windows x86-64

fast_querydict-0.1.0-cp314-cp314-win32.whl (112.1 kB view details)

Uploaded CPython 3.14Windows x86

fast_querydict-0.1.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (219.9 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

fast_querydict-0.1.0-cp314-cp314-macosx_11_0_arm64.whl (193.6 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

fast_querydict-0.1.0-cp313-cp313-win_amd64.whl (115.9 kB view details)

Uploaded CPython 3.13Windows x86-64

fast_querydict-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (220.0 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

fast_querydict-0.1.0-cp313-cp313-macosx_11_0_arm64.whl (193.6 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

fast_querydict-0.1.0-cp312-cp312-win_amd64.whl (116.2 kB view details)

Uploaded CPython 3.12Windows x86-64

fast_querydict-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (220.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

fast_querydict-0.1.0-cp312-cp312-macosx_11_0_arm64.whl (194.0 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

fast_querydict-0.1.0-cp311-cp311-win_amd64.whl (118.0 kB view details)

Uploaded CPython 3.11Windows x86-64

fast_querydict-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (222.7 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

fast_querydict-0.1.0-cp311-cp311-macosx_11_0_arm64.whl (195.8 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

fast_querydict-0.1.0-cp310-cp310-win_amd64.whl (117.8 kB view details)

Uploaded CPython 3.10Windows x86-64

fast_querydict-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (222.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

fast_querydict-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (223.0 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

Details for the file fast_querydict-0.1.0.tar.gz.

File metadata

  • Download URL: fast_querydict-0.1.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.14.1

File hashes

Hashes for fast_querydict-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d881b8e23adebbe0f8685736b65a2112d272bf8ec71fe0851b9d6119886f020d
MD5 571d759d7775b8ef476ab61ba33f2e60
BLAKE2b-256 1a55f3222efed818637819e9861938d3b5c1427828af999434701ca389087844

See more details on using hashes here.

File details

Details for the file fast_querydict-0.1.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fast_querydict-0.1.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3f6773c48a2be891580e4a075713c3000d30596a1eaf5685b7a108c7cdfc327b
MD5 7cebe9cb721671e78a6df38ed65525f5
BLAKE2b-256 9bfc99b69a31873dfb012f5a66a61f728d7cf2dd0c9e6af7d3d0ca3dfff9704e

See more details on using hashes here.

File details

Details for the file fast_querydict-0.1.0-cp315-cp315t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fast_querydict-0.1.0-cp315-cp315t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a8d10765bdeb249f235ef6333ebfb844a97c535d4523279dd0d0cd6b491e0add
MD5 48d7cc404601ae0cc8921073f5b7f868
BLAKE2b-256 c9c298d6759f460021a73ac1be064553eb872b04a292b4a8b8a4cb75363e45d7

See more details on using hashes here.

File details

Details for the file fast_querydict-0.1.0-cp315-cp315-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fast_querydict-0.1.0-cp315-cp315-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dde2f073b77a902afbb6e7a2854615b820d3c77ad6a0013173afe1def575b397
MD5 59c50c9042f11d4f934d426d41f9fc74
BLAKE2b-256 138cd0cc6d515be77978a7478fcd05759bd87966b404e3b77d968409e83c7c6e

See more details on using hashes here.

File details

Details for the file fast_querydict-0.1.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fast_querydict-0.1.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a3018ce6b2e713862dcb0e4125d0c6c60f641a0d0723b58ec0dc45ee1dd46ff3
MD5 9971a1db3d8f806c3933416df6ed540f
BLAKE2b-256 a9bf1e194bce5dfdbb27328008fe01c735390bc8b4040d19fdfdae9073a49e4a

See more details on using hashes here.

File details

Details for the file fast_querydict-0.1.0-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for fast_querydict-0.1.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 f88d130ef2741d06793925b5c3337aad6ea04dd08d69e7412df8614dac4c4e79
MD5 350013d919f6e5773dfa98d31f10e1c8
BLAKE2b-256 a5c829c5371c1640ae4573656cc8cd9cfe4cd77790bf9b8b2ff4794abefd2a82

See more details on using hashes here.

File details

Details for the file fast_querydict-0.1.0-cp314-cp314-win32.whl.

File metadata

File hashes

Hashes for fast_querydict-0.1.0-cp314-cp314-win32.whl
Algorithm Hash digest
SHA256 5ca5d21bc9458d255159ae10f0aec55c77c05b362c034c89e75f681a3f9c404d
MD5 022760fc959a081b3c9149e9a3127f28
BLAKE2b-256 939d6a8ffca5ca6a56974c6828a265c557842470b736f0e0686cfd9e4f2d94b2

See more details on using hashes here.

File details

Details for the file fast_querydict-0.1.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fast_querydict-0.1.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 702c09f5ead4e8b195e7e4e7b134324ae5455b0aacf4dcc9841f16f1b2f01c62
MD5 f56ef7fda59fd69681179fa8efe186fb
BLAKE2b-256 f9fc4094398ddb3cc61be40b8d3236435c387d08293b5d8edd2bb60ccd3b02b4

See more details on using hashes here.

File details

Details for the file fast_querydict-0.1.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fast_querydict-0.1.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7bbfb88e767a3755bd4d905d437964dfa3993a55c80b425f558588b3bfbdf4e1
MD5 9fdeb5c45cf1979252a028af7ae1ef6a
BLAKE2b-256 c667313852fab72bb430beb62cd8c56d18c2bf179177f835047ce2fc2e900ee7

See more details on using hashes here.

File details

Details for the file fast_querydict-0.1.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for fast_querydict-0.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 12d566190271aaf097aac6f6c98912f5a9e108f55e8e7bed40fa4665afc20786
MD5 746be6ee9ba1bf402f2b5700dbfcb234
BLAKE2b-256 f4294a17c8d1a34fa093f5da5512327dff30fae9c227f1cb4b34e04fb622349f

See more details on using hashes here.

File details

Details for the file fast_querydict-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fast_querydict-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 22b568a624d2d1c18a1901a87fc16fd58496d4bf7f0d6486536b16fea8193295
MD5 ace71189c2a9b4cae0e76482ef8702e9
BLAKE2b-256 3e19babc09b609ec65336158675893e7dcac04f23d7bcec119af7ba6c1207e2c

See more details on using hashes here.

File details

Details for the file fast_querydict-0.1.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fast_querydict-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dde395c58f5f5e0c62ef1249c500a081d543a0073bfa44f8995efe63e168e001
MD5 2b8376e75629fafa5e3cc5b19c46e790
BLAKE2b-256 1150ce446cc14c769835fb4a1f611f18f54c422a23e3b4b6466ae07d78a1a6c4

See more details on using hashes here.

File details

Details for the file fast_querydict-0.1.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for fast_querydict-0.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 39192825198757d5da4c143de44502bc715a0f184d6eb03796ffe17d7b0a4607
MD5 2dd32bcb389edba01344108c3510b22f
BLAKE2b-256 72b08b2ac7b4eb48b8cec1127dca8e65402f3f671a20686c5e8be82a574aeb38

See more details on using hashes here.

File details

Details for the file fast_querydict-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fast_querydict-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 74437a33c566c0b3872549c20615d3f8cdf6f0aaf3c5e087cd0f7866dbf69edc
MD5 a0dac0043befe10ed540a2135a89f607
BLAKE2b-256 be400db0c9ddf6686c53f4aa6f5f4a3d785eca90869dbd97bcb995f6e47f937e

See more details on using hashes here.

File details

Details for the file fast_querydict-0.1.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fast_querydict-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 be02319052045eb8ba2ad45e50bdceced129e04d5539a5067064d7222c9f6964
MD5 6d1922078875b0c23d6d8a3b75f42226
BLAKE2b-256 3fbb2312e352779cd159af9b3dbb0a54f9ff782896a0c1c659027f5198ef7591

See more details on using hashes here.

File details

Details for the file fast_querydict-0.1.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for fast_querydict-0.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a8e28fdea53bacd467bb36fad52ea2ef590edead1f1b176b07fee2d8c276ae29
MD5 9ad8de3c088b77052fe15797b4901565
BLAKE2b-256 a48cad94c3f4febbf5b3773ebd80c9752658276795d0eb134480450856d52d86

See more details on using hashes here.

File details

Details for the file fast_querydict-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fast_querydict-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e87cb30d78b69d60b1a99e72494dbcff237f71c1d2afc98a0c778ffde050f687
MD5 2b2177bc947bbbe868ed1be7e0e5f106
BLAKE2b-256 f0d3b98d8d86c0756c10fc56d476823977a693ab0feaeba368b2e14add0a3bdd

See more details on using hashes here.

File details

Details for the file fast_querydict-0.1.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fast_querydict-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b79a8cce527cf5a392bab517580b29584105b21c8a568bf4b3faabf5b67493c7
MD5 70f87d5777990a8523325b8d48f132e0
BLAKE2b-256 50d1cfc85d4d74d8ea66854579c8fc7ffe4dbbc25123c217193b3f731424c68f

See more details on using hashes here.

File details

Details for the file fast_querydict-0.1.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for fast_querydict-0.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1209d54b94c940b9c900c481f600ef29f4a29dc8a157f38e757a30f18e3ff033
MD5 dc5fe8d34095bc1430436513a94c85c6
BLAKE2b-256 b0b4c96dd5a788a9621be5b46d765e861ddd034fe816f363b3a57857e8a54a5b

See more details on using hashes here.

File details

Details for the file fast_querydict-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fast_querydict-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a0dc395d1c9e23a589793a8a934df4388515896d4aaff6b8f33f4c0ef96a0c8d
MD5 a804e2dacef9860981d2a7fcd7f3cbfc
BLAKE2b-256 b9aa737639b4d1e2db5f714d0399c2a24db2bdc089bf177537fb3e0775c4f26a

See more details on using hashes here.

File details

Details for the file fast_querydict-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fast_querydict-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 98feeb1a340630382bd7f908a5391a94adc93211c491354486ec88b411b1d17e
MD5 50d62c80d234b10cb54aea312845e6ec
BLAKE2b-256 6f1f5666ce8b493878af358b1253e298531879e25231ec4cca9de022c3bfc21b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page