django-structurator


Namedjango-structurator JSON
Version 1.2.1 PyPI version JSON
download
home_pageNone
SummaryA lightweight CLI tool that helps you create Django projects and apps with a clean, scalable architectureβ€”without boilerplate or repetitive setup.
upload_time2025-07-24 14:30:35
maintainerNone
docs_urlNone
author@maulik-0207
requires_python>=3.8
licenseMIT
keywords django project-generator cli tool django-cli
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
<p align="center">
  <img src="https://raw.githubusercontent.com/maulik-0207/django-structurator/master/images/django-structurator_logo.png" alt="django-structurator" width="600"/>
</p>

πŸš€ **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 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

```bash
pip install django-structurator
```

---

## ⚑ Usage

### πŸ“‚ Create a New Django Project

```bash
django-str startproject
```

Interactive CLI will ask:
- Project name and path
- Database: SQLite / PostgreSQL / MySQL
- `.env` management: `django-environ` / `python-dotenv`
- Optional integrations (Debug Toolbar, DRF, Celery, Redis, Logger etc.)

### 🧱 Create a New Django App

```bash
django-str startapp
```

CLI will prompt for:
- App name
- Optional modules: `forms.py`, `signals.py`, `validators.py`
- Include optional features like:
  - Template tags/filters
  - Static and templates folders
  - API folder structure (DRF)

---

## πŸ—οΈ Example Project Structure

```plaintext
test/ 
β”‚
β”œβ”€β”€ 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             
|
β”œβ”€β”€ 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 # Serializers for API data
|   |   β”‚   β”‚   β”‚   β”œβ”€β”€ urls.py        # API URL patterns
|   |   β”‚   β”‚   β”‚   └── views.py       # API views
|   |   β”‚   β”‚   └── __init__.py
|   |   β”‚   β”‚
|   |   β”‚   β”œβ”€β”€ migrations/           # Database migrations
|   |   β”‚   β”‚   └── __init__.py
|   |   β”‚   β”‚
|   |   β”‚   β”œβ”€β”€ templatetags/         # Custom template tags and filters
|   |   β”‚   β”‚   β”œβ”€β”€ __init__.py
|   |   β”‚   β”‚   β”œβ”€β”€ example_filter.py # Custom filter example
|   |   β”‚   β”‚   └── example_tag.py    # Custom tag example
|   |   β”‚   β”‚
|   |   β”‚   β”œβ”€β”€ __init__.py
|   |   β”‚   β”œβ”€β”€ admin.py              # Admin site configuration
|   |   β”‚   β”œβ”€β”€ apps.py               # App configuration
|   |   β”‚   β”œβ”€β”€ forms.py              # App-specific forms (optional)
|   |   β”‚   β”œβ”€β”€ models.py             # App models
|   |   β”‚   β”œβ”€β”€ signals.py            # Signal handlers (optional)
|   |   β”‚   β”œβ”€β”€ tasks.py              # Celery tasks (optional)
|   |   β”‚   β”œβ”€β”€ tests.py              # Unit tests
|   |   β”‚   β”œβ”€β”€ urls.py               # App-specific URL patterns
|   |   β”‚   β”œβ”€β”€ validators.py         # Custom validators (optional)
|   |   β”‚   └── views.py              # App views
|   |   β”‚
|   |   β”œβ”€β”€ app-2/                    # Another app
|   |   β”œβ”€β”€ app-3/
|   |   β”œβ”€β”€ ...
|   |   └── app-4/
β”‚   β”‚
β”‚   β”œβ”€β”€ common/               # Shared utilities, constants, and helpers
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ constants.py      # Commonly used constants
β”‚   β”‚   └── helpers.py        # Utility functions
β”‚   β”‚
β”‚   β”œβ”€β”€ config/               # Project configuration
β”‚   β”‚   β”œβ”€β”€ settings/         # Environment-specific settings
β”‚   β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”‚   β”œβ”€β”€ base.py       # Base settings
β”‚   β”‚   β”‚   β”œβ”€β”€ development.py # Development environment settings
β”‚   β”‚   β”‚   └── production.py # Production environment settings
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ .env              # Environment variables (in config directory)
β”‚   β”‚   β”œβ”€β”€ .env.example      # Example env file (in config directory)
β”‚   β”‚   β”œβ”€β”€ asgi.py           # ASGI configuration
β”‚   β”‚   β”œβ”€β”€ celery.py         # Celery configuration file if used
β”‚   β”‚   β”œβ”€β”€ urls.py           # URL configuration
β”‚   β”‚   └── wsgi.py           # WSGI configuration
β”‚   β”‚
β”‚   β”œβ”€β”€ media/                # Uploaded media files
β”‚   β”‚
β”‚   β”œβ”€β”€ static/               # Static files
β”‚   β”‚   β”œβ”€β”€ css/              # CSS files
β”‚   β”‚   β”œβ”€β”€ js/               # JavaScript files
β”‚   β”‚   └── images/           # Image files
β”‚   β”‚       └── favicon.ico   # Favicon
β”‚   β”‚
β”‚   β”œβ”€β”€ templates/            # HTML templates
β”‚   β”‚   β”œβ”€β”€ base.html         # Base HTML template
β”‚   β”‚   └── index.html        # Default landing page template
β”‚   β”‚
β”‚   └── 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](https://github.com/maulik-0207/django-structurator/blob/main/LICENSE)

---

## πŸ”— Links

- GitHub Repo: [maulik-0207/django-structurator](https://github.com/maulik-0207/django-structurator)
- PyPI Package: [django-structurator](https://pypi.org/project/django-structurator/)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "django-structurator",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "django, project-generator, cli, tool, django-cli",
    "author": "@maulik-0207",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/27/b9/bd7e9cee5c79d9b219a7e5da42711f2af7f405a68b9fccc37a5bb6ef7285/django_structurator-1.2.1.tar.gz",
    "platform": null,
    "description": "\r\n<p align=\"center\">\r\n  <img src=\"https://raw.githubusercontent.com/maulik-0207/django-structurator/master/images/django-structurator_logo.png\" alt=\"django-structurator\" width=\"600\"/>\r\n</p>\r\n\r\n\ud83d\ude80 **django-structurator** is a lightweight CLI tool that helps you create Django projects and apps with a clean, scalable architecture\u2014without boilerplate or repetitive setup.\r\n\r\nNo extra dependencies. No bloated templates. Just a clean, prompt-driven workflow.\r\n\r\n---\r\n\r\n## \u2699\ufe0f Features\r\n\r\n- \ud83d\udcc1 **Scalable Folder Structure** \u2013 Consistent architecture for better maintainability.\r\n- \ud83e\udde9 **Modular App Generation** \u2013 Create Django apps with optional files: `forms`, `signals`, `validators`, `tasks`, and more.\r\n- \ud83d\udd0c **Optional Add-ons**:\r\n  - Django REST Framework (DRF)\r\n  - Django Debug Toolbar\r\n  - Celery + Redis\r\n  - SMTP Email Configuration\r\n  - Jazzmin Admin UI\r\n  - Custom Django Logger\r\n- \ud83d\udcc4 Auto-generates essentials: `.env.example`, `.gitignore`, `requirements/`, and more.\r\n\r\n---\r\n\r\n## \ud83d\udce6 Installation\r\n\r\n```bash\r\npip install django-structurator\r\n```\r\n\r\n---\r\n\r\n## \u26a1 Usage\r\n\r\n### \ud83d\udcc2 Create a New Django Project\r\n\r\n```bash\r\ndjango-str startproject\r\n```\r\n\r\nInteractive CLI will ask:\r\n- Project name and path\r\n- Database: SQLite / PostgreSQL / MySQL\r\n- `.env` management: `django-environ` / `python-dotenv`\r\n- Optional integrations (Debug Toolbar, DRF, Celery, Redis, Logger etc.)\r\n\r\n### \ud83e\uddf1 Create a New Django App\r\n\r\n```bash\r\ndjango-str startapp\r\n```\r\n\r\nCLI will prompt for:\r\n- App name\r\n- Optional modules: `forms.py`, `signals.py`, `validators.py`\r\n- Include optional features like:\r\n  - Template tags/filters\r\n  - Static and templates folders\r\n  - API folder structure (DRF)\r\n\r\n---\r\n\r\n## \ud83c\udfd7\ufe0f Example Project Structure\r\n\r\n```plaintext\r\ntest/ \r\n\u2502\r\n\u251c\u2500\u2500 docs/                     # Documentation files\r\n\u2502   \u251c\u2500\u2500 ARCHITECTURE.md       # Project folder architecture guide\r\n\u2502   \u251c\u2500\u2500 CHANGELOG.md          # Change log for the project\r\n\u2502   \u2514\u2500\u2500 README.md             # Main documentation file\r\n\u2502\r\n\u251c\u2500\u2500 local_db/                 # Local SQLite database for development\r\n\u2502   \u2514\u2500\u2500 db.sqlite3\r\n\u2502\r\n\u251c\u2500\u2500 logs/                     # Every level Log files will be here\r\n\u2502   \u251c\u2500\u2500 critical.log      \r\n\u2502   \u251c\u2500\u2500 debug.log          \r\n\u2502   \u251c\u2500\u2500 error.log          \r\n\u2502   \u251c\u2500\u2500 info.log          \r\n\u2502   \u2514\u2500\u2500 warning.log             \r\n|\r\n\u251c\u2500\u2500 requirements/             # Dependency management\r\n\u2502   \u251c\u2500\u2500 base.txt              # Core dependencies\r\n\u2502   \u251c\u2500\u2500 development.txt       # Development-specific dependencies\r\n\u2502   \u251c\u2500\u2500 production.txt        # Production-specific dependencies\r\n\u2502   \u2514\u2500\u2500 test.txt              # Testing dependencies\r\n\u2502\r\n\u251c\u2500\u2500 src/                      # Main source code folder\r\n\u2502   \u251c\u2500\u2500 apps/                 # All Django apps\r\n|   |   \u251c\u2500\u2500 app-1/                    # Example Django app\r\n|   |   \u2502   \u2502\r\n|   |   \u2502   \u251c\u2500\u2500 api/                  # API for app-1\r\n|   |   \u2502   \u2502   \u251c\u2500\u2500 v1/               # Version 1 of the API\r\n|   |   \u2502   \u2502   \u2502   \u251c\u2500\u2500 __init__.py\r\n|   |   \u2502   \u2502   \u2502   \u251c\u2500\u2500 serializers.py # Serializers for API data\r\n|   |   \u2502   \u2502   \u2502   \u251c\u2500\u2500 urls.py        # API URL patterns\r\n|   |   \u2502   \u2502   \u2502   \u2514\u2500\u2500 views.py       # API views\r\n|   |   \u2502   \u2502   \u2514\u2500\u2500 __init__.py\r\n|   |   \u2502   \u2502\r\n|   |   \u2502   \u251c\u2500\u2500 migrations/           # Database migrations\r\n|   |   \u2502   \u2502   \u2514\u2500\u2500 __init__.py\r\n|   |   \u2502   \u2502\r\n|   |   \u2502   \u251c\u2500\u2500 templatetags/         # Custom template tags and filters\r\n|   |   \u2502   \u2502   \u251c\u2500\u2500 __init__.py\r\n|   |   \u2502   \u2502   \u251c\u2500\u2500 example_filter.py # Custom filter example\r\n|   |   \u2502   \u2502   \u2514\u2500\u2500 example_tag.py    # Custom tag example\r\n|   |   \u2502   \u2502\r\n|   |   \u2502   \u251c\u2500\u2500 __init__.py\r\n|   |   \u2502   \u251c\u2500\u2500 admin.py              # Admin site configuration\r\n|   |   \u2502   \u251c\u2500\u2500 apps.py               # App configuration\r\n|   |   \u2502   \u251c\u2500\u2500 forms.py              # App-specific forms (optional)\r\n|   |   \u2502   \u251c\u2500\u2500 models.py             # App models\r\n|   |   \u2502   \u251c\u2500\u2500 signals.py            # Signal handlers (optional)\r\n|   |   \u2502   \u251c\u2500\u2500 tasks.py              # Celery tasks (optional)\r\n|   |   \u2502   \u251c\u2500\u2500 tests.py              # Unit tests\r\n|   |   \u2502   \u251c\u2500\u2500 urls.py               # App-specific URL patterns\r\n|   |   \u2502   \u251c\u2500\u2500 validators.py         # Custom validators (optional)\r\n|   |   \u2502   \u2514\u2500\u2500 views.py              # App views\r\n|   |   \u2502\r\n|   |   \u251c\u2500\u2500 app-2/                    # Another app\r\n|   |   \u251c\u2500\u2500 app-3/\r\n|   |   \u251c\u2500\u2500 ...\r\n|   |   \u2514\u2500\u2500 app-4/\r\n\u2502   \u2502\r\n\u2502   \u251c\u2500\u2500 common/               # Shared utilities, constants, and helpers\r\n\u2502   \u2502   \u251c\u2500\u2500 __init__.py\r\n\u2502   \u2502   \u251c\u2500\u2500 constants.py      # Commonly used constants\r\n\u2502   \u2502   \u2514\u2500\u2500 helpers.py        # Utility functions\r\n\u2502   \u2502\r\n\u2502   \u251c\u2500\u2500 config/               # Project configuration\r\n\u2502   \u2502   \u251c\u2500\u2500 settings/         # Environment-specific settings\r\n\u2502   \u2502   \u2502   \u251c\u2500\u2500 __init__.py\r\n\u2502   \u2502   \u2502   \u251c\u2500\u2500 base.py       # Base settings\r\n\u2502   \u2502   \u2502   \u251c\u2500\u2500 development.py # Development environment settings\r\n\u2502   \u2502   \u2502   \u2514\u2500\u2500 production.py # Production environment settings\r\n\u2502   \u2502   \u251c\u2500\u2500 __init__.py\r\n\u2502   \u2502   \u251c\u2500\u2500 .env              # Environment variables (in config directory)\r\n\u2502   \u2502   \u251c\u2500\u2500 .env.example      # Example env file (in config directory)\r\n\u2502   \u2502   \u251c\u2500\u2500 asgi.py           # ASGI configuration\r\n\u2502   \u2502   \u251c\u2500\u2500 celery.py         # Celery configuration file if used\r\n\u2502   \u2502   \u251c\u2500\u2500 urls.py           # URL configuration\r\n\u2502   \u2502   \u2514\u2500\u2500 wsgi.py           # WSGI configuration\r\n\u2502   \u2502\r\n\u2502   \u251c\u2500\u2500 media/                # Uploaded media files\r\n\u2502   \u2502\r\n\u2502   \u251c\u2500\u2500 static/               # Static files\r\n\u2502   \u2502   \u251c\u2500\u2500 css/              # CSS files\r\n\u2502   \u2502   \u251c\u2500\u2500 js/               # JavaScript files\r\n\u2502   \u2502   \u2514\u2500\u2500 images/           # Image files\r\n\u2502   \u2502       \u2514\u2500\u2500 favicon.ico   # Favicon\r\n\u2502   \u2502\r\n\u2502   \u251c\u2500\u2500 templates/            # HTML templates\r\n\u2502   \u2502   \u251c\u2500\u2500 base.html         # Base HTML template\r\n\u2502   \u2502   \u2514\u2500\u2500 index.html        # Default landing page template\r\n\u2502   \u2502\r\n\u2502   \u2514\u2500\u2500 manage.py             # Django's management script\r\n\u2502\r\n\u2514\u2500\u2500 .gitignore                # Git ignore file\r\n```\r\n\r\n---\r\n\r\n## \u2705 Requirements\r\n\r\n- Python 3.8+\r\n- Django 3.2+\r\n\r\n---\r\n\r\n## \ud83e\udde0 Why Use It?\r\n\r\n- \ud83d\udd25 Save time and skip repetitive setup\r\n\r\n- \ud83e\uddfc Enforce consistency across teams\r\n\r\n- \u26a1 Fast, interactive, zero-bloat generator\r\n\r\n---\r\n\r\n## \ud83d\udcc4 License\r\n\r\nMIT License - See the [LICENSE](https://github.com/maulik-0207/django-structurator/blob/main/LICENSE)\r\n\r\n---\r\n\r\n## \ud83d\udd17 Links\r\n\r\n- GitHub Repo: [maulik-0207/django-structurator](https://github.com/maulik-0207/django-structurator)\r\n- PyPI Package: [django-structurator](https://pypi.org/project/django-structurator/)\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A lightweight CLI tool that helps you create Django projects and apps with a clean, scalable architecture\u2014without boilerplate or repetitive setup.",
    "version": "1.2.1",
    "project_urls": {
        "Documentation": "https://github.com/maulik-0207/django-structurator/blob/master/docs/README.md",
        "Source": "https://github.com/maulik-0207/django-structurator"
    },
    "split_keywords": [
        "django",
        " project-generator",
        " cli",
        " tool",
        " django-cli"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b35a5817d0c932dd654fb992e32f99bd73450c3b18797ff37c3ace13ad3c568e",
                "md5": "289765c6795a510c726102e20049e75a",
                "sha256": "d12b65585261d79b7deb54d3626f2820491e4b79e2db72cde5b07484c590c20d"
            },
            "downloads": -1,
            "filename": "django_structurator-1.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "289765c6795a510c726102e20049e75a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 110367,
            "upload_time": "2025-07-24T14:30:34",
            "upload_time_iso_8601": "2025-07-24T14:30:34.385197Z",
            "url": "https://files.pythonhosted.org/packages/b3/5a/5817d0c932dd654fb992e32f99bd73450c3b18797ff37c3ace13ad3c568e/django_structurator-1.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "27b9bd7e9cee5c79d9b219a7e5da42711f2af7f405a68b9fccc37a5bb6ef7285",
                "md5": "b196bccba6953420a1692e87f4a690da",
                "sha256": "43c98e86480ecf53e05200509764e063afd53df3b314462d93bcada180fe9640"
            },
            "downloads": -1,
            "filename": "django_structurator-1.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "b196bccba6953420a1692e87f4a690da",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 95154,
            "upload_time": "2025-07-24T14:30:35",
            "upload_time_iso_8601": "2025-07-24T14:30:35.665829Z",
            "url": "https://files.pythonhosted.org/packages/27/b9/bd7e9cee5c79d9b219a7e5da42711f2af7f405a68b9fccc37a5bb6ef7285/django_structurator-1.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-24 14:30:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "maulik-0207",
    "github_project": "django-structurator",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "django-structurator"
}
        
Elapsed time: 1.43926s