Technical requirements
To dive into the chapter and follow along with recipes on authentication and authorization, ensure your setup includes the following essentials:
- Python: Install a Python version higher than 3.9 in your environment.
- FastAPI: This should be installed with all required dependencies. If you didn’t do so during 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/Chapter04.
Setting up a virtual environment for the project within the project root folder is also recommended to manage dependencies efficiently 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...