Skip to main content

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

This version
History Node

1.0.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
pakk_flask-1.0.0-py3-none-any.whl (2.2 kB) Copy SHA256 hash SHA256 Wheel py3 Sep 7, 2018
pakk_flask-1.0.0.tar.gz (1.8 kB) Copy SHA256 hash SHA256 Source None Sep 7, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page