django-hexagonal-cli


Namedjango-hexagonal-cli JSON
Version 0.1.1 PyPI version JSON
download
home_pageNone
SummaryA command-line tool to generate Django projects and apps following the hexagonal (ports and adapters) architecture.
upload_time2025-08-03 21:39:48
maintainerNone
docs_urlNone
authorbrunogonzalezlla
requires_python<4.0,>=3.12
licenseMIT
keywords django hexagonal cli codegen
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Django Hexagonal Architecture

A command-line tool to generate Django projects and apps following the hexagonal (ports and adapters) architecture.

---

## What is this?
`django-hexagonal-cli` is a CLI utility that helps you quickly scaffold Django projects and apps with a clean hexagonal structure, ready for scalable, maintainable, and testable development.

## Installation

```bash
pip install django-hexagonal-cli
```

This will provide the `django-admin-hex` command.

## Usage

- **Create a new project:**
  ```bash
  django-admin-hex startproject <project_name> [<first_app_name>]
  ```
  This generates a Django project with the recommended hexagonal structure. Optionally, you can create the first app at the same time.

- **Create a new app in an existing project:**
  ```bash
  cd <project_name>
  django-admin-hex startapp <app_name>
  ```
  This creates a new app inside the `apps/` folder, following the hexagonal pattern.

## Project Structure Example
```
project_root/
├── apps/
│   └── <app_name>/
│       ├── application/
│       ├── domain/
│       ├── infrastructure/
│       └── interfaces/
├── config/
├── manage.py
├── pyproject.toml
└── README.md
```

## Why Hexagonal Architecture?
- Promotes separation of concerns
- Makes testing and maintenance easier
- Adapts easily to new frameworks or external services

## Example

This repository includes a working example of a Django project with hexagonal architecture in the `example/` folder. You can explore it to see a real API implementation using this structure.

## Resources
- [Official Django documentation](https://docs.djangoproject.com/en/5.2/)
- [Hexagonal architecture (Alistair Cockburn)](https://alistair.cockburn.us/hexagonal-architecture/)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "django-hexagonal-cli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.12",
    "maintainer_email": null,
    "keywords": "django, hexagonal, cli, codegen",
    "author": "brunogonzalezlla",
    "author_email": "brunogllaga@icloud.com",
    "download_url": "https://files.pythonhosted.org/packages/af/97/0ad35bef5a138b4b142c4f1100e372244b0705fe2a4f11a94fca2e7ac326/django_hexagonal_cli-0.1.1.tar.gz",
    "platform": null,
    "description": "\n# Django Hexagonal Architecture\n\nA command-line tool to generate Django projects and apps following the hexagonal (ports and adapters) architecture.\n\n---\n\n## What is this?\n`django-hexagonal-cli` is a CLI utility that helps you quickly scaffold Django projects and apps with a clean hexagonal structure, ready for scalable, maintainable, and testable development.\n\n## Installation\n\n```bash\npip install django-hexagonal-cli\n```\n\nThis will provide the `django-admin-hex` command.\n\n## Usage\n\n- **Create a new project:**\n  ```bash\n  django-admin-hex startproject <project_name> [<first_app_name>]\n  ```\n  This generates a Django project with the recommended hexagonal structure. Optionally, you can create the first app at the same time.\n\n- **Create a new app in an existing project:**\n  ```bash\n  cd <project_name>\n  django-admin-hex startapp <app_name>\n  ```\n  This creates a new app inside the `apps/` folder, following the hexagonal pattern.\n\n## Project Structure Example\n```\nproject_root/\n\u251c\u2500\u2500 apps/\n\u2502   \u2514\u2500\u2500 <app_name>/\n\u2502       \u251c\u2500\u2500 application/\n\u2502       \u251c\u2500\u2500 domain/\n\u2502       \u251c\u2500\u2500 infrastructure/\n\u2502       \u2514\u2500\u2500 interfaces/\n\u251c\u2500\u2500 config/\n\u251c\u2500\u2500 manage.py\n\u251c\u2500\u2500 pyproject.toml\n\u2514\u2500\u2500 README.md\n```\n\n## Why Hexagonal Architecture?\n- Promotes separation of concerns\n- Makes testing and maintenance easier\n- Adapts easily to new frameworks or external services\n\n## Example\n\nThis repository includes a working example of a Django project with hexagonal architecture in the `example/` folder. You can explore it to see a real API implementation using this structure.\n\n## Resources\n- [Official Django documentation](https://docs.djangoproject.com/en/5.2/)\n- [Hexagonal architecture (Alistair Cockburn)](https://alistair.cockburn.us/hexagonal-architecture/)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A command-line tool to generate Django projects and apps following the hexagonal (ports and adapters) architecture.",
    "version": "0.1.1",
    "project_urls": null,
    "split_keywords": [
        "django",
        " hexagonal",
        " cli",
        " codegen"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3dd6a91d85777ae4a9edcbba65dd5ac7ddbcbe2766dc9baed086061bafdd5d72",
                "md5": "66360a01e77e484f36851f311c1cc9c2",
                "sha256": "0809a8fd85e0cd1e00a724418bd8cc03d4d88ca13c509e958299e89c37b0df83"
            },
            "downloads": -1,
            "filename": "django_hexagonal_cli-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "66360a01e77e484f36851f311c1cc9c2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.12",
            "size": 12794,
            "upload_time": "2025-08-03T21:39:47",
            "upload_time_iso_8601": "2025-08-03T21:39:47.035104Z",
            "url": "https://files.pythonhosted.org/packages/3d/d6/a91d85777ae4a9edcbba65dd5ac7ddbcbe2766dc9baed086061bafdd5d72/django_hexagonal_cli-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "af970ad35bef5a138b4b142c4f1100e372244b0705fe2a4f11a94fca2e7ac326",
                "md5": "916d38e5f55e8a95ae1343395e1f4e9e",
                "sha256": "559ae07c8e3cf26fa94e2372a22cffa4d8d3f510c1a8cd0fa13954bb2326dc24"
            },
            "downloads": -1,
            "filename": "django_hexagonal_cli-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "916d38e5f55e8a95ae1343395e1f4e9e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.12",
            "size": 5968,
            "upload_time": "2025-08-03T21:39:48",
            "upload_time_iso_8601": "2025-08-03T21:39:48.101099Z",
            "url": "https://files.pythonhosted.org/packages/af/97/0ad35bef5a138b4b142c4f1100e372244b0705fe2a4f11a94fca2e7ac326/django_hexagonal_cli-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-03 21:39:48",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "django-hexagonal-cli"
}
        
Elapsed time: 1.86032s