Technical requirements
You'll need a Python virtual environment, as we set up in Chapter 1, Python Development Environment Setup.
For the Handling multiple WebSocket connections and broadcasting messages section, you'll need a running Redis server on your local computer. The easiest way is to run it as a Docker container. If you've never used Docker before, we recommend you read the Getting started tutorial in the official documentation at https://docs.docker.com/get-started/. Once done, you'll be able to run a Redis server with this simple command:
$ docker run -d --name fastapi-redis -p 6379:6379 redis
This will make it available on your local computer on port 6379
.
You'll find all the code examples of this chapter in the dedicated GitHub repository at https://github.com/PacktPublishing/Building-Data-Science-Applications-with-FastAPI/tree/main/chapter8.