Skip to main content

django-structurator

🚀 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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_structurator-1.3.0.tar.gz (103.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_structurator-1.3.0-py3-none-any.whl (120.7 kB view details)

Uploaded Python 3

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

Hashes for django_structurator-1.3.0.tar.gz
Algorithm Hash digest
SHA256 9b0ae16b80d3bd51f43627a45de32642cc4786634f9f4350186f25f74ceb96f7
MD5 23bb98a8cf6ade5dea3b8b0950898fbb
BLAKE2b-256 429b767f1d94686b2de94dabd0d77a558f289460275705f27b2000c4464c6a91

See more details on using hashes here.

File details

Details for the file django_structurator-1.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_structurator-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 247c9354d987f8c6316774a0096341d975872e621eab0837e6cad568f60415ef
MD5 09479278c8007b095f7d47228d838771
BLAKE2b-256 6fedbda03d41c93b6b509a710d62dc8ad8a8d60d84706b19d64bb1e73b4db225

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 files

1.2.1

2 files

1.2.0

2 files

1.1.1

2 files

1.1.0

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page