Query Parameter in REST API: GET Request with Python Flask

Introduction We will create an example on how to use query parameter in REST API GET request with Python Flask. HTTP GET method is used to fetch data from the server. So here we will use GET method to fetch data from server and send to the client. Query parameter is used with GET method to fetch data from server based on such query parameter’s value. Actually when you need to search or filter data from server side instead of fetching all data then you can use such query parameter.

Continue

Show Data on Google Pie Chart using Python Flask

Introduction We will show data on Google pie chart using Python Flask API. We will show some static data on Google chart API using Flask web application. The data are built in a dictionary format using Python API and we display data on chart by rendering the Flask template. Pie charts are generally used to show percentage or proportional data and usually the percentage represented by each category is provided next to the corresponding slice of pie.

Continue

Python Flask username availability check with MySQL, AJAX

Introduction This tutorial shows an example on Python Flask username availability check with MySQL, AJAX. Sometimes we need to check username availability instantly before a user submits the form after filling a lengthy signup form. In this case we can use AJAX with any technologies like PHP, Codeigniter, Servlet, Struts, JSF, Spring etc. for checking whether the input username is available or already occupied by someone else. So if we give instant result to the user for username availability then sometimes it makes more sensible than while pressing the submit…

Continue

Python Flask Multi-step Registration form with MySQL, jQuery

Introduction We will see an example on Python Flask multi-step registration form with MySQL, jQuery. Sometimes we need to capture lots of user details during registration process and as a result we got long forms on web page. So the best solution is to break the form into smaller logical section and present it into a multi step registration form. This type of multi-step registration form always improves usability on web page comparing to very long form. You may also like to read Multi-step registration form using Codeigniter, MySQL and…

Continue

Session Management in Python, Flask

Introduction We will see here how to do session management in Python Flask. Session management in Python flask generally involves starting session, removing item from session, clearing item from session, updating item in session. We will see in subsequent sections later how to put value or an item into session, updating value in session, clearing session completely, removing value from session and removing a dictionary items from session.

Continue

Flash Message Management in Python, Flask

Introduction We will see here how to do flash message management using Python, Flask. Ideally almost every application needs to provide some meaningful message to end user after some activities performed by end users. Such activities may be registration on a site, login, payment, etc. So after each operation whether success or failure most of the time we need to provide meaningful message so that end user will understand what happens or what would be the next step.

Continue

Installing pip with embeddable zip Python in Windows

Introduction In this post we will see how to install pip with embeddable zip Python in Windows operating system. In my previous tutorial we have seen how to install embeddable zip Python in Windows operating system. We will refer to my previous tutorial as a Python installation prerequisite before we go further down to the details. Why do we need pip? Pip is the package installer for Python. By default Python provides core packages for writing Python programs but there are lots of other packages or modules which need to…

Continue

Angular + Python Flask REST API MongoDB CRUD Example

Introduction In this post we will see Angualr + Python Flask REST API MongoDB CRUD Example. We will use our existing tutorial on Python Flask REST API MongoDB CRUD Example for server side and we will introduce Angular on UI or front end side. You can also use any UI technologies, such as React JS, HTML, JavaScript, jQuery etc., for front end to suit your requirements.

Continue