Django-CFG
The Modern Django Framework for Enterprise Applications
Type-safe configuration • Real-time WebSockets • gRPC Streaming • OpenAPI client generation • AI-Native Docs • 8 Production Apps
What is Django-CFG?
Django-CFG is a next-generation Django framework that replaces settings.py with type-safe Pydantic v2 models. Catch configuration errors at startup, get full IDE autocomplete, and ship production-ready features in 30 seconds instead of weeks.
Why Django-CFG?
- ✅ Type-safe config - Pydantic v2 validation catches errors before deployment
- ✅ 90% less code - Replace 200+ line settings.py with 30 lines
- ✅ Typed API clients - Generate TypeScript / Python / Go clients from your DRF OpenAPI schema
- ✅ First-party analytics - Typed product events, goals, and ordered funnels without a third-party tracker
- ✅ Real-time WebSockets - Centrifugo integration included
- ✅ gRPC streaming - Bidirectional streaming with WebSocket bridge
- ✅ AI-native docs - First Django framework with MCP server for AI assistants
- ✅ Stripe payments - Checkout, webhooks, refunds out of the box (
django-cfg[payments]) - ✅ 8 enterprise apps - Save 18+ months of development
Quick Start
One-Line Install
# macOS / Linux
curl -L https://djangocfg.com/install.sh | sh
# Windows (PowerShell)
powershell -c "iwr https://djangocfg.com/install.ps1 | iex"
Manual Install
pip install 'django-cfg[full]'
django-cfg create-project my_app
cd my_app/projects/django
poetry run python manage.py runserver
What you get instantly:
- 🎨 Django Admin (Unfold) →
http://127.0.0.1:8000/admin/ - 📡 Real-time WebSockets → Live updates
- 🔌 Auto-generated API clients → TypeScript / Python / Go
- 🐳 Docker Ready → Production configs
- 🖥️ Electron App → Desktop template
Configuration Example
Before: settings.py
# 200+ lines of untyped configuration
DEBUG = os.getenv('DEBUG', 'False') == 'True' # ❌ Bug waiting to happen
DATABASE_PORT = os.getenv('DB_PORT', '5432') # ❌ Still a string!
After: Django-CFG
from django_cfg import DjangoConfig, DatabaseConfig
class MyConfig(DjangoConfig):
project_name: str = "My App"
debug: bool = False # ✅ Type-safe
databases: dict[str, DatabaseConfig] = {
"default": DatabaseConfig(
name="${DB_NAME}", # ✅ Validated at startup
port=5432, # ✅ Correct type
)
}
Full IDE autocomplete • Startup validation • Zero runtime errors
Features
🔒 Type-Safe Configuration
Pydantic v2 models replace error-prone settings.py - catch bugs before deployment.
🔌 Typed API Client Generation
Generate fully-typed TypeScript, Python, and Go clients straight from your DRF OpenAPI schema — no hand-written API code, no drift between backend and frontend.
python manage.py gen # generate clients from the live OpenAPI schema
python manage.py gen --ts # TypeScript only
📡 Real-Time WebSockets
Production-ready Centrifugo integration - live updates, notifications, presence tracking.
🌐 gRPC Microservices
Bidirectional streaming with automatic WebSocket bridge - perfect for real-time architectures.
💳 Payments Engine
Stripe-first payments app, production-lifted from a live SaaS: one-time checkout with idempotency, signature-verified webhooks with replay, refunds, reconciliation, and an in-memory fake provider for tests. Host couplings are config seams (owner model, fulfillment hook) — plug in your own billing objects.
from django_cfg import DjangoConfig, PaymentsConfig
class MyConfig(DjangoConfig):
payments = PaymentsConfig(
fulfillment_hook="apps.orders.hooks.activate_order",
)
pip install 'django-cfg[payments]' # adds the Stripe SDK
🤖 AI-Native Documentation
First Django framework with MCP server - AI assistants can access docs instantly.
📦 8 Enterprise Apps
User auth • Support tickets • Newsletter • CRM • AI agents • Knowledge base • Payments • Multi-site
Time saved: 18+ months of development
What's Included
Backend:
- Django 5.2+ with type-safe config
- PostgreSQL, Redis, Centrifugo
- gRPC server with streaming
- 8 production-ready apps
- Stripe payments engine (checkout, webhooks, refunds)
- AI agent framework
- REST API with auto TypeScript generation
Admin:
- Django Unfold for CRUD
- JWT authentication
- Dark theme by default
- Constance-backed dynamic settings
DevOps:
- Docker Compose setup
- Traefik reverse proxy
- Production-ready configs
- Cloudflare integration
AI Features:
- MCP server for AI assistants
- Pydantic AI integration
- Vector DB (ChromaDB)
- RAG support
Documentation
- Getting Started - Quick setup guide
- Configuration - Type-safe config
- API Generation - Typed TS/Python/Go clients
- Real-Time - WebSockets setup
- gRPC - Microservices
- AI Agents - Automation
- Built-in Apps - 8 enterprise apps
Community
- 🌐 djangocfg.com - Official website
- 🎯 Live Demo - See it in action
- 🐙 GitHub - Source code
- 💬 Discussions - Get help
- 📦 PyPI - Package repository
License
MIT License - Free for commercial use
Django-CFG - Modern Django framework with type-safe configuration, AI-native docs, typed API client generation, gRPC streaming, real-time WebSockets, and 8 production-ready apps.
Made with ❤️ for the Django community
Metadata
Release files for django-cfg 2.3.338
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 | |
|---|---|---|---|---|
| django_cfg-2.3.338.tar.gz | 1.6 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_cfg-2.3.338-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.8 MB
Release files / django_cfg-2.3.338.tar.gz
| Download URL | django_cfg-2.3.338.tar.gz |
|---|---|
| Size | 1.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
da20f9dff440b0285336e4d249840aa232d105699678129d901f524169c36412
|
|
BLAKE2b-256 checksum How to use checksums |
f5f2cb651f48df575703a6a587e7d5588c61a45d0d51c6e83c1e6a539e24fed4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|
Release files / django_cfg-2.3.338-py3-none-any.whl
| Download URL | django_cfg-2.3.338-py3-none-any.whl |
|---|---|
| Size | 2.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
597fa645903830d4191def039f3643b2809841619f3304383763f1ee7a00d1b3
|
|
BLAKE2b-256 checksum How to use checksums |
36429086daf9e4b82e4238d7d9482ccb13af92cdd5fc488bf226f79f9727f751
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.8
|
Security for django-cfg 2.3.338
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.