Flask-Collect-Invenio
Flask-Collect-Invenio is a fork and drop-in replacement of the original Flask-Collect extension with adjustments to make it compatible with Flask 2.x.
Even though serving static files with Flask is a bad idea in a production environment, this tool will help you collect them in one command. It checks application and blueprints for static files and copies them to a specific folder (saves related paths).
Docs are available at http://flask-collect-invenio.readthedocs.org/. Pull requests with documentation enhancements and/or fixes are awesome and most welcome.
Requirements
Python 3.6+
Flask >= 0.10.1
Installation
Flask-Collect-Invenio should be installed using pip:
pip install Flask-Collect-Invenio
Setup
Flask-Collect-Invenio settings (default values):
# Target static dir COLLECT_STATIC_ROOT = <APP.ROOT_PATH>/static COLLECT_STORAGE = 'flask_collect.storage.file'
Initialize Flask-Collect-Invenio extension:
from flask_collect import Collect ... collect = Collect() collect.init_app(app)
If you use Flask-Script, activate Flask-Collect-Invenio 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
Use Flask-Collect-Invenio
From any python script:
collect.collect(verbose=True)
with Flask-Script:
$ ./manage.py collect
with Flask>=0.11:
$ flask collect
Bug tracker
If you have any suggestions, bug reports or annoyances please report them to the issue tracker at https://github.com/inveniosoftware/Flask-Collect-Invenio/issues
Contributors
Original Author: Kirill Klenov (horneds@gmail.com)
Also see the CONTRIBUTORS.rst file.
Contributing
Development of flask-collect-invenio happens at github: https://github.com/inveniosoftware/Flask-Collect-Invenio
License
Licensed under a BSD license.
Metadata
Release files for Flask-Collect-Invenio 1.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flask_collect_invenio-1.4.1.tar.gz | 6.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flask_collect_invenio-1.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.2 kB
Release files / flask_collect_invenio-1.4.1.tar.gz
| Download URL | flask_collect_invenio-1.4.1.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
caf1ac862828997487b2508f9ad17970fcbc33ab3d1799cb59f392102e907dc7
|
|
BLAKE2b-256 checksum How to use checksums |
439dfda8a9b590a779931b36b02ebed731831dc87db7078a1b51b7cf2b04d01b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Release files / flask_collect_invenio-1.4.1-py3-none-any.whl
| Download URL | flask_collect_invenio-1.4.1-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c289b4a8990e9f8e1356a3eeee13496883e5aa1ca616e126a7275dd9efdf1c97
|
|
BLAKE2b-256 checksum How to use checksums |
48138b9d7e28ac69e5346b57a301137e722054c8a9f535411f598333e510ad16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|