- Step 1:
pipenv install --python 3.8
- Step 2:
pipenv shell
- Step 3:
pipenv install flask flask-sqlalchemy flask-marshmallow marshmallow-sqlalchemy flask-migrate psycopg2
flask-sqlalchemy is the sql-alchemy with flask bindings. flask-marshmallow is like the Serializer in Django Rest Framework, marshmallow-sqlalchemy is common binding between marshmallow and sqlalchemy (for things like ModelSerializer in Django Rest Framework).flask-migrate is migration tool for Flask based on ALEMBIC.psycopg2-binary is for connecting to postgres db.
My Channel Link:tutorial for beginners: In this Tutorial you will learn how to create flask application o. In the webinar, Abby covered: Using Cloud Code (A PyCharm plugin) that can be used to create new projects with a Flask or a Django template Building your flask Cloud Run application locally, and then deploying it to GCP Automatic rebuild.
Note: If psycopg2 install gives errors use psycopg2-binary. But this is a development only binary. It is not meant for production. For production, you need to compile psycopg2 from source.
See here for installing psycopg2 if you face issues: https://tekshinobi.com/install-psycopg2-on-ubuntu-18-04/

Now create the application file.. traditionally called app.py (or main.py…whatever your taste).touch app.py
Stick in this boilerplate code in app.py.