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.
Project description
๐ 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
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
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
|