Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (18 sloc) 613 Bytes
import logging
import psycopg2
class PlPy(object):
def __init__(self, dsn=None, logger=None):
if logger is None:
logger = logging.getLogger(__name__)
self.logger = logger
if dsn is None:
dsn = ''
self.dsn = dsn
self.db = psycopg2.connect(dsn=self.dsn)
self.cursor = self.db.cursor()
def notice(self, message):
def execute(self, *args, **kwargs):
return self.cursor.execute(*args, **kwargs)
def prepare(self, *args, **kwargs):
return self.cursor.prepare(*args, **kwargs)
You can’t perform that action at this time.