The most important phase in data analytics and data science journey is being able to deploy the models and end results in the production environment for easy access. There are many ways to deploy data projects on the web and one of them is to use web frameworks such as Flask or Django. In this Introduction to Flask post we are going to learn about Flask web framework and how it works. Flask is an open source and a great prototyping framework.
It is the framework of choice if you need to have control over your code. Flask is widely used in blackthorns and complex applications which gives you the flexibility of focusing on your creativity.
Deploying Data Visualization on the Web
Data visualizations are only useful if they can reach the target audience in a simple and effortless manner. The web is becoming a De facto way of access critical services and information. Deploying data projects on the web is one of the less discussed topic in the big data analytics process. Perhaps this is because of lack of clarity on how this important phase of data analytics is carried out.
In recent years there has been a rise of both commercial and open source tools that have made the deployment of data projects easy and painless. Some of the tools include Apache Superset, Anaconda Cloud, Flask, Django and Azure ML among others. In this post we are going to learn about one of the commonly used open source tool which is Flask to create a simple web application and render our data visualizations developed in matplotlib.
Introduction to Flask
Flask is a Python web framework that is based on the Werkzeug toolkit and Jinja2 templating engine. It is a micro web framework licensed under BSD licensing. Flask is one of the most popular Python web framework after Django. Among its features Flask has a development server and debugger, unit testing support, RESTful request dispatching, Jinja2 template engine, it is compatible with Google App Engine, open for other extensions to enhance many features. In addition Flask has extensive documentation and user community.
Flask is used by many applications and sites such as Pinterest, LinkedIn and Apache Superset among others. Flask is a micro-framework which means that there are few external libraries dependencies in Flask. This makes Flask a lightweight framework and few update on dependencies and security bugs. Additionally Flask scales well when the application grows. The downside of Flask is that sometimes you have to do a lot by yourself to accomplish some added functionalities.
Flask is a popular and open source micro-framework web based Python framework. Unlike other Python frameworks, Flask gives you the ability and control over your code since it has less dependencies. For developers who don’t have experience using web frameworks and prefer to write there own code then Flask is the tool to consider. Flask is widely used in both small and large scale web applications such as in production machine learning algorithms and data analytics.
In this post we have introduced ourselves to Flask and deploying data projects as web apps. In the next post we are going to learn how to install Flask.