Technical requirements
For this chapter, you’ll require a Python virtual environment, just 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
You’ll find all the code examples for this chapter in the dedicated GitHub repository at https://github.com/PacktPublishing/Building-Data-Science-Applications-with-FastAPI-Second-Edition/tree/main/chapter08.