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.1.tar.gz (6.7 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.1-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file django-autokit-0.1.1.tar.gz.

File metadata

  • Download URL: django-autokit-0.1.1.tar.gz
  • Upload date:
  • Size: 6.7 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.1.tar.gz
Algorithm Hash digest
SHA256 beb60c804f6c3e517b412942b68c963abfcf9d0ecad90fa4dc3124119239c45c
MD5 31db597e3c293cce80934b4f5904ff1c
BLAKE2b-256 ac83b09ce52da3f3034e3a86073e443fc74ef8814406a18c86873d9a5da7571f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_autokit-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 98aff361f41a24ff50be84debfeec0bdc6d9bf343c0175f04fc56a355c8e2c7f
MD5 666551dee350e7072aa802fc5523077a
BLAKE2b-256 11496bbd6e1f74d7ee2721a91bafc7e9917a7ff152b005cf3f174930bf5054d4

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