The steps below will walk you through connecting to Postgres using psycopg2.
If you're not already logged in, follow the steps found here. In the upper-right corner, click the New button and select compute (or any kernel that has psycopg2 installed).
In the first cell, copy and paste the following code to create a connection to the
cusp Postgres database.
You can use the
conn connection to query the
cusp database. For examples on how to use
psycopg2, check out this Psycopg2 Tutorial.