skillfed

Flask-Assets

Asset management for Flask, to compress and merge CSS and Javascript files.

flask-assets v2.1.0 188.8K downloads/30d#9,937 on PyPI460
Permissive license BSD DORMANT released

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-assets

uv

uv add flask-assets

poetry

poetry add flask-assets

Installing 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

Environment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Topic :: Internet :: WWW/HTTP :: Dynamic ContentTopic :: Software Development :: Libraries :: Python Modules

Tags

flask css javascript minificationasset management flaskmerge compress css js flaskflask static file optimizationwebassets flask integration
asset-pipelinecss-js-optimization

More Python Modules packages