Modern Django framework with type-safe Pydantic v2 configuration, Next.js admin integration, 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.
pip install django-cfg==2.3.344 Copy PIP instructions
The Modern Django Framework for Enterprise Applications
Type-safe configuration • Real-time WebSockets • gRPC Streaming • OpenAPI client generation • AI-Native Docs • 8 Production Apps
Get Started • Live Demo • Documentation • MCP Server
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.
# 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:
# 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
Pydantic v2 models replace error-prone settings.py - catch bugs before deployment.
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.
Bidirectional streaming with automatic WebSocket bridge - perfect for real-time architectures.
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.
User auth • Support tickets • Newsletter • CRM • AI agents • Knowledge base • Payments • Multi-site
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.
ai dev django52 docs full gen geo local mcp-sql payments rq s3 tasks test
ai-agents configuration django django-environ django-settings enterprise-django ide-autocomplete modern-django nextjs-admin pydantic pydantic-settings react-admin settings startup-validation type-safe-config type-safety typescript-generation
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
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.
None of the files in this release were uploaded with provenance metadata.
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.




