Skip to main content

Django runtime utilities, mixins, adapters, and reusable modules for Codex projects

Project description

codex-django

PyPI Python CI License Documentation

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
codex-django add-client-cabinet --project myproject

Temporary compatibility shims remain under codex_django.cli, but the real CLI code lives in codex-django-cli.

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.
  • notifications: notification content models, service hooks, and ARQ client scaffolding.

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.notifications - Django notification orchestration: content selector, payload builder, queue/direct adapters.
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.

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).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codex_django-0.6.5.tar.gz (925.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codex_django-0.6.5-py3-none-any.whl (773.6 kB view details)

Uploaded Python 3

File details

Details for the file codex_django-0.6.5.tar.gz.

File metadata

  • Download URL: codex_django-0.6.5.tar.gz
  • Upload date:
  • Size: 925.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for codex_django-0.6.5.tar.gz
Algorithm Hash digest
SHA256 1680291dfcc56773d78976d32f317f9e1f2517310462886c21f194713838110e
MD5 a18923a6c2eb9763212a39f82894cf9d
BLAKE2b-256 60a5776fb54b6549d6c24a83a99ec1cddd8e7e0c4cba2484fab6fcfe393efe53

See more details on using hashes here.

Provenance

The following attestation bundles were made for codex_django-0.6.5.tar.gz:

Publisher: publish.yml on CodexDLC/codex-django

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file codex_django-0.6.5-py3-none-any.whl.

File metadata

  • Download URL: codex_django-0.6.5-py3-none-any.whl
  • Upload date:
  • Size: 773.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for codex_django-0.6.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4448a5a0fb7fd109195c0f784bf3c200cc876097a1e9917e836ef2eca8062594
MD5 6ea8bca30335a73c77b1c424d0b677ab
BLAKE2b-256 09e863d2c7e68ec95c2369a89e87624217d7bb7ffc9f0ac63c4d67d28184ed60

See more details on using hashes here.

Provenance

The following attestation bundles were made for codex_django-0.6.5-py3-none-any.whl:

Publisher: publish.yml on CodexDLC/codex-django

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page