Registry / web-framework / frozen-flask

frozen-flask

JSON →
library1.0.2pypypi✓ verified 92d ago

Freezes a Flask application into a set of static files. Version 1.0.2 is current (released 2024) and supports Python >=3.8 with Flask 2 and 3. The library follows a stable release cadence.

pip install frozen-flask
INSTALL
IMPORT
SIG · FROZEN-FLASK
F
frozen-flask
web-frameworkpythonv1.0.2
Install
2.2s avg
Import
461ms
Disk
21MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v1.0.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.478s · 22.5MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 2.2s · import 0.444s · 23MB
21MB installed
● package 21MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Freezer
✓ from flask_frozen import Freezer
✗ from frozen_flask import Freezer
The package name uses underscores, not hyphens.

Basic usage: create a Flask app, attach Freezer, and call freeze().

from flask import Flask from flask_frozen import Freezer app = Flask(__name__) @app.route('/') def index(): return 'Hello, world!' freezer = Freezer(app) if __name__ == '__main__': freezer.freeze()
Debug
Known issues
breakingVersion 1.0.0 dropped support for Python 2 and PyPy. Flask 2 and 3 only.
fix
Use Python >=3.8 and Flask >=2.
affects: >=1.0.0
deprecatedThe `FREEZER_DESTINATION` config option is deprecated in favor of `FREEZER_DESTINATION_DIR` in some docs; check your version.
fix
Use `FREEZER_DESTINATION_DIR` if using Frozen-Flask 1.x.
affects: <1.0
gotchaStatic files need to be included explicitly via the app's static folder or via `url_for('static', ...)` in your templates. Frozen-Flask only processes routes it discovers during crawling.
fix
Ensure all static assets are linked from pages that are discoverable by the freezer.
affects: all
gotchaThe freezer does not follow external links; if your app links to other sites, those won't be frozen.
fix
Use `@freezer.register_generator` to explicitly add URLs that are not discovered by crawling.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'flask_frozen'
Installed frozen-flask but imported with wrong name.
fix
Use 'from flask_frozen import Freezer'. Package name is frozen-flask, module is flask_frozen.
flask_frozen.FlaskFrozenError: No URLs found to freeze. Build will be empty.
No routes discovered because the app doesn't expose any URLs that can be reached via GET requests.
fix
Ensure you have at least one route decorated with @app.route and that the app is properly configured.
OSError: [Errno 2] No such file or directory: 'build/index.html'
The freezer tried to write a file but the build directory doesn't exist.
fix
Set FREEZER_DESTINATION_DIR to an existing directory or let the freezer create it (default is 'build').
Upgrade
Version history
1.0.2latest on PyPI · released Feb 9, 2024
Audit
Dependencies
FlaskrequiredCore dependency; version 2.x or 3.x supported.
MarkupSaferequiredTransitive dependency via Flask, used internally.
Agent activity
2 hits · last 30 days
node
2
Resources
frozen-flask — pip install frozen-flask · libregistry