cppdjango 6.0.7.post1 ← About cppdjango

Installation guide

Install the C++ port. Keep the Django API.

The distribution is named cppdjango. Your application continues importing django and using django-admin.

Fresh environment

Four commands.

pip selects a compatible native wheel when one is available and otherwise builds the C++ extension from source.

Install from PyPI
$ python3 -m venv .venv
$ . .venv/bin/activate
$ python -m pip install --upgrade pip
$ python -m pip install cppdjango==6.0.7.post1
Do not co-install upstream Django. The Django and cppdjango distributions both own the django import namespace.

Native prerequisites

When pip builds from source.

A source build requires Python 3.12+, CMake 3.26+, Ninja or Make, a sufficiently recent C++26 compiler, OpenSSL development files, and zlib development files.

macOS with Homebrew

Install the build tools and point CMake at Homebrew OpenSSL.

$ brew install cmake ninja openssl@3
$ CMAKE_PREFIX_PATH="$(brew --prefix openssl@3)" \
    python -m pip install cppdjango==6.0.7.post1

Debian-family Linux

Package names vary by distribution release. A typical recent 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 and use

Confirm the native extension loaded.

The runtime package and extension should both report 6.0.7.post1. The final value should name the compiler rather than none.

$ python -c "import django; from django import native; print(django.__version__, native.version(), native.compiler())"
6.0.7.post1 6.0.7.post1 ...

# PostgreSQL driver, installed separately as in Django
$ python -m pip install "psycopg[binary]>=3.1"
Third-party dependency metadata

A plugin that declares a dependency on the distribution name Django cannot tell pip that cppdjango supplies the compatible import API. Review plugin installs and run python -m pip list | grep -i django; only cppdjango should own this environment.

Existing environments and diagnostics

Replace cleanly. Fall back safely.

Replace upstream Django

$ python -m pip uninstall -y Django
$ python -m pip install cppdjango==6.0.7.post1

A new virtual environment is safer than switching a long-lived shared environment.

Diagnostic Python mode

$ DJANGO_NATIVE=0 python manage.py check

Unsupported operations already replay through compatible Python paths automatically. The environment switch disables all native dispatch only for comparison and troubleshooting.