webassets
Media asset management for Python, with glue code for various web frameworks
What it is and what it does
Webassets is an asset management library for Python web applications that bundles, minifies, and compresses JavaScript and CSS files into optimized static assets. It depends on pyyaml and zope-dottedname and is designed to integrate with various Python web frameworks, reducing the size and number of HTTP requests for frontend resources.
The package is classified as Alpha and has been in development since 2010. It supports current Python versions (3.10+) and carries a permissive BSD license. The project remains active despite infrequent releases, with recent repository activity suggesting ongoing maintenance.
Use it for:
- Merge multiple JavaScript files into a single compressed bundle to reduce HTTP requests in production deployments.
- Automatically minify and compress CSS stylesheets as part of a web application build pipeline.
- Integrate asset management into a Python web framework to serve optimized static files with cache-busting filenames.
- Combine development-time asset organization with production-ready compression and versioning.
- Manage asset compilation workflows for projects using multiple JavaScript or CSS source files.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Merges and compresses JavaScript and CSS files for web applications, providing asset management with integration points for various Python web frameworks.
Yes, with conditions. Webassets is worth installing if you need straightforward asset bundling and compression in a Python web application and can tolerate the aging release cycle. The low install friction, permissive license, and active repository support its use. However, verify that its supported frameworks match your stack and that the infrequent release schedule aligns with your maintenance expectations.
Install
webassets on PyPI
pip
pip install webassetsuv
uv add webassetspoetry
poetry add webassetsInstalling webassets
Before you install
Low install friction with a pure-Python wheel. Maintenance status is aging—last release was 362 days ago—but the repository remains active with a recent commit on 2025-08-17 and no archived status, suggesting the project is maintained despite infrequent releases.
License in practice
BSD license is permissive, imposing no significant restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
pip install webassets
from webassets import Environment
env = Environment('.', url='/')
env.register('js_all', 'js/jquery.js', 'js/base.js', output='gen/packed.js')
Requires Python 3.10 or later. Development and testing of some filters (e.g., Google Closure) require Java 7 or later, though runtime use may not.
Verify before relying
- Whether the package works reliably with current versions of pyyaml and zope-dottedname without known incompatibilities.
- Whether the aging maintenance status indicates planned maintenance or de facto dormancy.
- What specific web frameworks are supported and whether that support is current.
Package facts
| License | BSD (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — pyyaml, zope-dottedname |
| Maintenance | aging — 362 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 298,753/month — #7,869 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: webassets-3.0.0-py3-none-any.whl
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
Flask-AssetsIntegrates asset management into Flask…
permissive · top 15,000 on PyPI
django-pipelinedjango-pipeline bundles and compresses CSS and…
permissive · top 15,000 on PyPI
django-compressorDjango Compressor combines, minifies, and…
permissive · top 5,000 on PyPI
csscompressorCompresses CSS by removing unnecessary…
permissive · top 5,000 on PyPI
cssminCompresses CSS files by removing unnecessary…
unclear · top 15,000 on PyPI
mkdocs-minify-pluginMinifies HTML, JavaScript, and CSS files in…
permissive · top 5,000 on PyPI
Flask-MinifyFlask extension that automatically minifies…
permissive · top 15,000 on PyPI
minify-htmlMinifies HTML, JavaScript, and CSS in a single…
permissive · top 5,000 on PyPI
django-libsassIntegrates Sass compilation into Django…
permissive · top 5,000 on PyPI
pytest-html-mergerMerges multiple pytest HTML reports generated…
unclear · top 15,000 on PyPI