Skip to content

Instantly share code, notes, and snippets.

@vortec
Created October 14, 2015 13:53
Show Gist options
  • Select an option

  • Save vortec/841f39b68be9f62bf789 to your computer and use it in GitHub Desktop.

Select an option

Save vortec/841f39b68be9f62bf789 to your computer and use it in GitHub Desktop.
import psycopg2
import psycopg2.extras
import time
conn = psycopg2.connect('dbname=tree user=fkochem')
factory = psycopg2.extras.RealDictCursor
cursor = conn.cursor(cursor_factory=factory)
def application(env, start_response):
start_response('200 OK', [('Content-Type','text/html')])
time.sleep(5)
return [b"Hello World"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment