Subscribe

Author: S2606

Flask is a microframework for Python, which is mostly used in web-backend development.There are projects in FOSSASIA that are using flask for development purposes such as Open Event Server, Query Server, Badgeyay. Optimization is indeed one of the most important steps for a successful software product. So, in this post some few off- the-hook tricks will be shown which will make your flask-app more fast and reliable.

3.That’s it! All it takes is just few lines of code to make your flask app optimized .To know more about the module check out flask-compress module.

Requirements Directory

A common practice amongst different FOSSASIA projects which involves dividing requirements.txt files for development,testing as well as production.

Basically when projects either use TRAVIS CI for testing or are deployed to Cloud Services like Heroku, there are some modules which are not really required at some places. For example: gunicorn is only required for deployment purposes and not for development.

So how about we have a separate directory wherein different .txt files are created for different purposes.

Below is the image of file directory structure followed for requirements in badgeyay project.

As you can see different .txt files are created for different purposes