con = psql.connect(dbname='postgres', user=self.user_name, host='',
    password=self.password)
con.set_isolation_level(ISOLATION_LEVEL_AUTOCOMMIT)
cur = con.cursor()
cur.execute('CREATE DATABASE %s  ;' % self.db_name)
Create a Postgres database using python