Connecting psycopg2 with Python in Heroku
问题 I've been trying for some days to connect my python 3 script to PostgresSQL database( psycopg2 ) in Heroku, without Django. I found some article and related questions, but I had to invest a lot of time to get something that I thought should be very straightforward, even for a newbie like me. I eventually made it work somehow but hopefully posting the question (and answer) will help other people to achieve it faster. Of course, if anybody has a better way, please share it. As I said, I had a