django-pipeline
Pipeline is an asset packaging library for Django.
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-pipelineuv
uv add django-pipelinepoetry
poetry add django-pipelineInstalling 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
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
django-compressorDjango Compressor combines, minifies, and…
permissive · top 5,000 on PyPI
django-npmdjango-npm integrates npm package management…
permissive · top 15,000 on PyPI
django-webpack-loaderIntegrates Webpack-compiled bundles into Django…
permissive · top 5,000 on PyPI
webassetsMerges and compresses JavaScript and CSS files…
permissive · top 15,000 on PyPI
django-js-assetAdds script, stylesheet, and JSON tags with…
permissive · top 5,000 on PyPI
django-libsassIntegrates Sass compilation into Django…
permissive · top 5,000 on PyPI
Flask-AssetsIntegrates asset management into Flask…
permissive · top 15,000 on PyPI
django-sass-processorCompiles SASS/SCSS files to CSS on the fly…
permissive · top 15,000 on PyPI
django-sriGenerates Subresource Integrity (SRI) hashes…
permissive · top 15,000 on PyPI
django-componentsdjango-components lets you build reusable,…
permissive · top 15,000 on PyPI