Skip to main content

Serve production static files with Flask. A Flask version of DJ-Static.

Usage

$ pip install fl-static

Configure your static assets in:

from flask import Flask

app = Flask(__name__)
app.config.update(
    STATIC_ROOT='static',
    STATIC_URL='/static',
)

Then, use the Cling middleware:

from fl_static import Cling
app = Cling(app)

You can use Werkzeug’s local development server:

app.run()

Jinja2 Magic

fl_static.Jinja2Magic extends static.StringMagic providing Jinja2 template support.

You can see it in action in example.py.

License

http://marksteve.mit-license.org

Metadata

Release files for fl-static 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fl-static 0.0.2
File Size Uploaded
fl-static-0.0.2.tar.gz 2.1 kB Details

Release files / fl-static-0.0.2.tar.gz

Download URL fl-static-0.0.2.tar.gz
Size 2.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5f5eda81c175180cf9bdb5cf244f21ed7c7e74f7204e281f0d3222e5fe04efc2
BLAKE2b-256 checksum
How to use checksums
3af0b6a5120521f25b51d1690b318c3f811f915214f4ddeacb1a086fe681ad07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.2 This release

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page