I am using the following code to create postgresql database using sqlalchemy:
engine=create_engine(\'postgresql+psycopg2://postgres@localhost/testData\') Base.me
You need to create the database beforehand, create_all just creates the tables. To create database: sudo -u postgres createdb testData.
create_all
sudo -u postgres createdb testData