Recommended install with all features (Redis cache + S3 storage + SVG if py3.4+):
pip install flask-resize[full]
# File-based storage only pip install flask-resize # With S3 storage support pip install flask-resize[s3] # With Redis caching pip install flask-resize[redis] # With SVG source file support (only available with py3.4+) pip install flask-resize[svg] # Or any combination of above. E.g: pip install flask-resize[s3,redis]
pip install -e git+https://github.com/jmagnusson/flask-resize@master#egg=Flask-Resize
Tested with Python 2.7/3.4/3.5/3.6/pypy and latest version of Flask.
Should work well on most Linux and MacOS versions.
Windows is supported on paper with the full test suite running smoothly, but the package needs some real world usage on Windows though. Please report any issues you might find to the Github issues page. Any feedback is welcome! 😊
Running the tests¶
git clone https://github.com/jmagnusson/Flask-Resize.git cd Flask-Resize pip install tox tox
You can also run the tests inside docker:
docker-compose --build up
Or to run a single python version’s tests:
docker-compose run py36
Note that the tests in docker are run with all dependencies installed. See docker-compose.yml for more info.
Generating the docs¶
git clone https://github.com/jmagnusson/Flask-Resize.git cd Flask-Resize pip install -r requirements_docs.txt python manage.py docs clean build serve
Now you should be able to view the docs @ localhost:8000.
Fork the code on the Github project page then:
git clone firstname.lastname@example.org:YOUR_USERNAME/Flask-Resize.git cd Flask-Resize pip install '.[full,test,test_s3]' -r requirements_docs.txt git checkout -b my-fix # Create your fix and add any tests if deemed necessary. # Run the test suite to make sure everything works smooth. py.test git commit -am 'My fix!' git push
Now you should see a box on the project page with which you can create a pull request.