A CLI tool to automate Django project setup, including settings splitting, .env creation, and app boilerplate.
Project description
Django Autokit
Django Autokit is a CLI tool to automate the setup of a Django project. It helps with environment variable setup, settings splitting (base.py, dev.py, prod.py), .env scaffolding, and boilerplate app creation — saving you time when starting new projects.
✨ Features
- Automatically split
settings.pyintobase.py,dev.py, andprod.py - Create a
.envfile withSETTINGS_PATHandENVvariables - Add newly created apps to
INSTALLED_APPS(supports flat and split settings) - Smart handling for Django 4.x and 5.x compatibility
📦 Installation
pip install django-autokit
🚀 Usage
1. Initialize in your Django project root:
bash
Copy
Edit
python -m django_autokit.cli
This will:
Detect or create .env
Set SETTINGS_PATH to the correct module path (e.g. yourproject.settings.base)
Add ENV=dev by default with a comment
Split your settings if needed
2. Create an app:
bash
Copy
Edit
python -m django_autokit.cli startapp blog
This will:
Create the blog app using Django’s startapp
Automatically add it to INSTALLED_APPS
⚙️ Environment Management
In your .env, you’ll find:
env
Copy
Edit
# Path to your Django settings file (use base.py for split settings)
SETTINGS_PATH=yourproject.settings.base
# Set ENV to 'prod' when deploying to production
ENV=dev
📁 Project Structure After Running Autokit
yourproject/
├── manage.py
├── .env
├── yourproject/
│ ├── settings/
│ │ ├── base.py
│ │ ├── dev.py
│ │ └── prod.py
│ └── ...
├── blog/
│ └── ...
✅ Compatibility
✅ Django 4.x
✅ Django 5.x
✅ Python 3.7+
🛡 License
This project is licensed under the MIT License - see the LICENSE file for details.
🤝 Contributing
Pull requests are welcome! Feel free to open an issue to suggest new features or report bugs.
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-autokit-0.1.0.tar.gz.
File metadata
- Download URL: django-autokit-0.1.0.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1aad68706ba312c94b0ddd62c57382b9d2f3001115ad479979da38a84a175efc
|
|
| MD5 |
a95916afcc00c5f392b3ad517857863b
|
|
| BLAKE2b-256 |
ae4f245e3dc522941f7418666aa5c09239f9cf2b5696ac690262dfdf71ca6b13
|
File details
Details for the file django_autokit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: django_autokit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f8d0a61f152623aaaad60f10bb15327f8d90081373f454e31db882e2bb76e5f
|
|
| MD5 |
24341073af949a54aae52c882018e5b5
|
|
| BLAKE2b-256 |
a48d22b32cb08da2c995760cd9889a4445a5241b49ea933748a059c0ce6788a1
|