Flask-Collect -- Collect static files in Flask application
Project description
Home-page: http://github.com/klen/Flask-Collect
Author: Kirill Klenov
Author-email: horneds@gmail.com
License: BSD
Description: Flask-Collect
#############
.. _description:
**Flask-Collect** is an extension for Flask that helps collecting static files.
Serving static files with *Flask* -- bad idea for production, this tool will
help you collect them in one command. It checks application and blueprints for
static files and copy them to specific folder (saves related paths).
.. _badges:
.. image:: http://img.shields.io/travis/klen/Flask-Collect.svg?style=flat-square
:target: http://travis-ci.org/klen/Flask-Collect
:alt: Build Status
.. image:: http://img.shields.io/coveralls/klen/Flask-Collect.svg?style=flat-square
:target: https://coveralls.io/r/klen/Flask-Collect
:alt: Coverals
.. image:: http://img.shields.io/pypi/v/flask-collect.svg?style=flat-square
:target: https://pypi.python.org/pypi/flask-collect
:alt: Version
.. image:: http://img.shields.io/pypi/dm/flask-collect.svg?style=flat-square
:target: https://pypi.python.org/pypi/flask-collect
:alt: Downloads
.. _documentation:
**Docs are available at** http://flask-collect.readthedocs.org/. **Pull
requests with documentation enhancements and/or fixes are awesome and most
welcome.**
.. _contents:
.. contents::
.. _requirements:
Requirements
=============
- python (2.6, 2.7, 3.3)
- Flask_ >= 0.10.1
.. _installation:
Installation
============
**Flask-Collect** should be installed using pip: ::
pip install Flask-Collect
.. _setup:
Setup
=====
Flask-Collect settings (default values): ::
# Target static dir
COLLECT_STATIC_ROOT = <APP.ROOT_PATH>/static
COLLECT_STORAGE = 'flask_collect.storage.file'
Initialize Flask-Collect extension: ::
from flask_collect import Collect
...
collect = Collect()
collect.init_app(app)
If you use Flask-Script_, activate Flask-Collect commands: ::
from flask_collect import Collect
...
manager = Manager()
...
collect = Collect()
collect.init_app(app)
collect.init_script(manager)
If you configure Flask via a factory function::
from flask_collect import Collect
...
def create_app():
app = Flask()
...
collect = Collect()
collect.init_app(app)
return app
.. _usage:
Use Flask-Collect
=================
From any python script: ::
collect.collect(verbose=True)
with Flask-Script_: ::
$ ./manage.py collect
with Flask>=0.11: ::
$ flask collect
.. _bugtracker:
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
.. _contributing:
Contributors
============
Maintainer: Kirill Klenov (horneds@gmail.com)
Also see the `CONTRIBUTORS.rst
<https://github.com/klen/Flask-Collect/blob/develop/CONTRIBUTORS.rst>`_
file.
Contributing
============
Development of flask-collect happens at github:
https://github.com/klen/Flask-Collect
.. _license:
License
=======
Licensed under a `BSD license`_.
.. _links:
.. _BSD license: http://www.linfo.org/bsdlicense.html
.. _klen: http://klen.github.com/
.. _SQLAlchemy: http://www.sqlalchemy.org/
.. _Flask: http://flask.pocoo.org/
.. _Flask-Script: http://github.com/rduplain/flask-script
Keywords: flask,static,deploy
Platform: Any
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Natural Language :: Russian
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Author: Kirill Klenov
Author-email: horneds@gmail.com
License: BSD
Description: Flask-Collect
#############
.. _description:
**Flask-Collect** is an extension for Flask that helps collecting static files.
Serving static files with *Flask* -- bad idea for production, this tool will
help you collect them in one command. It checks application and blueprints for
static files and copy them to specific folder (saves related paths).
.. _badges:
.. image:: http://img.shields.io/travis/klen/Flask-Collect.svg?style=flat-square
:target: http://travis-ci.org/klen/Flask-Collect
:alt: Build Status
.. image:: http://img.shields.io/coveralls/klen/Flask-Collect.svg?style=flat-square
:target: https://coveralls.io/r/klen/Flask-Collect
:alt: Coverals
.. image:: http://img.shields.io/pypi/v/flask-collect.svg?style=flat-square
:target: https://pypi.python.org/pypi/flask-collect
:alt: Version
.. image:: http://img.shields.io/pypi/dm/flask-collect.svg?style=flat-square
:target: https://pypi.python.org/pypi/flask-collect
:alt: Downloads
.. _documentation:
**Docs are available at** http://flask-collect.readthedocs.org/. **Pull
requests with documentation enhancements and/or fixes are awesome and most
welcome.**
.. _contents:
.. contents::
.. _requirements:
Requirements
=============
- python (2.6, 2.7, 3.3)
- Flask_ >= 0.10.1
.. _installation:
Installation
============
**Flask-Collect** should be installed using pip: ::
pip install Flask-Collect
.. _setup:
Setup
=====
Flask-Collect settings (default values): ::
# Target static dir
COLLECT_STATIC_ROOT = <APP.ROOT_PATH>/static
COLLECT_STORAGE = 'flask_collect.storage.file'
Initialize Flask-Collect extension: ::
from flask_collect import Collect
...
collect = Collect()
collect.init_app(app)
If you use Flask-Script_, activate Flask-Collect commands: ::
from flask_collect import Collect
...
manager = Manager()
...
collect = Collect()
collect.init_app(app)
collect.init_script(manager)
If you configure Flask via a factory function::
from flask_collect import Collect
...
def create_app():
app = Flask()
...
collect = Collect()
collect.init_app(app)
return app
.. _usage:
Use Flask-Collect
=================
From any python script: ::
collect.collect(verbose=True)
with Flask-Script_: ::
$ ./manage.py collect
with Flask>=0.11: ::
$ flask collect
.. _bugtracker:
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
.. _contributing:
Contributors
============
Maintainer: Kirill Klenov (horneds@gmail.com)
Also see the `CONTRIBUTORS.rst
<https://github.com/klen/Flask-Collect/blob/develop/CONTRIBUTORS.rst>`_
file.
Contributing
============
Development of flask-collect happens at github:
https://github.com/klen/Flask-Collect
.. _license:
License
=======
Licensed under a `BSD license`_.
.. _links:
.. _BSD license: http://www.linfo.org/bsdlicense.html
.. _klen: http://klen.github.com/
.. _SQLAlchemy: http://www.sqlalchemy.org/
.. _Flask: http://flask.pocoo.org/
.. _Flask-Script: http://github.com/rduplain/flask-script
Keywords: flask,static,deploy
Platform: Any
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Natural Language :: Russian
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
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
Flask-Collect-1.3.0.tar.gz
(8.0 kB
view details)
Built Distribution
File details
Details for the file Flask-Collect-1.3.0.tar.gz
.
File metadata
- Download URL: Flask-Collect-1.3.0.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96188c57bd9cbfca219dd4b6b2311055666d2c6fdafb8635b7afe757e6ab320a |
|
MD5 | c6480975f73c3c6c38ff3bd042929a5c |
|
BLAKE2b-256 | 6e2a7a6fcebb86ff1b046a175429bf1c71137169f1c99095e22a9584069e2fb1 |
File details
Details for the file Flask_Collect-1.3.0-py2.py3-none-any.whl
.
File metadata
- Download URL: Flask_Collect-1.3.0-py2.py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f7d44748ff2f54f92c8fd22ea54752116f81dc86c7ae4fe8db54bc6778f0be4 |
|
MD5 | c2b07a5d092cd8ab2270350716a1b5d9 |
|
BLAKE2b-256 | 94ed0f5d6b0de8bfe02d6f8f94fd8ee48350580a1574cf2048c494be8909445d |