Metadata-Version: 2.4
Name: django-nested-values
Version: 0.7.0
Summary: Add .values_nested() to Django querysets for nested prefetch dictionaries
Project-URL: Homepage, https://github.com/oliverhaas/django-nested-values
Project-URL: Documentation, https://oliverhaas.github.io/django-nested-values/
Project-URL: Repository, https://github.com/oliverhaas/django-nested-values.git
Author-email: Oliver Haas <ohaas@e1plus.de>
License: MIT
License-File: LICENSE
Keywords: django,nested,orm,prefetch_related,queryset,values
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Django
Classifier: Framework :: Django :: 5.2
Classifier: Framework :: Django :: 6.0
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Database
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.13
Requires-Dist: django>=5.2
Description-Content-Type: text/markdown

# Django Nested Values

[![PyPI version](https://img.shields.io/pypi/v/django-nested-values.svg)](https://pypi.org/project/django-nested-values/)
[![CI](https://github.com/oliverhaas/django-nested-values/actions/workflows/ci.yml/badge.svg)](https://github.com/oliverhaas/django-nested-values/actions/workflows/ci.yml)

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

## Quick Example

```python
# 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](https://oliverhaas.github.io/django-nested-values/) for installation, usage, and API reference.

## Supported Versions

|         | Python 3.13 | Python 3.14 |
|---------|:-----------:|:-----------:|
| Django 5.2 | ✓ | ✓ |
| Django 6.0 | ✓ | ✓ |

## License

MIT
