Book Image

Hands-On Microservices with Django

By : Tieme Woldman
Book Image

Hands-On Microservices with Django

By: Tieme Woldman

Overview of this book

Are you a Django developer looking to leverage microservices to create optimized and scalable web applications? If yes, then this book is for you. With microservices, you can split an application into self-contained services, each with a specific scope running asynchronously while collectively executing processes. Written by an experienced Python developer, Hands-On Microservices with Django teaches you how to develop and deploy microservices using Django and accompanying components such as Celery and Redis. You'll start by learning the principles of microservices and message/task queues and how to design them effectively. Next, you’ll focus on building your first microservices with Django RESTful APIs (DFR) and RabbitMQ, mastering the fundamentals along the way. As you progress, you’ll get to grips with dockerizing your microservices. Later, you’ll discover how to optimize and secure them for production environments. By the end of this book, you’ll have the skills you need to design and develop production-ready Django microservices applications with DFR, Celery/RabbitMQ, Redis, and Django's cache framework.
Table of Contents (18 chapters)
Free Chapter
1
Part 1:Introducing Microservices and Getting Started
5
Part 2:Building the Microservices Foundation
11
Part 3:Taking Microservices to the Production Level

Technical requirements

This chapter’s remainder describes the applications and Python packages needed to develop and run Django microservices. As a start, you need a workstation running Linux, Mac OS, or Windows 10/11.

Since Celery doesn’t run on Windows, you may wonder why Windows 10/11 is still an option. This is because Windows Subsystem for Linux (WSL) allows you to run virtual Linux distributions on Windows 10/11, such as the Ubuntu distribution.

Furthermore, we’ll use Visual Studio Code (VS Code) as our code editor because it’s available for Linux, Mac OS, and Windows. And because it integrates well with WSL and MongoDB, the database that we’ll be using.

Altogether, you’ll need the following:

  • A (virtual) workstation running one of these operating systems:
    • Linux, such as Ubuntu 22.04 LTS
    • Mac OS
    • Windows 10 version 2004 or newer
    • Windows 11
  • Python version 3.8 or newer
  • VS Code

This chapter doesn’t contain...