Python Web Applications: Deploy Your Script as a Flask App

You wrote a Python script that you’re proud of, and now you want to show it off to the world. But how? Most people won’t know what to do with your .py file. Converting your script into a Python web application is a great solution to make your code usable for a broad audience. In this tutorial, you’ll learn how to go from a local Python script to a fully deployed Flask web application that you can share with the […]

Read more

Python Microservices With gRPC

Microservices are a way to organize complex software systems. Instead of putting all your code into one app, you break your app into microservices that are deployed independently and communicate with each other. This tutorial teaches you how to get up and running with Python microservices using gRPC, one of the most popular frameworks. Implementing a microservices framework well is important. When you’re building a framework to support critical applications, you must ensure it’s robust and developer-friendly. In this tutorial, […]

Read more

Guide to Flask-MongoEngine in Python

Introduction Building a web app almost always means dealing with data from a database. There are various databases to choose from, depending on your preference. In this guide, we shall be taking a look at how to integrate one of the most popular NoSQL databases – MongoDB – with the Flask micro-framework. In this guide, we’ll be exploring how to integrate MongoDB with Flask using a popular library – MongoEngine, and more specifically, its wrapper – Flask-MongoEngine. Alternatively, you can […]

Read more

Integrating MongoDB with Flask Using Flask-PyMongo

Introduction Building a web app almost always means dealing with data from a database. There are various databases to choose from, depending on your preference. In this article, we shall be taking a look at how to integrate one of the most popular NoSQL databases – MongoDB – with the Flask micro-framework. They are several Flask extensions for integrating MongoDB, here we’ll be using the Flask-PyMongo extension. We will also be working on a simple Todo-List API to explore the […]

Read more

Flask Form Validation with Flask-WTF

Introduction Form validation is one of the most essential components of data entry in web applications. Users can make mistakes, some users are malicious. With input validation, we protect our app from bad data that affects business logic and malicious input meant to harm our systems Trying to process unvalidated user inputs can cause unexpected/unhandled bugs, if not a server crash. In this context, validating data means verifying input and checking if it meets certain expectations or criteria(s). Data validation […]

Read more

Building a Todo App with Flask in Python

Introduction In this tutorial, we are going to build an API, or a web service, for a todo app. The API service will be implemented using a REST-based architecture. Our app will have the following main features: Create an item in the todo list Read the complete todo list Update the items with status as “Not Started”, “In Progress”, or “Complete” Delete the items from the list What is REST? REST, or REpresentational State Transfer, is an architectural style for […]

Read more

Deploying a Flask Application to Heroku

Introduction In this tutorial you will learn how to deploy a Flask application to Heroku. The app can be as simple as a “Hello World” app to a social media monitoring platform! Nowadays there is no business that doesn’t have a web app to help it a reach greater audience, or maybe provide its services through an online portal. Today you are about to learn how to make an API using Flask as a case study for how to deploy […]

Read more

File Management with AWS S3, Python, and Flask

Introduction One of the key driving factors to technology growth is data. Data has become more important and crucial in the tools being built as technology advances. It has become the driving factor to technology growth, how to collect, store, secure, and distribute data. This data growth has led to an increase in the utilization of cloud architecture to store and manage data while minimizing the hassle required to maintain consistency and accuracy. As consumers of technology, we are generating […]

Read more

Asynchronous Tasks Using Flask, Redis, and Celery

Introduction As web applications evolve and their usage increases, the use-cases also diversify. We are now building and using websites for more complex tasks than ever before. Some of these tasks can be processed and feedback relayed to the users instantly, while others require further processing and relaying of results later. The increased adoption of internet access and internet-capable devices has led to increased end-user traffic. In a bid to handle increased traffic or increased complexity of functionality, sometimes we […]

Read more

Using SQLAlchemy with Flask and PostgreSQL

Introduction Databases are a crucial part of modern applications since they store the data used to power them. Generally, we use the Structured Query Language (SQL) to perform queries on the database and manipulate the data inside of it. Though initially done via dedicated SQL tools, we’ve quickly moved to using SQL from within applications to perform queries. Naturally, as time passed, Object Relational Mappers (ORMs) came to be – which enable us to safely, easily and conveniently connect to […]

Read more
1 2