Token-Based Authentication with Flask

This tutorial takes a test-first approach to implementing token-based authentication in a Flask app using JSON Web Tokens (JWTs). Objectives By the end of this tutorial, you will be able to… Discuss the benefits of using JWTs versus sessions and cookies for authentication Implement user authentication with JWTs Blacklist user tokens when necessary Write tests […]

Read More

Caching in Django with Redis

Application performance is vital to the success of your product. In an environment where users expect website response times of less than a second, the consequences of a slow application can be measured in dollars and cents. Even if you are not selling anything, fast page loads improve the experience of visiting your site. Everything […]

Read More

Testing Third-Party APIs with Mocks

The following tutorial demonstrates how to test the use of an external API using Python mock objects. Integrating with a third-party application is a great way to extend the functionality of your product. However, the added value also comes with obstacles. You do not own the external library, which means that you cannot control the […]

Read More

Python Virtual Environments – a primer

In this article, we’ll show how to use virtual environments to create and manage separate environments for your Python projects, each using different versions of Python for execution, as well as how Python dependencies are stored and resolved. Why the need for virtual environments? Python, like most other modern programming languages, has its own unique […]

Read More