Et ensuite faire un tour sur la doc chez mois c'est sous
/usr/share/doc/python2.x-psycopg/example

first.py pour commencer.