Skip to main content

Add .values_nested() to Django querysets for nested prefetch dictionaries

Project description

Django Nested Values

PyPI version CI

An experimental package that adds .values_nested() to Django querysets, returning nested dictionaries with related objects included.

Quick Example

# Uses familiar Django patterns
Book.objects.only("title").select_related("publisher").prefetch_related("authors").values_nested()
# [{"id": 1, "title": "...", "publisher": {...}, "authors": [...]}]

Documentation

See the full documentation for installation, usage, and API reference.

Supported Versions

Python 3.13 Python 3.14
Django 5.2
Django 6.0

License

MIT

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

django_nested_values-1.0.0.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

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

django_nested_values-1.0.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file django_nested_values-1.0.0.tar.gz.

File metadata

  • Download URL: django_nested_values-1.0.0.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for django_nested_values-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5b713c5f8963cee1fc203d73eedb274485535c3e7edd88753f224c82da6de243
MD5 54d211d589768c57211518eca111be6f
BLAKE2b-256 05319643c5da3cbf6c6e2d021c4b03630107682f866b5abd19ecfb9b39f96548

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_nested_values-1.0.0.tar.gz:

Publisher: publish.yml on oliverhaas/django-nested-values

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_nested_values-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_nested_values-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dd976ab5e8364cb9587a5a97d5733411fd791546941ced80cb4e8bf05901c4a0
MD5 4636013ea68fa52bcf34716f444294e9
BLAKE2b-256 cf31c46c4cdff0a51f6d98b10314865e52f2ccb50e83bfd176e5108675e99efa

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_nested_values-1.0.0-py3-none-any.whl:

Publisher: publish.yml on oliverhaas/django-nested-values

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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