Flask-Assets
Asset management for Flask, to compress and merge CSS and Javascript files.
What it is and what it does
Flask-Assets wraps the webassets library to handle CSS and JavaScript asset pipelines within Flask applications. It lets you define bundles of static files, apply filters (minification, compilation), and output optimized versions—reducing the number of HTTP requests and file sizes in production.
The package is straightforward: you create an Environment tied to your Flask app, define Bundles with source files and filters, and register them. It integrates cleanly with Flask's static file system. However, maintenance is dormant (last commit 2023-12-15), so it receives no active development; use it if your asset needs are stable and you don't require ongoing support.
Use it for:
- Minify and merge CSS/JavaScript files in a Flask app to reduce HTTP requests and bandwidth in production.
- Compile SASS or LESS stylesheets to CSS as part of the Flask request/build pipeline.
- Bundle multiple JavaScript files into a single compressed output for faster page loads.
- Manage asset versioning and cache-busting by automatically generating output filenames.
- Integrate asset processing into a Flask development workflow without external build tools.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Integrates asset management into Flask applications, providing merging, minifying, and compiling of CSS and JavaScript files through the webassets library.
Yes, if your Flask project has simple, stable asset needs and you are comfortable with dormant maintenance. The package is lightweight, permissive-licensed, and has no known vulnerabilities. If you require active support, modern tooling integration, or complex asset pipelines, consider a standalone build tool instead.
Install
flask-assets on PyPI
pip
pip install flask-assetsuv
uv add flask-assetspoetry
poetry add flask-assetsInstalling Flask-Assets
Before you install
Low install friction with only 2 runtime dependencies (Flask and webassets). Maintenance is dormant—last commit was 2023-12-15—so expect no active bug fixes or feature updates, though the repository remains publicly available.
License in practice
BSD license is permissive, allowing commercial and private use with minimal restrictions; you may use this package in most projects without licensing concerns.
Quickstart
pip install Flask-Assets
from flask import Flask
from flask_assets import Environment, Bundle
app = Flask(__name__)
assets = Environment(app)
css_all = Bundle('css/style.css', filters='cssmin', output='gen/packed.css')
assets.register('css_all', css_all)
Verify before relying
- Whether webassets itself is actively maintained or has known limitations with modern CSS/JS tooling
- Whether the package works with current Flask versions beyond what classifiers indicate
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — Flask, webassets |
| Maintenance | dormant — 1,027 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 188,829/month — #9,937 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: Flask_Assets-2.1.0-py3-none-any.whl
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
webassetsMerges and compresses JavaScript and CSS files…
permissive · top 15,000 on PyPI
Flask-MinifyFlask extension that automatically minifies…
permissive · top 15,000 on PyPI
django-compressorDjango Compressor combines, minifies, and…
permissive · top 5,000 on PyPI
django-pipelinedjango-pipeline bundles and compresses CSS and…
permissive · top 15,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
mkdocs-minify-pluginMinifies HTML, JavaScript, and CSS files in…
permissive · top 5,000 on PyPI
django-viteIntegrates Vite, a modern JavaScript build…
permissive · top 5,000 on PyPI
Frozen-FlaskConverts a Flask application into a directory…
permissive · top 15,000 on PyPI
litestar-htmxIntegrates HTMX into Litestar web applications,…
permissive · top 5,000 on PyPI