cppdjango is an independent C++ port of Django 6.0.7. It keeps Django’s familiar django import namespace and public APIs while moving selected ORM, request-processing, template, URL, parsing, and utility paths into a C++26 extension. Unsupported values and query shapes conservatively replay through the compatible Python implementation.
The current PostgreSQL benchmark measures 81.4% less framework-side ORM CPU, or 436% faster ORM-only CPU performance, across an equal-weight point-select, ordered IN select, and point-update suite. PostgreSQL and the shared cursor/psycopg floor are excluded from that claim. Raw measurements and the methodology are published at https://django.goblinreactor.com/artifacts/.
Install
Use a fresh virtual environment. The PyPI distribution is named cppdjango, but the Python package remains django:
python3 -m venv .venv . .venv/bin/activate python -m pip install --upgrade pip python -m pip install cppdjango==6.0.7.post1
cppdjango replaces upstream Django. Do not install the Django and cppdjango distributions in the same environment because both own the django import namespace. When converting an existing environment, remove upstream Django first:
python -m pip uninstall -y Django python -m pip install cppdjango==6.0.7.post1
The package contains native code. If no compatible wheel is available, pip builds it from source and needs:
Python 3.12 or newer;
CMake 3.26 or newer and Ninja or Make;
a C++ compiler with the C++26 features used by cppdjango;
OpenSSL and zlib development headers and libraries.
For example, on macOS with Homebrew:
brew install cmake ninja openssl@3 CMAKE_PREFIX_PATH="$(brew --prefix openssl@3)" \ python -m pip install cppdjango==6.0.7.post1
On a Debian-family Linux system, install CMake, Ninja, OpenSSL and zlib development packages plus a recent compiler. Package names vary by release; one typical setup is:
sudo apt install cmake ninja-build g++-15 libssl-dev zlib1g-dev CXX=g++-15 python -m pip install cppdjango==6.0.7.post1
Verify both the distribution version and native extension:
python -c "import django; from django import native; print(django.__version__, native.version(), native.compiler())"
Both versions should report 6.0.7.post1 and the compiler should not report none. DJANGO_NATIVE=0 disables the extension for comparison and diagnostics; it is not needed for ordinary use.
PostgreSQL
Database drivers remain separate, just as they are in Django. For PostgreSQL:
python -m pip install "psycopg[binary]>=3.1"
Third-party packages that declare a dependency on the distribution name Django cannot express that cppdjango supplies the same import API. Installing such a package may cause pip to add upstream Django. Install and review those dependencies deliberately, and confirm with:
python -m pip list | grep -i django
Only cppdjango should own the django package in that environment.
Source installation
For development or a source checkout:
git clone https://github.com/adamdeprince/cppdjango.git cd cppdjango python3 -m venv .venv . .venv/bin/activate python -m pip install --upgrade pip python -m pip install -e ".[native-dev]"
Full installation notes are in docs/installation.md. Upstream Django’s documentation remains applicable unless a cppdjango document says otherwise: https://docs.djangoproject.com/en/6.0/.
License and trademark
cppdjango retains Django’s BSD license and attribution. Django is a trademark of the Django Software Foundation. cppdjango is independent and is not endorsed by the Django Software Foundation.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
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 cppdjango-6.0.7.post1.tar.gz.
File metadata
- Download URL: cppdjango-6.0.7.post1.tar.gz
- Upload date:
- Size: 12.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
239a46219bb4daaff670f2b46066e5a5e3bdd8d813bf63d9ec639a7ff746f848
|
|
| MD5 |
9fe74eaa9de18217c684ed6ed116567a
|
|
| BLAKE2b-256 |
769b288968af479f29c24a4ca5118078584f27a2432de1808d67b79787fd0821
|
File details
Details for the file cppdjango-6.0.7.post1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: cppdjango-6.0.7.post1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 11.1 MB
- Tags: CPython 3.14, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3176a86551dbd1e11155da6a48b12bf88d702afd3d77228bc389f35d3e86164c
|
|
| MD5 |
3a3de384d351601bdfd058074957d6da
|
|
| BLAKE2b-256 |
935a801e8092bfdd63420b54afb56bc0035507c468d55c00ade8ce6ccd1652d0
|
File details
Details for the file cppdjango-6.0.7.post1-cp314-cp314-macosx_26_0_arm64.whl.
File metadata
- Download URL: cppdjango-6.0.7.post1-cp314-cp314-macosx_26_0_arm64.whl
- Upload date:
- Size: 11.6 MB
- Tags: CPython 3.14, macOS 26.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fc27daf76d026885f94ad172f1225d61204d8b1998d4125c596eed3b366e5d2
|
|
| MD5 |
9d7c1c91a070b895609ff47502904f11
|
|
| BLAKE2b-256 |
7a8620841f89a1d28be2925878584483e01286742c167432498002511c5253ac
|
File details
Details for the file cppdjango-6.0.7.post1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: cppdjango-6.0.7.post1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 11.1 MB
- Tags: CPython 3.13, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42bf9809e3f570d976a88cdd17abab5d80044168f16292c2eda83062f63a72b5
|
|
| MD5 |
dfdd484318aab5bb769ee39d1beefb80
|
|
| BLAKE2b-256 |
79bb3f81f5b493412a9fbdb9a6527ca2278be8dcf75652ee96eb17662436101a
|
File details
Details for the file cppdjango-6.0.7.post1-cp313-cp313-macosx_26_0_arm64.whl.
File metadata
- Download URL: cppdjango-6.0.7.post1-cp313-cp313-macosx_26_0_arm64.whl
- Upload date:
- Size: 11.6 MB
- Tags: CPython 3.13, macOS 26.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e8c03cf79ff0ce44db295f99faaa1c676eb25e40da82b11420edd054edd9b98
|
|
| MD5 |
8377527fedaf17a448495bf2aba0f492
|
|
| BLAKE2b-256 |
df972098bad5a60e145f5c93b7e2643d4a55381e4522346c7bdb944c896882ee
|
File details
Details for the file cppdjango-6.0.7.post1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: cppdjango-6.0.7.post1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 11.1 MB
- Tags: CPython 3.12, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc2609397ee028301271c91c182da0d33de8473cb766c17090eaedee1e12bf01
|
|
| MD5 |
fbed8975b0fe8123ed37895f13276626
|
|
| BLAKE2b-256 |
c56fcbde8f97214cfabd9b3aa1bc099d5e13295b82083b83f34cf76fc73672f2
|
File details
Details for the file cppdjango-6.0.7.post1-cp312-cp312-macosx_26_0_arm64.whl.
File metadata
- Download URL: cppdjango-6.0.7.post1-cp312-cp312-macosx_26_0_arm64.whl
- Upload date:
- Size: 11.6 MB
- Tags: CPython 3.12, macOS 26.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29f2622b6b587bd7a109478b60771f59088f3ad0b96a7e73020ed0f0132e1fa3
|
|
| MD5 |
ecb84e7d3d240dff5b2ea83246c2d86a
|
|
| BLAKE2b-256 |
758762e6aea933753a43b48275059f0c51924e8d447cc2e6a5b2b7952476c27e
|