Page 1 of 1

The flask framework

Posted: Sun Dec 22, 2024 7:50 am
by hasinam2206
If you are using a unix or macos system, open a terminal and enter the following commands: bash copy the code python3 -m venv venv source venv/bin/activate if you are following the tutorial on windows, enter the following commands in a command prompt window: bash copy the code python -m venv venv venv\scripts\activate once the virtual environment is activated, you are ready to install the python dependencies required for this project: bash copy the code pip install flask python-dotenv twilio the python packages used by this project are: , to create the web application.

Python-dotenv to import the application singapore mobile number list configuration from a .env file . The twilio python helper library for working with twilio apis. Set application settings to send verification emails with twilio verify, the flask app needs to authenticate you with your twilio account credentials. The app will also need to know the “service sid” assigned to the verify service you created above.

Image

The safest way to set these configuration values ​​is to assign environment variables to them. The most convenient way to manage your environment variables in a flask application is to use an .env file . Create a new file named .env (note the leading dot) in the root directory of your project and enter the following contents.