Hands-On Docker for Microservices with Python
上QQ阅读APP看书,第一时间看更新

Creating a REST Service with Python

Following our example in the last chapter, we split the system designed as a monolith into smaller services. In this chapter, we will analyze in detail one of the microservices (Thoughts Backend) that we mentioned in the previous chapter.

We will talk about how to develop this microservice as an application using Python. This microservice will be ready to interact with other microservices through a standard web RESTful interface, making it the foundation for our global microservice architecture system.

We will discuss different elements such as the API design, the database schema that supports it, and how to implement and how to implement the microservice. Finally, we'll see how to test the application to be sure that it works correctly.

The following topics will be covered in this chapter:

  • Analyzing the Thoughts Backend microservice
  • Designing the RESTful API
  • Defining the database schema
  • Implementing the service
  • Testing the code

By the end of the chapter, you'll know how to successfully develop a microservice application, including the different stages from design to testing.