Jump to ratings and reviews
Rate this book

Python Microservices Development: Build, test, deploy, and scale microservices in Python

Rate this book
A practical approach to conquering the complexities of Microservices using the Python tooling ecosystem

Key FeaturesA very useful guide for Python developers who are shifting to the new microservices-based developmentA concise, up-to-date guide to building efficient and lightweight microservices in Python using Flask, Tox, and other toolsLearn to use Docker containers, CoreOS, and Amazon Web Services to deploy your servicesBook DescriptionWe often deploy our web applications into the cloud, and our code needs to interact with many third-party services. An efficient way to build applications to do this is through microservices architecture. But, in practice, it's hard to get this right due to the complexity of all the pieces interacting with each other.

This book will teach you how to overcome these issues and craft applications that are built as small standard units, using all the proven best practices and avoiding the usual traps. It's a practical you’ll build everything using Python 3 and its amazing tooling ecosystem. You will understand the principles of TDD and apply them.

You will use Flask, Tox, and other tools to build your services using best practices. You will learn how to secure connections between services, and how to script Nginx using Lua to build web application firewall features such as rate limiting. You will also familiarize yourself with Docker’s role in microservices, and use Docker containers, CoreOS, and Amazon Web Services to deploy your services.

This book will take you on a journey, ending with the creation of a complete Python application based on microservices. By the end of the book, you will be well versed with the fundamentals of building, designing, testing, and deploying your Python microservices.

What you will learnExplore what microservices are and how to design themUse Python 3, Flask, Tox, and other tools to build your services using best practicesLearn how to use a TDD approachDiscover how to document your microservicesConfigure and package your code in the best wayInteract with other servicesSecure, monitor, and scale your servicesDeploy your services in Docker containers, CoreOS, and Amazon Web ServicesWho this book is forThis book is for developers who have basic knowledge of Python, the command line, and HTTP-based application principles, and those who want to learn how to build, test, scale, and manage Python 3 microservices. No prior experience of writing microservices in Python is assumed.

Table of ContentsUnderstanding MicroservicesWorking with flaskTest-driven development and documentation, the virtuous cycleDesigning Forrest Interacting with other servicesMonitoring your services Securing your servicesConsuming the MicroservicesPackaging ForrestDockerizing your services Deploying on AWSThinking ahead

342 pages, Kindle Edition

Published July 25, 2017

30 people are currently reading
85 people want to read

About the author

Tarek Ziadé

12 books

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
4 (10%)
4 stars
20 (52%)
3 stars
10 (26%)
2 stars
4 (10%)
1 star
0 (0%)
Displaying 1 - 9 of 9 reviews
Profile Image for superflb.
1 review
October 1, 2019
"A little bit of microservices and lots of how to deploy author's app."

If you want to learn by building microservices, try to find another book. This one isn't for you. Unlike other good python books eg. "flask web development". This book isn't driven by a project. If you are not an experienced python web developer, you will probably learn little from this book. I will explain why.

Chapter 2: author introduced flask. If you are not familiar with python web framework, read "flask web development"(A good book written by a good author). Instead of writing a small flask project, Author used several scattered examples to explain how flask works. I guess it's fine for experienced readers, but if you are a novice, you will end up not knowing how those components work together.

Chapter 3: tdd. Testing is important. But author uses a separate chapter to explain how to use some libs to test the code examples. Author failed to implement tdd into a real-world project which is in next chapter.

Chapter 4: Design an app. The biggest disappointment! Author created a project called runnerly for this book, but poorly explained it in just one chapter. The project depends on a python lib called "flakon" which is made just for this project. All details of the lib have been ignored by the author. The code is not well documented in the book and github. Readers made pr on the github, and author failed to respond.

...
A couple of chapters are focused on operation instead of microservices. Author mentioned many tools and libs in the books, which is not necessarily bad. But I found it was more like a distraction, since this book is supposed to focus on building microservices.
Profile Image for Jahongir Rahmonov.
50 reviews16 followers
September 8, 2017
It is an OK book for a beginner in microservices. But honestly, I did not learn anything new.
Profile Image for Durval.
2 reviews
December 16, 2020
This is a good book.

It is short, goes straight to the point and presents the reader with a lot of knowledge gained from the author's experience.

When I found this book, I was looking for a book that would teach me about microservices, using the python language. This book served as a small first step, but it is definitely not enough. When you finish reading you will have a good overview of how it works, but you still need to read a lot to really understand microservices.

What I really liked was that the author introduced me to the python ecosystem. Showing me dozens of libraries, frameworks, and relevant topics in the python community. However, do not delve into any of them, just an overview.

One thing that bothered me is that there are a lot of scripts with problems (they don't run) and without proper contextualization (what file is this script in?)

Another thing I would like to see better is that the implementation of the main project of the book (runnerly) be sequential. I, who had no previous knowledge of Flask, was confused in the parts that everything was already done.

Profile Image for Jascha.
151 reviews
January 19, 2021
Not a bad book overall, it presents a Flask application that, starting as a monolith, gets decoupled into microservices. What I did not like is the fact that it tries to cover way too much terrain, not going deeply into anything. Too much is spent describing, from zero, what is Flask, for example, when there are plenty of books that do it very well. Similarly, it throws in many technologies that are very complex and required entire books to understand and configure, including Redis, RabbitMQ and, last but not leasts, Celery. Maybe more time should have been dedicated to Oath2 and/or JWT.

The part that I have perticularly enjoyed here is the diagrams fro mthe monolith going to the microservices. There are many questions and slowly all the steps that lead to the microservice architecture. But that's small part of the whole text.

A pity, it could have been a very good book.
Profile Image for Albert.
405 reviews
September 14, 2017
Valuable demonstration of the microservice over monolith approach. Uses a thoughtful and illustrative application and identifies the right libraries / toolchains for the ecosystem.
Profile Image for Michael Hall.
22 reviews
May 25, 2025
This book was a good read for me. It covered many aspects of developing microservices in Python that are relevant to my engineering job. Some of these aspects include developing a REST API with a web server such as Flask; writing, testing, and documenting code; interacting with other services via synchronous vs. asynchronous calls; using task or topic queues (e.g., RabbitMQ); monitoring services; securing services; packaging services; containerizing services; and deploying on AWS. The aim of the book is to provide insight and examples of how to develop a microservice by focusing on a toy application called Runnerly.

It was very useful to learn about different technologies and methodologies in this book, and I think it can serve as a good reference. I gave it 4 stars instead of 5 because I often found myself skipping past some of the details. There were many different packages and libraries introduced or referenced that would require further research to fully understand. Some sections were also a bit hard to follow, so I just skimmed through those.

Overall, it was a good book that introduced a wide range of technologies and ideas related to developing Python microservices. There were many technologies I was already familiar with (e.g., REST APIs, Docker, AWS, asyncio, etc.) or had heard of, and others that I discovered for the first time in this book.
Profile Image for Farsan Rashid.
36 reviews17 followers
June 17, 2019
Starting with differences between monolith and microservice progressively talks about how you can build, monitor, deploy a simple microservice based system using technologies like flask, rabbitmq, docker, aws, graylog, reactjs(for frontend) etc. You will also get to know about authentication, TDD, API & code documentation, python packaging system. This book is like a dish that has lot's of ingredients but not properly cooked. Newbies will get to know about lots of technology but the balance between depth and breath of topics is not well managed.
Displaying 1 - 9 of 9 reviews

Can't find what you're looking for?

Get help and learn more about the design.