Django Nova
A typed, unified, async-first toolkit for Django 5+.
Django Nova Documentation
Welcome to the documentation of Django Nova— a typed, unified, asynchronous-oriented Django toolkit. The library is designed with a focus on scientific computing, Highload, and Reproducible Research.
What is Django Nova?
Django Nova is a modern toolkit that solves Django's key architectural problems.:
- Duplicate validation — you no longer need to write validation in forms, serializers, and models separately
- No strict typing — full support for
pyright --strict - Caching Issues — Smart disability without manual control
- Difficulties with migrations — built-in support for PostgreSQL concurrent migrations
Project philosophy
- A single source of truth — all business logic of validation is concentrated in Pydantic schemes
- Fail fast — errors should be detected at the static analysis stage, not in runtime
- Default asynchrony — all operations are designed with
asyncioin mind - Zero-downtime — migrations and updates should not interrupt the system operation
Modules
nova.typing
A strict typing layer. Includes NovaModel' and NovaConfig'.
Uses PEP 695 to ensure full type derivability in the IDE (PyCharm, VSCode + Pyright).
nova.validation
Django Unified Bridge <-> Pydantic (pydantic_bridge).
Ensures that validation rules are not duplicated between forms, serializers, and models.
nova.cache
Intelligent QuerySet caching ('queryset_cache'). Features:
- Using SQL Compiler to generate hashes (safe with Django updates).
- Reversible index
O(1)for instant cache invalidation duringsave()or `delete()'.
nova.tasks
Built-in asynchronous task engine based on asyncio.Queue`. An alternative to Celery for in-process computing (ML inference, simulation).
nova.db
Utilities for secure migrations:
zero_downtime.py: Wrappers overCREATE INDEX CONCURRENTLYand `ALTER TABLE' without locks (PostgreSQL).splitter.py: Breaking down heavy Data Migrations into batches to prevent OOM.
📚 More Information
- Full Documentation: docs/index.md
- Auto-generated Status Report: STATUS.md
- Changelog & Release Notes: CHANGELOG.md
🚀 Quick Start (5 minutes)
- Create a typed model
## src/app/models.pyfrom django.db import modelsfrom nova.typing import NovaModel, NovaConfigfrom pydantic import BaseModelclass ArticleSchema(BaseModel): title: str content: str views: int = 0class Article(NovaModel): _nova_config = NovaConfig( pydantic_schema=ArticleSchema, strict_validation=True, cache_enabled=True, ) title: models.CharField(max_length=200) content: models.TextField()
- Use it with automatic validation
# Views or services
article = Article(title="Hello Nova", content="Typed Django!")
article.save() # ✅ Validates against Pydantic schema automatically
- Enjoy type safety 🎉
# Pyright --strict compatible! ✅
article.title = 123 # Type error! Expected str
📦 Installation
Requires Python 3.12+ and Django 5.0+ (tested with Django 5.0, 5.1, 5.2).
Using uv (recommended):
# Core library
uv add django-nova
# With Django REST Framework support
uv add django-nova[drf]
# With Redis infrastructure & Distributed Locks
uv add django-nova[redis]
# or
uv add django-nova[cache]
# With OpenTelemetry tracing
uv add django-nova[tracing]
# Full enterprise stack (tracing + observability)
uv add django-nova[tracing,observability]
# With FastAPI integration
uv add django-nova[fastapi]
# With async task queue
uv add django-nova[tasks]
# With async database support
uv add django-nova[async]
Add to INSTALLED_APPS:
INSTALLED_APPS = [
# ...
"nova",
]
⚡ Performance
Nova adds zero overhead compared to pure Django:
| Benchmark | Time | Overhead |
|---|---|---|
| Pure Pydantic | 1.353 µs/iter | baseline |
| Pure Django Model | 3.593 µs/iter | 2.65x vs Pydantic |
| Nova Model | 3.557 µs/iter | 0.99x vs Django ✅ |
Key insights:
- ✅ Nova is faster than pure Django (within measurement noise)
- ✅ Django adds 2.65x overhead vs Pydantic (ORM vs dataclass)
- ✅ Nova adds zero additional overhead on top of Django
Note: Nova → Pydantic conversion costs 7.824 µs/iter, but this is only incurred when serializing to API responses or performing cross-layer validation.
Benchmark Details
uv run python scripts/bench.py
Runs 100,000 iterations with GC disabled to measure real algorithmic performance.
🎯 Philosophy
⚠️ This is a Beta project. See the auto-generated status report for real module-by-module coverage and stability assessment.
📊 Honest Project Status
🚀 Quick Start
📊 Current Status
🛡️ Validation Boundary
See STATUS.md for the honest, auto-generated breakdown.
📚 API Reference
👤 Author
Artem Alimpiev
- ORCID: 0009-0007-6740-7242
- DOI: 10.5281/zenodo.20057443
- DOI: 10.5281/zenodo.20659647
- PyPI: Django Nova
- NOVA: Django Nova site
📄 License
MIT License. See LICENSE for details. 2026
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_nova-0.6.0.tar.gz.
File metadata
- Download URL: django_nova-0.6.0.tar.gz
- Upload date:
- Size: 50.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81786cbd0dec9761d17bdd3b08bf41a6274afb0c4d910bb4617409240d534539
|
|
| MD5 |
ba7e67cf74a331806cfc230fbb4be9b8
|
|
| BLAKE2b-256 |
3ea3cf05cf8c16989ef52c66bba4d844e64b9febefd43e14f1ad4fdddc8882b2
|
File details
Details for the file django_nova-0.6.0-py3-none-any.whl.
File metadata
- Download URL: django_nova-0.6.0-py3-none-any.whl
- Upload date:
- Size: 80.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa834a507fc14f3e80ee9d7cd6f9234734f8104deaa1ccbb5a1869ee358f9af0
|
|
| MD5 |
a62a6ffa01ad19851ca18385d42cf368
|
|
| BLAKE2b-256 |
31b858d1b455e31d67f358c547da9bfeeea6319e3c9b17130711d351d327e938
|