Truly async Django ORM, with a Rust core.
Keep your models, migrations and admin. Make await Book.objects.aget(pk=1) really async, and fast.
Documentation · Quickstart · Benchmarks · How it works · Changelog
Django's async ORM isn't async underneath: aget(), acount() and async for run the sync ORM on one worker
thread, and every request waits its turn for it. djox runs those queries on connections that Rust owns and wakes
Python only when the answer is ready. Django keeps doing what it does well (models, migrations, the admin, the
QuerySet language), so your code doesn't change.
- Really async. No query waits for Django's worker thread, so async views scale with concurrent requests.
- Faster, sync too. Simple queries skip Django's query compiler, and Rust builds the model instances.
- A drop-in. Two settings. Your models, migrations, tests and third-party apps keep working.
- Tested with Django's own tests. 2,395 of Django's ORM tests are ported to djox, and 2,390 pass, on every supported Django.
Speed
The same Django app on stock Django and on djox: one worker process, SQLite, requests per second, higher is better (method, Postgres and every number).
| Django | djox | |
|---|---|---|
| Sync view, get one book | 1,629 | 2,451 (1.5x) |
| Async view, get one book | 168 | 416 (2.5x) |
| Async view, a page of 20 books with their authors | 76 | 235 (3.1x) |
| DRF viewset, get one book | 809 | 1,026 (1.3x) |
- Async views gain the most: 1.4 to 3.1 times the requests, on SQLite and Postgres.
- One ORM call (all of them):
await Book.objects.aget()takes 132 µs against Django's 507, and a syncget()61 against 216. - DRF gains less (1.0 to 1.3 times): most of a DRF request is DRF's own code.
Quickstart
uv add djox # or: pip install djox
uv add "djox[postgres]" # on Postgres: adds psycopg 3 for Django's sync code
Python 3.11+, Django 5.2 to 6.1. Wheels for Linux, macOS and Windows, so no Rust needed. On Postgres, async connections don't support TLS yet, so servers that require it (most hosted ones) won't work.
Change two settings:
# settings.py
DATABASES = {
"default": {
"ENGINE": "djox.backends.sqlite3", # or "djox.backends.postgresql"
"NAME": BASE_DIR / "db.sqlite3",
}
}
INSTALLED_APPS = [..., "djox"] # every model's QuerySet now runs on djox
Then write async Django as usual:
import djox
from django.http import JsonResponse
from shop.models import Book, Order
async def book_detail(request, book_id):
book = await Book.objects.aget(pk=book_id) # on djox's connections, not Django's worker thread
return JsonResponse({"title": book.title, "pages": book.pages})
async def long_books(request):
titles = [book.title async for book in Book.objects.filter(pages__gt=400).order_by("title")]
return JsonResponse({"titles": titles})
async def buy(request, book_id):
async with djox.atomic(): # Django's atomic(), for async code
book = await Book.objects.aget(pk=book_id)
await Order.objects.acreate(book=book)
return JsonResponse({"ok": True})
Anything djox doesn't run itself falls back to Django's own method, so nothing breaks. Next: the documentation.
What you get
| Async QuerySets | aget, acount, async for, acreate, aupdate, adelete, aget_or_create... on djox |
| The fast lane | Simple queries, sync or async, reuse the SQL Django wrote once, and Rust builds the results |
| Existing models | DJOX_MODELS switches any model, User included, without touching its code |
| Async transactions | async with djox.atomic(): and djox.on_commit() |
| Streaming | aiterator() reads big results a chunk at a time |
| Hooks | Plain functions called before and after every statement, sync or async |
| Postgres | djox.backends.postgresql: a pool of Rust connections for async code |
| Raw SQL | djox.Database: async SQL on SQLite or Postgres, without Django |
Status: 0.1.0, the first release. Everything above works and is tested on every supported Django, on SQLite and Postgres. djox is young, though: expect rough edges, and check the roadmap.
How it works
await Book.objects.aget(pk=1)
│ Django writes the SQL (once per query shape, then djox reuses it)
▼
djox ──► a Rust thread with its own connection (SQLite: one writer, a few readers; Postgres: a pool)
│ Rust converts the rows and builds the Book
▼
your coroutine wakes up with the answer; the event loop never blocked
The Rust code is written for Python developers who have never seen Rust: plain names, straight-line code, and comments that explain each Rust feature and each database detail. Start with How it works and AGENTS.md.
Develop
uv sync # builds the Rust extension
uv run pytest # Python tests, Django's ported tests included
scripts/cargo-test.sh --workspace # Rust tests
uv run prek install # git hooks: ruff, mypy, pyrefly, cargo fmt, clippy, tests
uv run --only-group docs zensical serve # the docs, on http://localhost:8000
License
MIT
Metadata
Release files for djox 0.1.0
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 |
|---|---|---|---|---|
| djox-0.1.0.tar.gz | 614.3 kB | With provenance | Details for djox-0.1.0.tar.gz |
Built distributions (wheels)
Total release size: 15.3 MB
Release files / djox-0.1.0.tar.gz
| Download URL | djox-0.1.0.tar.gz |
|---|---|
| Size | 614.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
69a9e7b740d892db1c580171fde274c93a9ab73120a17a60cf8cd0b239989541
|
|
BLAKE2b-256 checksum How to use checksums |
7fb24f645b8449e6a52923aa9f698493c3c39f81600b4f79ba686c1b78ca275d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 2, 2026.
Transparency logRelease files / djox-0.1.0-cp311-abi3-win_amd64.whl
| Download URL | djox-0.1.0-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
57333f489e6aeff3cf8393d2f2d8bdfb497047db89dbb93ba5c1a27d2a1d8644
|
|
BLAKE2b-256 checksum How to use checksums |
3a6c22488f5bba1534c66034ba6d36a80d5b800c6e1d6857c3e334b361c52772
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 2, 2026.
Transparency logRelease files / djox-0.1.0-cp311-abi3-musllinux_1_2_x86_64.whl
| Download URL | djox-0.1.0-cp311-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.11 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
0d13780cd298e3f1f5705964843a6319ad05014516cb3d0ab112178dcc81ed10
|
|
BLAKE2b-256 checksum How to use checksums |
649b4afab89ebbe2dd43f3abe43eb97568506946478c8dcf30c98124175294e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 2, 2026.
Transparency logRelease files / djox-0.1.0-cp311-abi3-musllinux_1_2_aarch64.whl
| Download URL | djox-0.1.0-cp311-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.11 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
ea063d208d8113a86ad49c4435d3d0f8ad906b0a6c53b77986ead191514d2db7
|
|
BLAKE2b-256 checksum How to use checksums |
cc37f44a00ce1597ef58ae2f54669c9d07b60900cd773f8b845863b237ca9f06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 2, 2026.
Transparency logRelease files / djox-0.1.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | djox-0.1.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
91ec423d8f50722ccc6c78cc6270d4ec1857a40f6646fdfe7a1f4570b21edbf7
|
|
BLAKE2b-256 checksum How to use checksums |
e24829acc6b9012f44a95ceb8a4a3bcf69425f588360e9d0b323d18b150b9684
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 2, 2026.
Transparency logRelease files / djox-0.1.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | djox-0.1.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
c941f38e22737ad7dbeb7fc3798fbd74072c41c9057acd13fceec438e78fde36
|
|
BLAKE2b-256 checksum How to use checksums |
3a08227209d92de2b9b745168873204f51204a1338b3edcfcc12cc2482e8b5db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 2, 2026.
Transparency logRelease files / djox-0.1.0-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | djox-0.1.0-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
5e2b836e3ae55aac4e93ec4ea8dfd5bf61a71f98814cd3718c4d10412396ecbe
|
|
BLAKE2b-256 checksum How to use checksums |
12490960780eb718a53b59c69ef646e94931d56c743038c2510c563f91fc6a85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 2, 2026.
Transparency logRelease files / djox-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl
| Download URL | djox-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.11 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
66c569c4750fb4531d0111075626076fcc63eb5a60c0b71ef222b7327ff3e642
|
|
BLAKE2b-256 checksum How to use checksums |
812e334ed75983493eb9a7a991e485ca96f2b7d20198d285324a760e1d69012c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 2, 2026.
Transparency logSecurity for djox 0.1.0
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 8 files in this release have been uploaded with provenance metadata.
Attestation for djox-0.1.0.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 Nov 2, 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.