curs = conn.cursor()
poi = -124.3, 53.2
curs.execute(
    """SELECT gid, ST_AsGeoJSON(geog), ST_Distance(geog, poi)
FROM my_points, (SELECT ST_MakePoint(%s, %s)::geography AS poi) AS f
WHERE ST_DWithin(geog, poi, 1000);"""
    , poi)
for row in curs.fetchall():
    pass
Использование PostGIS на Python 3