Preparing for deployment
Deployment usually marks the end of an application’s life cycle. Before deploying our applications, we must make sure the right settings required for a smooth deployment are put in place. These settings include ensuring the application dependencies are up to date in the requirements.txt file, configuring environment variables, and so on.
Managing dependencies
In a few earlier chapters, we installed packages such as beanie and pytest. These packages are absent from the requirements.txt file, which serves as the dependency manager for our application. It is important that the requirements.txt file is kept up to date.
In Python, the list of packages used in a development environment can be retrieved using the pip freeze command. The pip freeze command returns a list of all packages installed directly and the sub-dependencies for each package installed. Luckily, the requirements.txt file can be maintained manually, enabling us to list only the main...