Modern Django framework with type-safe Pydantic v2 configuration, Next.js admin integration, real-time WebSockets, and 8 enterprise apps. Replace settings.py with validated models, 90% less code. Production-ready with AI agents, auto-generated TypeScript clients, and zero-config features.
Project description
Django-CFG
The Modern Django Framework for Enterprise Applications
Type-safe configuration • Streamlit Admin • Real-time WebSockets • gRPC Streaming • 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
- ✅ Streamlit Admin - Python-only admin panel, auto-starts with Django
- ✅ 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
- ✅ 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 →
http://127.0.0.1:8000/admin/ - 📊 Streamlit Dashboard → Auto-starts on port 8501
- 📡 Real-time WebSockets → Live updates
- 🐳 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.
📊 Streamlit Admin
Python-only admin panel that auto-starts with Django. No npm, no Node.js - just Python.
from django_cfg import DjangoConfig
from django_cfg.modules.streamlit_admin import StreamlitAdminConfig
config = DjangoConfig(
streamlit_admin=StreamlitAdminConfig(
app_path="streamlit",
auto_start=True, # Starts with Django, dies with Django
),
)
📡 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.
🤖 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
- AI agent framework
- REST API with auto TypeScript generation
Admin:
- Streamlit admin (Python-only)
- Django Unfold for CRUD
- JWT authentication
- Dark theme by default
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
- Streamlit Admin - Python admin panel
- 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, Streamlit admin, gRPC streaming, real-time WebSockets, and 8 production-ready apps.
Made with ❤️ for the Django community
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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 django_cfg-2.0.9.tar.gz.
File metadata
- Download URL: django_cfg-2.0.9.tar.gz
- Upload date:
- Size: 2.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34225b56d1ddacb3d0b62942e6c1fd7e74da45ed6fd3d7b79e4fad8c9100dca8
|
|
| MD5 |
c04bbaf1c3e8899a2acbb0ab24876741
|
|
| BLAKE2b-256 |
d22ff8a93cfad80585d65d5267bc753d0a4c2d50ec4c5ebf84842b187be3d439
|
File details
Details for the file django_cfg-2.0.9-py3-none-any.whl.
File metadata
- Download URL: django_cfg-2.0.9-py3-none-any.whl
- Upload date:
- Size: 3.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d03b9718dfbc0dd1d5ea70c9e81aa62273b6ef23b8506d75eafdfb8af4d91ef0
|
|
| MD5 |
08563ce2a4824514cfbde3e161827966
|
|
| BLAKE2b-256 |
55feb41199602012cad7fe17ba96a5fce2ec0f6085c575f3a97210ed2f92192a
|