Skip to main content

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 that automates the setup and maintenance of Django projects. It simplifies common tasks like environment variable setup, splitting settings into base.py, dev.py, and prod.py, generating .env files, and creating boilerplate apps — saving you time and effort when starting or scaling projects.


✨ Features

  • 📁 Split settings.py into base.py, dev.py, and prod.py
  • 🔐 Auto-generate a .env with SETTINGS_PATH and ENV variables
  • 🧠 Automatically add new apps to INSTALLED_APPS (supports both flat and modular settings)
  • 🔄 Compatible with Django 4.x and 5.x

📦 Installation

pip install django-autokit

🚀 Usage

Once installed, use the djkit CLI tool to run commands.

To see all available commands:

djkit --help

1️⃣ Initialize Autokit

In the root of your Django project, run:

djkit init-env

This will:

  • Create a .env file if it doesn’t exist
  • Set the SETTINGS_PATH (e.g., yourproject.settings.base)
  • Add ENV=dev with a comment explaining how to switch to production
  • Auto-detect and optionally split settings.py into modular settings

2️⃣ Split Settings Manually (Optional)

If not already split, you can do it manually with:

djkit split-settings

This will:

  • Move your current settings.py into a settings/ package
  • Create base.py, dev.py, and prod.py for better configuration separation

3️⃣ Create a Django App

To generate a new app and automatically register it in INSTALLED_APPS:

djkit startapp blog

This will:

  • Run django-admin startapp blog
  • Automatically insert 'blog' into your settings (flat or modular)

⚙️ Environment Management

Your .env file will look like this:

# 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

📁 Example Project Structure

yourproject/
├── manage.py
├── .env
├── yourproject/
│   ├── settings/
│      ├── base.py
│      ├── dev.py
│      └── prod.py
│   └── __init__.py
├── blog/
│   └── __init__.py

✅ 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! If you find a bug or have a feature request, feel free to open an issue.

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

django_autokit-0.1.2.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_autokit-0.1.2-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file django_autokit-0.1.2.tar.gz.

File metadata

  • Download URL: django_autokit-0.1.2.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.16

File hashes

Hashes for django_autokit-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a4703e9d3729e4cf6f7fda88efd11689d2ed9072d9d152bfc28cab889687a05f
MD5 848a2e1e2a8b36dbc3450ef195ce6cdf
BLAKE2b-256 0ba6c87263cc72a9a75c5db69f7fe580ceb80a468a8de4634ecbac9fae41ff56

See more details on using hashes here.

File details

Details for the file django_autokit-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: django_autokit-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.16

File hashes

Hashes for django_autokit-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2b121877d2ddf2a4c0bb45eb6cdce86bd0700c3435d8bbf68aa82446587a0e31
MD5 3edd89410177979bad89e9dde149023c
BLAKE2b-256 6e407c1183f96bfc318a542097e8b75739ca7ca5598bb22abc94b8e9bc509fd4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page