将Python连接到Heroku PostgreSQL数据库吗?

将Python连接到Heroku PostgreSQL数据库吗?

问题描述:

我正在探索Python语言的各种功能.我已经在Heroku上创建了一个Postgres数据库,我正在寻找连接的方法.我有主机,数据库用户,端口和密码设置.我不想部署到Heroku,只需本地连接到该数据库即可.我从哪里开始?

I am exploring various features of the Python language. I have created a Postgres db on Heroku, am am looking to connect to it. I have the host, database user, port and password settings. I am not looking to deploy to Heroku, just connect locally to this db. Where can I get started?

我对Heroku一无所知,但也许 psycopg 在寻找什么?

I don't know anything about Heroku, but maybe psycopg is what you're looking for?