Skip to main content

djinit

PyPI didn't allow the original name, so you'll find it as djinitx on PyPI

PyPI Django Python License

A CLI that scaffolds production-ready Django projects with DRF, JWT auth, API docs, and deployment configs - all through an interactive wizard. No more copy-pasting settings or wiring up apps by hand.

pipx install djinitx
djinit setup

Installation

# Recommended - isolated environment
pipx install djinitx

# Or with uv
uv tool install djinitx

# Or with pip
pip install djinitx

Requires Python 3.13+.

Usage

Create a project

djinit setup
# or
dj setup

The wizard walks you through these choices:

  1. Project structure - Standard, Predefined (apps/ + api/), Unified (core/ + apps/), or Single Folder
  2. Project name and directory
  3. Database - PostgreSQL or MySQL; DATABASE_URL or individual env vars
  4. Frontend tools - Tailwind CSS, HTMX, and/or Vite (optional)
  5. Django apps - Name them; optionally nest under an apps/ package
  6. CI/CD - GitHub Actions, GitLab CI, both, or none

When you're done, you have a fully configured Django project ready to run.

Add apps later

djinit app users products orders

Creates the apps, registers them in INSTALLED_APPS, and wires up URL includes.

Generate secret keys

djinit secret
djinit secret --count 5 --length 64

What You Get

Every project ships with:

  • Split settings - base.py, development.py, production.py with sensible defaults
  • Django REST Framework - With JWT authentication (access + refresh tokens)
  • API documentation - Swagger UI at /docs/, ReDoc at /schema/
  • CORS - Configured for local dev, locked down for production
  • WhiteNoise - Static file serving, production-ready
  • django-jazzmin - Modern admin interface
  • Environment management - .env.sample with django-environ
  • Deployment configs - Dockerfile, Procfile, runtime.txt
  • CI/CD pipelines - GitHub Actions and/or GitLab CI
  • Task runner - Justfile with common commands
  • .gitignore - Python + Node defaults

Optional add-ons when selected:

Feature Package What's configured
Tailwind CSS django-tailwind-cli Settings, DaisyUI theme, Node install in Docker
HTMX django-htmx Installed app + HtmxMiddleware
Vite django-vite vite.config.ts, dev/prod mode toggles, CI build step

Development workflow

just dev              # Start dev server
just migrate          # Run migrations
just test             # Run tests
just lint             # Lint with ruff
just format           # Format with ruff
just vite             # Start Vite dev server (if selected)
just dev-full         # Django + Vite together (if selected)

No just installed? These map directly to Django management commands.

Project Structures

Standard

myproject/
├── manage.py
├── myproject/          # Config module
│   ├── settings/       # base.py, development.py, production.py
│   ├── urls.py
│   └── wsgi.py
└── apps/               # Your apps (optional)
    └── users/

Predefined

myproject/
├── manage.py
├── config/             # Django config
│   ├── settings/
│   └── urls.py
├── apps/               # Business logic
│   ├── users/
│   └── core/
└── api/                # API routes
    └── v1/

Unified

myproject/
├── manage.py
├── core/               # Django config
│   ├── settings/
│   └── urls.py
└── apps/               # Main application package
    ├── admin/
    ├── models/
    ├── serializers/
    ├── views/
    ├── urls/
    └── api/

Single Folder

myproject/
├── manage.py
├── project/            # Configurable name
│   ├── settings/
│   ├── urls.py
│   ├── models/
│   ├── api/
│   └── wsgi.py

Environment Setup

cp .env.sample .env

SQLite works out of the box for development. Swap in your production database when you're ready.

Packages

Package Role
Django Web framework
django-environ Environment variable management
django-jazzmin Admin UI
djangorestframework REST API toolkit
djangorestframework-simplejwt JWT authentication
drf-yasg Swagger/OpenAPI docs
django-cors-headers CORS handling
whitenoise Static file serving
gunicorn Production WSGI server
psycopg[binary] PostgreSQL driver
django-tailwind-cli Tailwind CSS (optional)
django-htmx HTMX (optional)
django-vite Vite bundler (optional)

API Endpoints

Endpoint Description
/admin/ Django admin
/token/ Obtain JWT pair
/token/refresh/ Refresh access token
/docs/ Swagger UI
/schema/ ReDoc

Contributing

Contributions are welcome. Open an issue or submit a PR.

  1. Fork the repo
  2. Create a feature branch (git checkout -b feature/whatever)
  3. Make your changes and run just test
  4. Submit a pull request

Match the existing code style - ruff linting and formatting are enforced.

License

MIT © Sankalp Tharu

Metadata

Release files for djinitx 0.3.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for djinitx 0.3.8
File Size Uploaded
djinitx-0.3.8.tar.gz 63.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for djinitx 0.3.8
File Interpreter ABI Platform
djinitx-0.3.8-py3-none-any.whl Python 3 none any Details

Total release size: 128.1 kB

Release files / djinitx-0.3.8.tar.gz

Download URL djinitx-0.3.8.tar.gz
Size 63.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8ce78be2d1d2823a3695a90036d56567cf28a8135fec6097f2a2f36f8df80926
BLAKE2b-256 checksum
How to use checksums
5e2fc7f91204cc52f530b365c86ade61bf03b127f29ac1e4f3d9eca86e5fa083
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / djinitx-0.3.8-py3-none-any.whl

Download URL djinitx-0.3.8-py3-none-any.whl
Size 64.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f077268133a40bbe518615e495de4caff2adc0fb4daf6069c142f34050181ae6
BLAKE2b-256 checksum
How to use checksums
4f8e9f3c6c8b89bb1fac98c49c9abdd9e326e016880e93ea19f8c6184888654d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.14

Release history Release notifications | RSS feed

This release

0.3.8 This release

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page