A lightweight CLI tool that helps you create Django projects and apps with a clean, scalable architectureโwithout boilerplate or repetitive setup.
Project description
๐ django-structurator is a lightweight CLI tool that helps you create Django projects and apps with a clean, scalable architectureโwithout boilerplate or repetitive setup.
No dependencies. No fluff. Just Python input() for fast, interactive prompts.
โ What It Does
- ๐ Create Django projects with a scalable folder structure.
- โ๏ธ Quickly generate Django apps with optional files (forms, signals, validators, API support, etc.).
- ๐ง Customize project setup with advanced features like:
- Django Rest Framework (DRF)
- Django Debug Toolbar
- Celery
- Redis cache
- SMTP email config
- Jazzmin admin
- ๐๏ธ Auto-generate essential files like
.env.exampleand.gitignore.
๐ Installation
pip install django-structurator
โก Usage
Create a Django Project
django-str startproject
Follow the prompts to:
- Name your project
- Choose a database: SQLite, PostgreSQL, MySQL
- Pick
.envconfiguration (django-environ, python-dotenv) - Add optional features (DRF, Celery, Redis, Debug Toolbar, etc.)
โ Example Output:
>> django-str startproject
Enter project name: test
Enter project path (default: E:\Django\test):
Select database
1. postgresql
2. mysql
3. sqlite
Select an option (1-3): 3
๐ง Optional Project Features:
Do you want to use Django Debug Toolbar? (y/n) [default: n]: y
....
๐ Project Configuration Summary:
========================================
project_name: test
project_path: E:\Django\test
database: sqlite
....
========================================
Do you want to proceed with project creation? (y/n) [default: y]: y
...
Django project 'test' created successfully at E:\Django\test
Create a Django App
django-str startapp
Follow the prompts to:
- Name your app
- Add files like:
forms.py,signals.py,validators.py - Include optional features like:
- Template tags/filters
- Static and templates folders
- API folder structure (DRF)
โ Example Output:
>> django-str startapp
Enter App name: main
๐ง Optional App Features:
Do you want to use validators.py? (y/n) [default: n]: y
....
๐ App Configuration Summary:
app_dir: ...\test\src\apps
app_name: main
app_path: ...\test\src\apps\main
use_validators_py: True
....
Do you want to proceed with app creation? (y/n) [default: y]: y
๐ Django app 'main' created successfully!
๐๏ธ Example Project Structure
my_project/
โโโ docs/
โโโ local_db/
โโโ requirements/
โโโ src/
โ โโโ apps/
โ โ โโโ blog/
โ โ โ โโโ api/v1/
โ โ โ โโโ migrations/
โ โ โ โโโ templatetags/
โ โ โ โโโ admin.py
โ โ โ โโโ apps.py
โ โ โ โโโ forms.py
โ โ โ โโโ models.py
โ โ โ โโโ signals.py
โ โ โ โโโ tasks.py
โ โ โ โโโ validators.py
โ โ โ โโโ views.py
โ โ โโโ ...
โ โโโ common/
โ โโโ config/
โ โ โโโ settings/
โ โ โโโ urls.py
โ โ โโโ wsgi.py
โ โ โโโ asgi.py
โ โโโ media/
โ โโโ static/
โ โโโ templates/
โ โโโ manage.py
โโโ .gitignore
โ Requirements
- Python 3.8+
- Django 3.2+
๐ License
MIT License - See the LICENSE
๐ Links
- GitHub Repo: maulik-0207/django-structurator
- PyPI Package: django-structurator
Why Use django-structurator?
๐ฅ Save time, avoid repetitive setup
๐งน Clean, maintainable architecture
โก Lightweight, no external dependencies
๐ ๏ธ Customizable project and app scaffolding
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.1.1.tar.gz.
File metadata
- Download URL: django_structurator-1.1.1.tar.gz
- Upload date:
- Size: 92.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
783d78cbe098450327b15945497322a177acbee3ccfa986a090325d2bc17bd75
|
|
| MD5 |
0dbce4e95744d5627ae0bc6c07dbd6ab
|
|
| BLAKE2b-256 |
c90345df185bf98a7a369fb48bbfac6d8e8b04c01523fecdc47951784c7a4851
|
File details
Details for the file django_structurator-1.1.1-py3-none-any.whl.
File metadata
- Download URL: django_structurator-1.1.1-py3-none-any.whl
- Upload date:
- Size: 107.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
522d53fc6edcfad62b19f7404cb424f955ec00e59279c437092358cc6f9bb95e
|
|
| MD5 |
0ea322aa7426529d915f3d3d4602d218
|
|
| BLAKE2b-256 |
dc8c7d95422ad65dfbcc9279a8a40c833832d4f2fb8def59415b23fed8f44ffc
|