skillfed

django-pipeline

Pipeline is an asset packaging library for Django.

django-pipeline v4.1.0 252.0K downloads/30d#8,560 on PyPI1,541
Permissive license MIT Active released

What it is and what it does

django-pipeline is a Django middleware that automates the bundling and compression of CSS and JavaScript static files. It reads source files from your STATICFILES_DIRS, concatenates them according to configuration, compresses them using external tools you specify, and outputs optimized bundles to STATIC_ROOT during the collectstatic command. The package integrates with Django's static files system via custom finders and storage backends, and includes template tags to reference the processed bundles in your HTML.

The package has been in production use since 2011 and supports modern Django versions (4.0 through 5.2) and Python 3.9+. It requires you to install and configure external compressors (such as yuglify) separately, typically via NPM, and works only when DEBUG is False in production. It's designed for projects that need straightforward asset concatenation and compression without adopting a full JavaScript build tool ecosystem.

Use it for:

  • Reduce HTTP requests and bandwidth by merging multiple CSS files into a single stylesheet and multiple JavaScript files into a single bundle.
  • Automatically minify and compress static assets as part of the Django deployment pipeline without external build tools.
  • Embed images and fonts as data URIs to reduce additional HTTP requests for small static resources.
  • Manage asset versioning and cache-busting through Django's manifest storage system.
  • Organize large static file directories into logical groups (e.g., admin CSS, frontend JS) with separate output bundles.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

django-pipeline bundles and compresses CSS and JavaScript assets in Django projects, concatenating multiple files into optimized outputs during the collectstatic command.

Yes. django-pipeline is a stable, actively maintained asset packaging solution for Django projects that need CSS and JavaScript bundling without adopting a separate JavaScript build tool. It has low install friction, no security vulnerabilities, and a permissive MIT license. Install it if your project uses Django's static files system and you want straightforward concatenation and compression; skip it if you're already using webpack, esbuild, or another modern frontend bundler.

Install

django-pipeline on PyPI

pip

pip install django-pipeline

uv

uv add django-pipeline

poetry

poetry add django-pipeline

Installing django-pipeline

Before you install

Low install friction with only setuptools and wheel as runtime dependencies. Actively maintained with recent commits and no known vulnerabilities.

License in practice

MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute django-pipeline freely provided you include the license notice.

Quickstart

pip install django-pipeline

# settings.py
INSTALLED_APPS = ['pipeline', ...]
STATICFILES_STORAGE = 'pipeline.storage.PipelineManifestStorage'
STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
    'pipeline.finders.PipelineFinder',
)

PIPELINE = {
    'STYLESHEETS': {'css_files': {'source_filenames': ('css/main.css',), 'output_filename': 'css/styles.css'}},
    'JAVASCRIPT': {'js_files': {'source_filenames': ('js/app.js',), 'output_filename': 'js/main.js'}}
}

External compressors (e.g., yuglify) must be installed separately via NPM or your system package manager and configured in PIPELINE settings; Pipeline only processes assets when DEBUG is False.

Verify before relying

  • Whether django-pipeline supports modern frontend tooling (webpack, esbuild, Vite) or is primarily for legacy asset workflows.
  • Performance characteristics when handling large numbers of static files or very large individual assets.
  • Whether data-URI embedding for images and fonts is still actively used or maintained.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 2 — setuptools, wheel
Maintenance actively maintained — 335 days since the last release
Last repo commit
First released
Downloads 252,023/month — #8,560 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: django_pipeline-4.1.0-py3-none-any.whl

Keywords: django, pipeline, asset, compiling, concatenation, compression, packaging

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 4.0Framework :: Django :: 4.1Framework :: Django :: 4.2Framework :: Django :: 5.0Framework :: Django :: 5.1Framework :: Django :: 5.2Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: PyPyTopic :: Internet :: WWW/HTTPTopic :: Internet :: WWW/HTTP :: Dynamic ContentTopic :: Software Development :: Libraries :: Python ModulesTopic :: Utilities

Tags

django asset pipelinecss javascript bundling djangostatic file compression djangoasset concatenation djangodjango static files optimizationcss js minification djangodjango asset packaging
django-static-filesasset-bundlingcss-js-compression

More Python Modules packages