« Previous 1 2
Web applications with Flask
A Tasty Drop
Databases
Although Flask does not support a database internally, it has several extensions that let you store data permanently. Of course, you do not need a special Flask module for this; for example, you can access MySQL and PostgreSQL with standard Python modules in your own code. However, a couple of Flask extensions could make everything more convenient.
The most important module here is Flask-SQLAlchemy, which integrates one of the most common modules for cross-database, object-oriented database access (ORM) into Flask. More extensions are available for popular NoSQL databases such as CouchDB and MongoDB.
Conclusions
Flask is an interesting alternative to Django for any Python web developer who does not want or need to use the complete feature scope of the Django framework. The clean code and the good documentation take the pain out of the learning curve. Additionally, a pretty hard-working Flask community offers support if you have problems, and third-party extensions are available (Figure 2) [6]. It's just a pity that the program's developer, Armin Ronacher, can't spend as much time as he would like on maintaining the framework due to work obligations.
Infos
- Flask: http://flask.pocoo.org
- Werkzeug: http://werkzeug.pocoo.org
- WSGI: http://wsgi.readthedocs.org
- Virtualenv: http://www.virtualenv.org
- Sinatra: http://www.sinatrarb.com
- Flask extensions: http://flask.pocoo.org/extensions
« Previous 1 2