# HiDjango
HiDjango is a Python library designed to simplify the initialization and setup of Django projects, enabling developers to create or configure Django projects with DevOps setups and database settings using simple commands.
## Features
- Initialize new Django projects with a single command.
- Configure existing Django projects with DevOps and database settings.
- Automatically add Docker and Docker Compose files for development.
- Generate an `.env` file with the `SECRET_KEY` extracted from Django settings.
- Configure databases (PostgreSQL or MySQL) with minimal effort.
- Easy-to-use CLI for managing Django projects.
## What's New in Version 1.1.0
- **Existing Project Configuration**: Added the ability to configure existing Django projects with DevOps and database settings.
- **`.env` File Generation**: Automatically generates an `.env` file for managing sensitive data like `SECRET_KEY`.
## Installation
To install HiDjango, use pip:
```bash
pip install hidjango
```
## Usage
### Creating a Django Project
To create a new Django project:
```bash
hidjango --init --name="project_name"
```
This command creates a new Django project with the specified name.
### Configuring an Existing Django Project
To configure an existing Django project (e.g., adding DevOps files or setting up a database):
```bash
hidjango --config /path/to/project
```
#### Add DevOps Configuration
```bash
hidjango --config /path/to/project --devops
```
This adds the following files to your existing project:
- `Dockerfile`
- `docker-compose.yml`
If the database configuration already exists in the `settings.py` file, it will be included in the `docker-compose.yml` automatically.
#### Add Database Configuration
```bash
hidjango --config /path/to/project --db=postgresql
```
This command:
1. Configures the database settings in the `settings.py` file.
2. If `--devops` is also included, adds the database configuration to the `docker-compose.yml`.
#### Full Configuration Example:
```bash
hidjango --config /path/to/project --devops --db=mysql
```
This performs:
1. Adding Docker and Docker Compose files.
2. Configuring MySQL as the database in both `settings.py` and `docker-compose.yml`.
### Adding DevOps Files to a New Project
To include Docker and Docker Compose files in a new project:
```bash
hidjango --init --name="project_name" --devops
```
This adds:
- `Dockerfile`
- `docker-compose.yml`
### Generating `.env` File
HiDjango automatically generates an `.env` file in the project directory with the `SECRET_KEY` from `settings.py`. This ensures secure management of sensitive data.
## Requirements
- Python 3.7 or higher
- Django 3.2 or higher
## Example Commands
### Full Setup for a New Project
```bash
hidjango --init --name="my_project" --devops --db=postgresql
```
### Full Configuration for an Existing Project
```bash
hidjango --config /path/to/project --devops --db=mysql
```
## Contributing
We welcome contributions! To contribute:
1. Fork the repository on GitHub.
2. Make your changes.
3. Open a pull request.
For issues or feature requests, please open an issue on [GitHub](https://github.com/YourUsername/hidjango/issues).
## License
This project is licensed under the MIT License. See the LICENSE file for details.
## Links
- [GitHub Repository](https://github.com/YourUsername/hidjango)
- [PyPI Package](https://pypi.org/project/hidjango/)
---
Raw data
{
"_id": null,
"home_page": "https://github.com/parsarezaee/HiDjango",
"name": "hidjango",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "django library project automation devops",
"author": "Parsa Rezaei",
"author_email": "rezaei.7parsa@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/ad/33/6278f489ad7024c79c3744547e515398f0cc1515d9ea04040361fda88319/hidjango-1.1.0.tar.gz",
"platform": null,
"description": "# HiDjango\n\nHiDjango is a Python library designed to simplify the initialization and setup of Django projects, enabling developers to create or configure Django projects with DevOps setups and database settings using simple commands.\n\n## Features\n\n- Initialize new Django projects with a single command.\n- Configure existing Django projects with DevOps and database settings.\n- Automatically add Docker and Docker Compose files for development.\n- Generate an `.env` file with the `SECRET_KEY` extracted from Django settings.\n- Configure databases (PostgreSQL or MySQL) with minimal effort.\n- Easy-to-use CLI for managing Django projects.\n\n## What's New in Version 1.1.0\n\n- **Existing Project Configuration**: Added the ability to configure existing Django projects with DevOps and database settings.\n- **`.env` File Generation**: Automatically generates an `.env` file for managing sensitive data like `SECRET_KEY`.\n\n## Installation\n\nTo install HiDjango, use pip:\n\n```bash\npip install hidjango\n```\n\n## Usage\n\n### Creating a Django Project\n\nTo create a new Django project:\n\n```bash\nhidjango --init --name=\"project_name\"\n```\n\nThis command creates a new Django project with the specified name.\n\n### Configuring an Existing Django Project\n\nTo configure an existing Django project (e.g., adding DevOps files or setting up a database):\n\n```bash\nhidjango --config /path/to/project\n```\n\n#### Add DevOps Configuration\n\n```bash\nhidjango --config /path/to/project --devops\n```\n\nThis adds the following files to your existing project:\n- `Dockerfile`\n- `docker-compose.yml`\n\nIf the database configuration already exists in the `settings.py` file, it will be included in the `docker-compose.yml` automatically.\n\n#### Add Database Configuration\n\n```bash\nhidjango --config /path/to/project --db=postgresql\n```\n\nThis command:\n1. Configures the database settings in the `settings.py` file.\n2. If `--devops` is also included, adds the database configuration to the `docker-compose.yml`.\n\n#### Full Configuration Example:\n\n```bash\nhidjango --config /path/to/project --devops --db=mysql\n```\n\nThis performs:\n1. Adding Docker and Docker Compose files.\n2. Configuring MySQL as the database in both `settings.py` and `docker-compose.yml`.\n\n### Adding DevOps Files to a New Project\n\nTo include Docker and Docker Compose files in a new project:\n\n```bash\nhidjango --init --name=\"project_name\" --devops\n```\n\nThis adds:\n- `Dockerfile`\n- `docker-compose.yml`\n\n### Generating `.env` File\n\nHiDjango automatically generates an `.env` file in the project directory with the `SECRET_KEY` from `settings.py`. This ensures secure management of sensitive data.\n\n## Requirements\n\n- Python 3.7 or higher\n- Django 3.2 or higher\n\n## Example Commands\n\n### Full Setup for a New Project\n\n```bash\nhidjango --init --name=\"my_project\" --devops --db=postgresql\n```\n\n### Full Configuration for an Existing Project\n\n```bash\nhidjango --config /path/to/project --devops --db=mysql\n```\n\n## Contributing\n\nWe welcome contributions! To contribute:\n\n1. Fork the repository on GitHub.\n2. Make your changes.\n3. Open a pull request.\n\nFor issues or feature requests, please open an issue on [GitHub](https://github.com/YourUsername/hidjango/issues).\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE file for details.\n\n## Links\n\n- [GitHub Repository](https://github.com/YourUsername/hidjango)\n- [PyPI Package](https://pypi.org/project/hidjango/)\n\n---\n\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A library to simplify Django project initialization",
"version": "1.1.0",
"project_urls": {
"Homepage": "https://github.com/parsarezaee/HiDjango"
},
"split_keywords": [
"django",
"library",
"project",
"automation",
"devops"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "588c55cdf0c925b73bd5478f0276c59731fc7ce386ca55d39306c9469b72f4bf",
"md5": "34dd96c3917a7fecbb9ba46d7223df38",
"sha256": "82f8c41d29d3c512ac05b4118543637716bbce2bab5a92b991079acdb81bf6c3"
},
"downloads": -1,
"filename": "hidjango-1.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "34dd96c3917a7fecbb9ba46d7223df38",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 7288,
"upload_time": "2024-12-26T18:16:07",
"upload_time_iso_8601": "2024-12-26T18:16:07.494150Z",
"url": "https://files.pythonhosted.org/packages/58/8c/55cdf0c925b73bd5478f0276c59731fc7ce386ca55d39306c9469b72f4bf/hidjango-1.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ad336278f489ad7024c79c3744547e515398f0cc1515d9ea04040361fda88319",
"md5": "f059cd193724cce3feb63aa62de09549",
"sha256": "305fa79eb36ad97d570000691ff9eaaf2f34c7332fd155829b62249c94480151"
},
"downloads": -1,
"filename": "hidjango-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "f059cd193724cce3feb63aa62de09549",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 6574,
"upload_time": "2024-12-26T18:16:09",
"upload_time_iso_8601": "2024-12-26T18:16:09.328143Z",
"url": "https://files.pythonhosted.org/packages/ad/33/6278f489ad7024c79c3744547e515398f0cc1515d9ea04040361fda88319/hidjango-1.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-26 18:16:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "parsarezaee",
"github_project": "HiDjango",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "hidjango"
}