I'm having a little trouble. I've tried using psycopg2 and sqlalchemy to get into my local PostgreSQL database and, while it's not throwing an error, it won't make the connection. Instead it's just stuck executing the code. Here's where it's going wrong.
conn = psycopg2.connect(database='db', user="user", password="password", host="127.0.0.1", port="55212")
And likewise when using sqlalchemy here is where it's going wrong.
engine = create_engine('postgresql://pw:db@localhost:55212/DB')
Please help, I can't do anything until this is resolved!