Avoiding bad behavior
Bad behavior is any kind of missing, wrong, or incomplete action that produces a runtime problem during the deployment, where the result is the deployment task failing. For this reason, in this section, we will learn about the steps that are required to complete any deployment.
Creating a list of all the packages that were installed and used to develop the Python code
The first thing we need to run our web application is the list of all the packages that were installed and used to develop the Python code. As we know, there are several ways to get this list, but the easiest one is to use pipreqs
. Let’s take a look:
- First of all, let’s install
pipreqs
by typing the following command in the Terminal:pipenv install pipreqs (simply "pip install pipreqs" if you are not using pipenv)
- Then, we can create the
requirements.txt
file with the following simple instruction:pipreqs ./covid
Here,
covid
is the name of the directory containing...