Skip to main content

django-include-apps

PyPI version Python Versions Django Versions License: MIT Downloads Downloads/Month Code style: black Maintained

A powerful CLI tool to intelligently manage Django apps in your INSTALLED_APPS setting. Install, add, remove, and maintain Django packages with smart package mapping and automatic requirements.txt management.

Features

  • Smart Package Mapping — 85+ pre-configured mappings (e.g., djangorestframework → rest_framework)
  • Extended Configs — Auto-apply middleware, settings, URL patterns, and imports per package
  • Auto Migrations — Prompt to run python manage.py migrate when adding/removing packages that need it
  • Version Specifiers — Install exact versions (djangorestframework==3.14.0, django-filter>=2.0)
  • Unused App Detection — Scan your project and remove apps not imported anywhere
  • requirements.txt Sync — Automatically add, update, and remove packages
  • Backup & Rollback — Auto-backup settings.py with one-command restore
  • Security — Move secrets to .env with secure-settings
  • Health Checks — Run doctor to audit your configuration
  • Interactive Prompts — Confirmations, multi-select, and skip options throughout
  • Shell Completion — Tab-completion for bash, zsh, and fish

Installation

pip install django-include-apps

Quick Start

Add a Package

django-include-apps add-app djangorestframework
 IMPORTANT: Configurations applied are based on the latest package documentation.

✅ djangorestframework installed via pip
✅ Added 'rest_framework' to INSTALLED_APPS

Configuration for: djangorestframework
  • URL Pattern: path('api-auth/', include('rest_framework.urls', namespace='rest_framework'))
  • Settings:
      REST_FRAMEWORK = {
          "DEFAULT_PERMISSION_CLASSES": ["rest_framework.permissions.IsAuthenticated"],
          "DEFAULT_PAGINATION_CLASS": "rest_framework.pagination.PageNumberPagination",
          "PAGE_SIZE": 10,
          ...
      }

? Found additional configuration for package 'djangorestframework' (Space to toggle):
  [x] URL Patterns
  [x] Required Settings
? Proceed? Yes, apply changes

✅ Added URL pattern 'api-auth/'
✅ Added REST_FRAMEWORK settings
✅ Added djangorestframework==3.15.2 to requirements.txt

Add Multiple Packages

django-include-apps add-app djangorestframework django-cors-headers django-filter

Remove an App

# Remove a specific app
django-include-apps remove-app rest_framework

# Or scan for unused apps (interactive)
django-include-apps remove-app

Install from requirements.txt

django-include-apps install-requirements -r requirements.txt

Installs all packages, detects Django-related ones, and offers to add them to INSTALLED_APPS with extended configuration.

Custom Project Directory

django-include-apps add-app djangorestframework -d /path/to/django/project

All commands accept --start-dir / -d to target a specific project.

Commands Overview

Command Description
add-app Add one or more apps to INSTALLED_APPS
remove-app Remove apps or scan for unused ones
install-requirements Install from requirements.txt and configure apps
status Show project configuration overview
doctor Run health checks on your project
show-config Display extended config for a package
view-mappings Browse all 85+ package mappings
diff Preview changes before applying (dry run)
sync Compare INSTALLED_APPS ↔ requirements.txt
update-configs Check for updated package configurations
graph Visualize package dependencies
profile Save/apply/export configuration profiles
init-env Create a virtual environment
secure-settings Move secrets to .env
rollback Restore settings.py from backup
setup-hooks Set up pre-commit hooks
docker-init Generate Docker configuration
tutorial Interactive learning guide
completion Shell auto-completion setup
mapping Manage custom package mappings

📖 Full Command Reference → — Every command with all flags, variants, and sample output.

Supported Packages

85+ pre-configured Django packages with smart mapping:

Package INSTALLED_APPS Name
djangorestframework rest_framework
django-cors-headers corsheaders
django-filter django_filters
django-allauth allauth
django-debug-toolbar debug_toolbar
django-crispy-forms crispy_forms
django-extensions django_extensions
channels channels
celery celery
django-storages storages

Note: Packages like pillow, psycopg2, gunicorn, and mysqlclient are dependency-only and aren't added to INSTALLED_APPS.

Disclaimer on configurations: The automatic configuration settings provided by django-include-apps (for MIDDLEWARE, urls.py, etc.) are based on the standard and latest documentation of the respective packages at the time of mapping.

Use django-include-apps view-mappings to see the complete list. Unmapped packages are handled interactively with an option to save for future use.

Protected Django Apps

Core Django apps (django.contrib.*) are automatically protected from removal:

admin · auth · contenttypes · sessions · messages · staticfiles

Requirements

  • Python 3.8+
  • Django project with settings.py
  • Virtual environment (recommended)

Example Project

A ready-to-use demo project is included to try every command hands-on:

cd django-include-apps/examples/demo_project
django-include-apps add-app djangorestframework
django-include-apps status

📂 See the demo project →

Contributing

Contributions are welcome! To add a new package mapping:

  1. Fork the repository
  2. Add the mapping to package_configs.json
  3. Submit a pull request

Have a feature idea? Open an issue.

License

MIT License — see LICENSE for details.

Author

ROHAN — GitHub · Email

Contributors

  • Rohan Shirude — remove-app functionality and feature enhancements

Links

Metadata

Release files for django-include-apps 1.1.2

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

Source distribution (sdist)

Source distribution for django-include-apps 1.1.2
File Size Uploaded Provenance Actions
django_include_apps-1.1.2.tar.gz 48.0 kB Without provenance Details for django_include_apps-1.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-include-apps 1.1.2
File Interpreter ABI Platform Actions
django_include_apps-1.1.2-py3-none-any.whl Python 3 none any Details for django_include_apps-1.1.2-py3-none-any.whl

Total release size: 93.6 kB

Release files / django_include_apps-1.1.2.tar.gz

Download URL django_include_apps-1.1.2.tar.gz
Size 48.0 kB
Tags Source
SHA-256 checksum
How to use checksums
10c6d741c3c483beeb09760abca8ef4dd4f25264e3de5564cb135a87d9a84895
BLAKE2b-256 checksum
How to use checksums
5f01a8c2d10febcc55906e14b54704408229cbf97fbb6ef002e6f1958a710dd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.0

Release files / django_include_apps-1.1.2-py3-none-any.whl

Download URL django_include_apps-1.1.2-py3-none-any.whl
Size 45.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c5384b935fa1e9e0de5bb8ddd3ddf031b787e52421e88183bfaf4ff3a2cc2b88
BLAKE2b-256 checksum
How to use checksums
45394b2cb1fd64b97fa374cb5265ced2aac97df60f14062e16d65588ef498032
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.0

Security for django-include-apps 1.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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