-def make_connection(options, asynchronous=False):
- """ Create a psycopg2 connection from the given options.
- """
- params = {'dbname' : options.dbname,
- 'user' : options.user,
- 'password' : options.password,
- 'host' : options.host,
- 'port' : options.port,
- 'async' : asynchronous}
-
- return psycopg2.connect(**params)
-