🚀 django-structurator is an incredibly powerful, AI-friendly CLI tool designed to scaffold production-ready Django projects and apps instantly. It enforces a strict, scalable architecture out of the box, eliminating repetitive boilerplate and creating a highly modular environment.
Whether you're a human developer looking for consistency or an AI Coding Assistant (like Cursor, Claude, or Antigravity) seeking explicit structural rules, this package lays down a flawless foundation. No extra dependencies. No bloated templates. Just a clean, prompt-driven workflow.
⚙️ Features
- 📁 Scalable Folder Structure – Consistent architecture for better maintainability.
- 🧩 Modular App Generation – Create Django apps with optional files:
forms,signals,validators,tasks, and more. - 🔌 Optional Add-ons:
- Django REST Framework (DRF)
- Django Debug Toolbar
- Celery + Redis
- SMTP Email Configuration
- Jazzmin Admin UI
- Custom Django Logger
- 📄 Auto-generates essentials:
.env.example,.gitignore,requirements/, and more.
📦 Installation
pip install django-structurator
⚡ Usage
📂 Create a New Django Project
Interactive Mode:
django-str startproject
Non-Interactive Mode (Full Stack Automation):
django-str startproject --no-que --name myproject --path . --env django-environ --db postgresql --use-docker --use-celery
The CLI natively supports configuring:
- Database: SQLite / PostgreSQL / MySQL
- Environments:
django-environ/python-dotenv - Optional Integrations: use-smtp-email, use-celery, use-redis, use-drf, use-jazzmin, use-logger, use-docker
🧱 Create a New Django App
App generation must be executed from the root of an existing Django project (where manage.py lives).
Interactive Mode:
django-str startapp
Non-Interactive Mode (API Microservice):
django-str startapp --no-que --name billing --use-api-drf --use-tasks
Optional App-level Modules:
- use-forms, use-signals, use-tasks, use-app-static-template, use-template-tags, use-api-drf
🏗️ Example Project Structure
```text
my_project/
│
├── docs/ # Documentation files
│ ├── ARCHITECTURE.md # Project folder architecture guide
│ ├── CHANGELOG.md # Change log for the project
│ └── README.md # Main documentation file
│
├── local_db/ # Local SQLite database for development
│ └── db.sqlite3
│
├── logs/ # Every level Log files will be here
│ ├── critical.log
│ ├── debug.log
│ ├── error.log
│ ├── info.log
│ └── warning.log
│
├── nginx/ # Optional: Nginx reverse proxy configuration
│ └── nginx.conf
│
├── docker-compose.yml # Optional: Docker map (web, db, redis, celery)
├── Dockerfile # Optional: Docker web container configuration
│
├── requirements/ # Dependency management
│ ├── base.txt # Core dependencies
│ ├── development.txt # Development-specific dependencies
│ ├── production.txt # Production-specific dependencies
│ └── test.txt # Testing dependencies
│
├── src/ # Main source code folder
│ ├── apps/ # All Django apps
│ │ ├── app-1/ # Example Django app
│ │ │ │
│ │ │ ├── api/ # API for app-1
│ │ │ │ ├── v1/ # Version 1 of the API
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── serializers.py
│ │ │ │ │ ├── urls.py
│ │ │ │ │ └── views.py
│ │ │ │ └── __init__.py
│ │ │ │
│ │ │ ├── migrations/ # Database migrations
│ │ │ │
│ │ │ ├── templatetags/ # Custom template tags and filters
│ │ │ │
│ │ │ ├── admin.py # Admin site configuration
│ │ │ ├── apps.py # App configuration
│ │ │ ├── models.py # App models (Abstracts TimeStamped UUID)
│ │ │ ├── tests.py # Isolated DB test cases
│ │ │ ├── urls.py # App-specific URL patterns
│ │ │ └── views.py # App views
│ │ │
│ │ ├── app-2/ # Another app
│ │ └── ...
│ │
│ ├── common/ # Shared utilities, constants, and helpers
│ │ ├── __init__.py
│ │ ├── constants.py # Commonly used constants
│ │ └── helpers.py # Utility functions (mailer, loggers)
│ │
│ ├── config/ # Project configuration
│ │ ├── settings/ # Environment-specific settings
│ │ │ ├── __init__.py
│ │ │ ├── base.py # Base settings
│ │ │ ├── development.py # Development environment settings
│ │ │ └── production.py # Production environment settings
│ │ ├── .env # Environment secrets boundary
│ │ ├── .env.example # Example env file
│ │ ├── asgi.py # ASGI configuration
│ │ ├── celery.py # Celery configuration file
│ │ ├── urls.py # Master URL configuration
│ │ └── wsgi.py # WSGI configuration
│ │
│ ├── media/ # Uploaded media files
│ ├── static/ # Static files
│ ├── templates/ # Global HTML templates
│ └── manage.py # Django's management script
│
└── .gitignore # Git ignore file
✅ Requirements
- Python 3.8+
- Django 3.2+
🧠 Why Use It?
-
🔥 Save time and skip repetitive setup
-
🧼 Enforce consistency across teams
-
⚡ Fast, interactive, zero-bloat generator
📄 License
MIT License - See the LICENSE
🔗 Links
- GitHub Repo: maulik-0207/django-structurator
- PyPI Package: django-structurator
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_structurator-1.3.0.tar.gz.
File metadata
- Download URL: django_structurator-1.3.0.tar.gz
- Upload date:
- Size: 103.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b0ae16b80d3bd51f43627a45de32642cc4786634f9f4350186f25f74ceb96f7
|
|
| MD5 |
23bb98a8cf6ade5dea3b8b0950898fbb
|
|
| BLAKE2b-256 |
429b767f1d94686b2de94dabd0d77a558f289460275705f27b2000c4464c6a91
|
File details
Details for the file django_structurator-1.3.0-py3-none-any.whl.
File metadata
- Download URL: django_structurator-1.3.0-py3-none-any.whl
- Upload date:
- Size: 120.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
247c9354d987f8c6316774a0096341d975872e621eab0837e6cad568f60415ef
|
|
| MD5 |
09479278c8007b095f7d47228d838771
|
|
| BLAKE2b-256 |
6fedbda03d41c93b6b509a710d62dc8ad8a8d60d84706b19d64bb1e73b4db225
|