Technical requirements
For this chapter, you'll need a Python virtual environment, similar to the one we set up in Chapter 1, Python Development Environment Setup.
For the Testing with a database section, you'll need a running MongoDB server on your local computer. The easiest way to do this is to run it as a Docker container. If you've never used Docker before, we recommend that you read the Get Started tutorial in the official documentation: https://docs.docker.com/get-started/. Once done, you'll be able to run a MongoDB server with this simple command:
$ docker run -d --name fastapi-mongo -p 27017:27017 mongo:4.4
The MongoDB server instance will then be available on your local computer on port 27017
.
You can find all the code examples for this chapter in its dedicated GitHub repository: https://github.com/PacktPublishing/Building-Data-Science-Applications-with-FastAPI/tree/main/chapter9.