Technical requirements
To follow along with the WebSockets recipes, make sure you have the following essentials in your setup:
- Python: Install a Python version higher than 3.9 in your environment.
- FastAPI: This should be installed with all the required dependencies. If you haven’t done it in the previous chapters, you can simply do it from your terminal:
$ pip install fastapi[all]
The code used in the chapter is hosted on GitHub at https://github.com/PacktPublishing/FastAPI-Cookbook/tree/main/Chapter09.
It is recommended to set up a virtual environment for the project in the project root folder to efficiently manage dependencies and maintain project isolation.
Within your virtual environment, you can install all the dependencies at once by using the requirements.txt
file provided in the GitHub repository in the project folder:
$ pip install –r requirements.txt
Since the interactive Swagger documentation is limited at the time of writing, basic...