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.

Figure 2: Flask keeps to the bare necessities: WSGI, routing, and templates. Other functions are provided by extensions.

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs



Support Our Work

ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.

Learn More”>
	</a>

<hr>		    
			</div>
		    		</div>

		<div class=