

Note: Python Interpreter and Worrking directory are already filled if you already selected Python interpreter though Pycharm settings before configuring this Flask configuration. Working directory: (your location of python interpreter in your virtual environment)/bin

Python Interpreter: (your location of python interpreter in your virtual environment)

Select “Module name” instead of “Script path” and type flask.Įnvironment Variables: PYTHONUNBUFFERED=1 FLASK_APP=app.py FLASK_ENV=development Pycharm ConfigurationĬlick on “Add Configuration” button on top right. Just my project directory with one file called app.py. The project structure at this moment looks like this:
PYCHARM COMMUNITY CODE
Stick in this boilerplate code in app.py. traditionally called app.py (or main.py…whatever your taste). See here for installing psycopg2 if you face issues: For production, you need to compile psycopg2 from source.
PYCHARM COMMUNITY INSTALL
Note: If psycopg2 install gives errors use psycopg2-binary. psycopg2-binary is for connecting to postgres db. flask-migrate is migration tool for Flask based on ALEMBIC. 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).
