Python for Finance: Analyze Big Financial Data

(Elle) #1

Rapid Web Applications


If the Python world were to be divided into continents, there might be, among others, the


science and finance content, the system administration continent, and for sure the web


development continent. Although not really transparent, it is highly probable that the web


development continent, to stay with this concept, might be one of the largest when it


comes to people (developers) populating it and houses (applications) built on it.


One of the major reasons for Python being strong in web development is the availability


of different high-level, full-stack frameworks. As the Python web page states:


A web application may use a combination of a base HTTP application server, a storage mechanism such as a

database, a template engine, a request dispatcher, an authentication module and an AJAX toolkit. These can be

individual components or be provided together in a high-level framework.

Among the most popular frameworks are:


Django

Flask

Pyramid/Pylons

TurboGears

Zope

It is safe to say that there is not a single framework that is best suited for everybody and


every different application type.


[ 56 ]

All have their strengths (and sometimes weaknesses),


and often it is more a matter of taste (regarding architecture, style, syntax, APIs, etc.) what


framework is chosen.


One framework that has recently gained popularity quite rapidly is Flask. It is the


framework we use here, mainly for the following reasons:


Pythonic


Application development with Flask is really Pythonic, with a lot of the web-related


details being taken care of behind the scenes.


Compactness


It is not too complex and can therefore be learned quite rapidly; it is based mainly on


standard components and libraries widely used elsewhere.


Documentation


It is well documented, with both an online HTML version and a PDF with around 300


pages available at the time of this writing.


[ 57 ]

The two main libraries that Flask relies on are:


Jinja2, a web templating language/engine for Python


Werkzeug, a WSGI (Web Server Gateway Interface) toolkit for Python


Traders’ Chat Room

Free download pdf