Allows clients to control which fields will be sent in the API response, now in a multidimensional nest of levels! Fields are specified in the query and separated by points determining a given depth with no limit, e.g.
# You want a list of users but you're only interested in the fields "email" and "username":
GET /users/?fields=email,username
[
{
"email": "bruno@gmail.com",
"username": "bruno"
},
{
"email": "endzel@gmail.com",
"username": "endzel"
}
]
# You want to see every field except "id" for the specific user endzel:
GET /users/2/?fields!=id
{
"username": "endzel",
"email": "endzel@gmail.com",
"drinks": "tea",
"location": {
"id": 1,
"country_name": "Spain",
"city": "Málaga"
}
}
# And, you just want to filter "username" and "city" for the "location" attribute within the user endzel:
GET /users/2/?fields=username,location.city
{
"username": "endzel",
"location": {
"city": "Málaga"
}
}
Supported Django versions: 4.2 - 6.0+. Check the CI matrix for details.
Documentation is hosted on Read The Docs.
Developers, developers, developers!
Want to contribute to the project? This is how to run the test suite:
# Get the repo (hopefully with a ⭐)
git clone https://github.com/Endzel/drf-nestedqueryfields.git
# Create and activate your virtual environment
python -m venv .venv
source .venv/bin/activate
# Install the app
pip install --editable ".[dev]"
git checkout -b myfeature
# Do your thing, and then fire the tests with
python -m pytest
Many thanks to Wim Glenn, author of the original DRF QueryFields repository from which this one was forked, that inspired me to add my two cents!
Metadata
Release files for drf-nestedqueryfields 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| drf_nestedqueryfields-1.0.1.tar.gz | 11.4 kB | With provenance | Details for drf_nestedqueryfields-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| drf_nestedqueryfields-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for drf_nestedqueryfields-1.0.1-py3-none-any.whl |
Total release size: 17.2 kB
Release files / drf_nestedqueryfields-1.0.1.tar.gz
| Download URL | drf_nestedqueryfields-1.0.1.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6b1e2b5563626c5cc90ac7ff152cb5ee77947452c05899e6ea1da57672c22bcb
|
|
BLAKE2b-256 checksum How to use checksums |
21387f2cf12b03bc50b228b26a623cfd04c8ae1444f2d4ea019fd38a4cd45a3b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 May 19, 2026.
Transparency logRelease files / drf_nestedqueryfields-1.0.1-py3-none-any.whl
| Download URL | drf_nestedqueryfields-1.0.1-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4839616f05b79ab818d3a4864d192a234cf8d5266a77d7a5bc3aadcb237ca653
|
|
BLAKE2b-256 checksum How to use checksums |
422b2854f6a900fbd9f27bfb0e54d13af0ffbb720a41c32ea4a550d3f415da99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 May 19, 2026.
Transparency logSecurity for drf-nestedqueryfields 1.0.1
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.
Attestation for drf_nestedqueryfields-1.0.1.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 May 19, 2026.
Transparency logA 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.