Utilities for working with pakk files in a flask web application.
Project description
pakk flask
Utilities for working with pakk files in a flask web application.
Getting Started
Install pakk and pakk_flask:
$ python3 -m pip install pakk pakk_flask
Then you can use pakk_flask to send pakked assets as static files in a flask web application:
from pakk_flask import send_from_directory
@APP.route("/static/<path:path>")
def get_static_file(path):
with open("./files.pakk", "rb") as in_file:
unpakked = unpakk(KEY, in_file)
if unpakked.has_blob(path):
return send_from_directory(unpakked, path)
else:
return send_from_directory("./static", path)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pakk_flask-1.0.0.tar.gz
(1.8 kB
view hashes)
Built Distribution
Close
Hashes for pakk_flask-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bedc4d242d165d2cf36e87d8a2dc9598327ad3e316763b21895fe962d20e4a7a |
|
MD5 | 27dbd58532785028aef3fbe2c94a2b86 |
|
BLAKE2b-256 | 113b38222570f8b1ee6a62f4e1f094fbf6e55af2993534802346184bef0aaa6e |