django-click
Build Django management commands using the click CLI package.
What it is and what it does
django-click is a thin adapter layer that lets you write Django management commands using click's decorator-based syntax instead of Django's traditional class-based command structure. It handles the integration so your command functions work seamlessly within Django's management system.
The package is useful when you prefer click's simpler, more functional approach to CLI building. Instead of subclassing Django's Command class and defining arguments and options through class attributes, you decorate a function with @click.command() and @click.argument() or @click.option(). It supports Django 4.2, 5.2, and 6.0 across Python 3.10 through 3.14.
Use it for:
- Build Django admin scripts with click's cleaner decorator syntax instead of Django's class-based command pattern.
- Add colored output and formatted help text to management commands using click's built-in utilities.
- Create complex multi-level command hierarchies with click's group and subcommand decorators.
- Write management commands that share code with standalone click applications.
- Simplify migration of existing click CLI tools into Django projects.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Wraps the click command-line library to let you write Django management commands using click's decorator syntax instead of Django's class-based approach.
Yes. Low install friction, active maintenance, permissive MIT license, no known vulnerabilities, and a straightforward single dependency on click make this a safe choice. Install it if you prefer click's functional decorator style for Django management commands; skip it if you're comfortable with Django's class-based command API.
Install
django-click on PyPI
pip
pip install django-clickuv
uv add django-clickpoetry
poetry add django-clickInstalling django-click
Before you install
Low install friction with a single runtime dependency on click. Active maintenance with a recent release in January 2026 and last commit in August 2026; part of Django Commons and maintained by established contributors.
License in practice
MIT license permits unrestricted use, modification, and distribution in both open-source and proprietary projects.
Quickstart
pip install django-click
# In /management/commands/helloworld.py:
import click
@click.command()
@click.argument('name')
def command(name):
click.secho(f'Hello, {name}', fg='red')
# Then run: ./manage.py helloworld django-click
Requires Python 3.10+; Django 5.2 and above require Python 3.10+, Django 6.0 requires Python 3.12+.
Verify before relying
- Whether the package provides an alias import (djclick) or uses click directly in management commands.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — click |
| Maintenance | actively maintained — 216 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 114,026/month — #12,316 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_click-2.5.0-py3-none-any.whl
Tags
More Application Frameworks packages
FastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
textualTextual is a Python framework for building…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
mcpBuild and connect to Model Context Protocol…
permissive · top 1,000 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
django-upgradeAutomatically modernizes Django project code by…
permissive · top 15,000 on PyPI
django-lifecycleAdds declarative lifecycle hooks to Django…
permissive · top 15,000 on PyPI
django-richIntegrates Rich's terminal formatting and…
permissive · top 15,000 on PyPI
django-modeltreeProvides a simplified interface for navigating…
permissive · top 15,000 on PyPI
click-config-fileAdds configuration file support to Click…
permissive · top 15,000 on PyPI
django-cookie-consentA Django application that manages cookie…
permissive · top 15,000 on PyPI
django-tasks-dbA Django Tasks backend that stores and executes…
permissive · top 15,000 on PyPI
django-pgactivityProvides Django management commands and…
permissive · top 5,000 on PyPI
md-click-2Generates markdown documentation files…
permissive · top 15,000 on PyPI
cloupCloup extends Click with option groups,…
permissive · top 5,000 on PyPI