codex-django
Django runtime integration layer for the Codex ecosystem: reusable modules, cabinet UI building blocks, and shared adapters for Codex-shaped Django projects.
Project scaffolding now lives in the companion package codex-django-cli, while this repository focuses on installable runtime code.
Install
# Runtime library only
pip install codex-django
# Runtime + companion CLI package
pip install "codex-django[cli]"
# Optional admin theme and Prometheus integration
pip install "codex-django[admin,observability]"
# Runtime + CLI + day-to-day development toolchain
pip install "codex-django[dev]"
Requires Python 3.12 or newer.
Project Scaffolding
The codex-django runtime package no longer owns the CLI implementation.
Use the companion package when you want to scaffold or extend a project:
pip install "codex-django[cli]"
# or: pip install codex-django-cli
codex-django init myproject
Temporary compatibility shims remain under codex_django.cli, but the real CLI code lives in codex-django-cli.
Select optional scaffolds with init --with-booking --with-messaging, or use codex-django menu for interactive selection.
Development
uv sync --extra maintainer
uv run pytest
uv run mypy src/
uv run pre-commit run --all-files
uv run python tools/dev/check.py --ci
uv build --no-sources
Quick Start
Runtime Example
from datetime import date
from codex_django.booking import DjangoAvailabilityAdapter
from codex_django.booking.selectors import get_available_slots
adapter = DjangoAvailabilityAdapter(
resource_model=Master,
appointment_model=Appointment,
service_model=Service,
working_day_model=MasterWorkingDay,
day_off_model=MasterDayOff,
booking_settings_model=BookingSettings,
timezone="UTC",
)
result = get_available_slots(
adapter=adapter,
service_ids=[1],
target_date=date.today(),
)
print(result.get_unique_start_times())
What Each Optional Module Adds
cabinet: user-facing dashboard pages, profile/settings views, and cabinet adapters.booking: booking app scaffolds, booking settings, cabinet booking pages, and booking templates.messaging: content models, dispatch hooks, campaign primitives, and queue/direct delivery adapters.notifications: deprecated compatibility import path for older notification integrations.
Modules
| Module | Extra | Description |
|---|---|---|
codex_django.core |
- | Shared Django infrastructure: mixins, SEO access path, i18n helpers, sitemap base, Redis managers. |
codex_django.system |
- | Project-state models and admin workflows: site settings, static content, integrations, fixture orchestration. |
codex_django.messaging |
- | Canonical Django messaging orchestration: selectors, payload builders, queue/direct adapters, campaigns, and cabinet contracts. |
codex_django.notifications |
compat only | Deprecated forwarding layer to codex_django.messaging; old imports continue during the migration window. |
codex_django.booking |
- | Django adapter layer over codex-services booking engine: model mixins, availability adapter, booking selectors. |
codex_django.cabinet |
- | Reusable cabinet/dashboard framework with registry-based navigation, widgets, and cached settings. |
codex_django.cli |
compat only | Temporary forwarding layer to codex-django-cli; not part of the long-term runtime surface. |
codex_django.showcase |
- | DEBUG-only showcase layer for demo screens and generated-project previews backed by mock data. |
Agent Skills
codex-django includes an optional, offline agent skill installer. From the consuming project's root, use the Python environment where codex-django is installed:
python -m codex_django.agent_skills install --project .
python -m codex_django.agent_skills status --project .
After upgrading the package, refresh the installed instructions separately:
python -m pip install --upgrade codex-django
python -m codex_django.agent_skills update --project .
The installer manages .agents/skills/codex-django/ and a bounded block in the project's root AGENTS.md. Skill installation is optional for normal Python use and requires neither Django configuration nor the [cli] extra. The Agent Skills Guide covers removal, ownership, and recovery.
Documentation
Full docs with architecture, API reference, and generated project structure:
https://codexdlc.github.io/codex-django/
Part of the Codex ecosystem
| Package | Role |
|---|---|
| codex-core | Foundation — immutable DTOs, PII masking, env settings |
| codex-platform | Infrastructure — Redis, Streams, ARQ workers, Notifications |
| codex-ai | LLM layer — unified async interface for OpenAI, Gemini, Anthropic |
| codex-services | Business logic — Booking engine, CRM, Calendar |
Each library is fully standalone — install only what your project needs. Together they form the backbone of codex-bot (Telegram AI-agent infrastructure built on aiogram) and codex-django (Django integration layer and scaffolding toolkit).
Metadata
Release files for codex-django 0.7.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 | |
|---|---|---|---|
| codex_django-0.7.0.tar.gz | 1.1 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| codex_django-0.7.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.9 MB
Release files / codex_django-0.7.0.tar.gz
| Download URL | codex_django-0.7.0.tar.gz |
|---|---|
| Size | 1.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b24a362d4c005e9a86b210799b2d1d23bd0e4319e6a025d3ed2a3eaa497abd0c
|
|
BLAKE2b-256 checksum How to use checksums |
9532c6d6c4c6b4a5001b9def16ce0b77fc7a55815bed47722924b9f806bf5c50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 9, 2026.
Transparency logRelease files / codex_django-0.7.0-py3-none-any.whl
| Download URL | codex_django-0.7.0-py3-none-any.whl |
|---|---|
| Size | 875.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3c11fb583bd08dc9ec601efef5340011b35b90620560bf9d865574b0c58f5d11
|
|
BLAKE2b-256 checksum How to use checksums |
6c758f25577d4b5edb3e97392abf47469bfc774dae854fb1bdcdb5641857151d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 9, 2026.
Transparency log