December 2018
Intermediate to advanced
500 pages
12h 33m
English
If you are using the same virtual environment we have created for the previous example, or you downloaded the code sample, the service folder already exists. If you created a new virtual environment, create a folder named service within the root folder for the virtual environment created.
Create a new config.py file within the service folder. The following lines show the code that declares variables that determine the configuration for Flask and SQLAlchemy. The SQL_ALCHEMY_DATABASE_URI variable generates an SQLAlchemy URI for the PostgreSQL database. Make sure you specify the desired database name in the value for DB_NAME and that you configure the user, password, host, and port based on your PostgreSQL configuration. ...