Systems | Development | Analytics | API | Testing

How to Use Redis with Python

When it comes to data-driven applications, developers and data engineers are always trying to balance factors such as scalability, speed, flexibility, latency, and availability. In other words, databases and infrastructure are the foundations for well-structured applications: just like bricks are for houses. This article explores Redis' data store features and includes use cases. We'll learn how to use Redis in Python with a step-by-step tutorial. Let's get started!

Deploy a Python Flask App to Render with Docker

In this tutorial, we will build a Flask app with Docker, create a background worker with Celery, and use RabbitMQ as the message broker between the two services. This (relatively) simple example will be used to demonstrate how Docker makes it easier to run multiple services and share configuration details between developers. In the last section, we will also build and optimize our app for deployment to Render, so we can avoid some of the common gotchas it is easy to fall victim to along the way!

What Is A Python Bytestring?

In the programming language, Python, binary data and text are often used when working with files, APIs, data encoding and decoding, and networking. In this article, we are going to answer some of the common questions that arise in this process. Some of which include what bytestrings are, how to convert strings to bytes and vice versa, their differences, and many more. This guide will cover all that is required for you to master bytestrings in Python.

How the Application and Request Contexts Work in Python Flask

If you have spent some time developing Flask applications, you have probably encountered terms like request, session, current_app, and g. You might even use them daily. But have you ever stopped to think about how Flask makes these seemingly global objects available exactly when you need them, especially in a multi-threaded web server environment? Well, the magic lies in Flask's context system. In this article, you will learn what contexts are in Flask and how to use them with practical examples.

How To Create A Pandas Pivot Table In Python

In today’s data-driven world, collecting data is easy, but making sense of it is what truly matters. That’s where Pandas pivot tables come into play. With just a few lines of Python, you can quickly turn disorganized data into meaningful, well-structured summaries. Imagine Excel pivot tables, but faster, more flexible, and fully powered by code.

How to Use MongoDB in Python Flask

When developing software applications, data storage is a key concern. The reality is that your first concern should be the data model you choose, which in turn affects how you store data. Generally speaking, this means deciding between SQL and NoSQL databases. In this article, you will learn how to use MongoDB, a popular NoSQL database, in a Flask application. First, you will learn why MongoDB is a good choice, and then we will implement a practical hands-on project using MongoDB in Flask.

Python Switch Case: How To Implement Switch Statements In Python

Have you ever wished Python had a native switch-case statement like C or Java? It would make conditional logic so much easier to read, especially when you have more than 3 conditions to handle. While Python doesn’t offer a built-in switch-case structure, the good news is that there are clean and Pythonic ways to achieve the same behavior. In this blog, let’s explore three practical ways to implement switch-case in Python with real examples and how to make sure they work using automated tests.

Flask or Django: Which One Best Fits Your Python Project?

Choosing the right framework can significantly impact the success of a dev project. If you've chosen to use Python for your project's backend, you might need to decide between Flask and Django, the most popular web frameworks in the Python ecosystem. This article will help you determine which of the two best suits your specific needs by examining the key factors to consider. Before diving into the technicalities, let's briefly introduce both Flask and Django.