Skip to main content

Flask-Collect -- Collect static files in Flask application

Project description

Flack-Collect is simply application for collect static files in Flask project. Serve static files with Flask – bad idea for production, with this you will can collect them in one command.

This extension checks application blueprints for static files and copy it to specific folder (saves related paths).

Build Status Coverals Version Downloads Donate

Docs are available at http://flask-collect.readthedocs.org/. Pull requests with documentation enhancements and/or fixes are awesome and most welcome.

Requirements

  • python (2.6, 2.7, 3.3)

  • Flask >= 0.10.1

Installation

Flask-Collect should be installed using pip:

pip install Flask-Collect

Setup

Flask-Collect settings (default values):

# Target static dir
COLLECT_STATIC_ROOT = <APP.ROOT_PATH>/static
COLLECT_STORAGE = 'flask.ext.collect.storage.file'

Initialize Flask-Collect extenstion:

from flask.ext.collect import Collect

...

collect = Collect()
collect.init_app(app)

If you use Flask-Script, activate Flask-Collect commands:

from flask.ext.collect import Collect

...
manager = Manager()
...

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

Use Flask-Collect

You can run:

collect.collect(verbose=True)

or with command:

$ ./manage.py collect

Bug tracker

If you have any suggestions, bug reports or annoyances please report them to the issue tracker at https://github.com/klen/Flask-Collect/issues

Contributors

Maintainer: Kirill Klenov (horneds@gmail.com)

Also see the CONTRIBUTORS.rst file.

Contributing

Development of flask-collect happens at github: https://github.com/klen/Flask-Collect

License

Licensed under a BSD license.

Project details


Download files

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

Source Distribution

Flask-Collect-1.0.4.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

Flask_Collect-1.0.4-py2.py3-none-any.whl (9.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file Flask-Collect-1.0.4.tar.gz.

File metadata

File hashes

Hashes for Flask-Collect-1.0.4.tar.gz
Algorithm Hash digest
SHA256 e5aa53aa6e3f2fa431a2eed226ae0b433cbae66bfb5ea10c4e9a43ef46cebec8
MD5 5bc955b0944d24a5c9c3acbf1a4466b9
BLAKE2b-256 6590473e4a1d4b481843b45783a8247aef96e7f67f47ed2bfb11d462863818d9

See more details on using hashes here.

File details

Details for the file Flask_Collect-1.0.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for Flask_Collect-1.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f2a113aa12273273eabd639663f767bd34d1363746c6ca9d3f30dce5eef1f652
MD5 904c5a20f6818e46e3e1af1b35f713f4
BLAKE2b-256 a1e3a43b41556ee5b1c849ddcc8fc4ffff6c2726d030f280201957e03b342386

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page