API

This part of the documentation documents all the public classes and functions in Flask-Collect.

Configuration

class flask_collect.Collect(app=None)

Extension object for integration to one or more Flask applications.

Parameters:app – Flask application
app = Flask(__name__)
collect = Collect(app)

The second possibility is to create the object once and configure the application later to support it:

collect = Collect()
...
collect.init_app(app)
init_app(app)

Initialize an application for the use with this collect setup.

See Configuration.

Parameters:app – Flask application
init_script(manager)

Initialize collect scripts with Flask-Script manager instance.

Parameters:managerFlask-Script manager

This added manager collect command:

$ ./manage.py collect -h
usage: ./manage.py collect [-h] [-v]

Collect static from blueprints.

optional arguments:
-h, --help     show this help message and exit
-v, --verbose

Storage

class flask_collect.storage.base.BaseStorage(collect, verbose=False)

Base class for storages.

log(msg)

Log message.