class MyTable(object):

    def __init__(self):
        self.conn = sqlite3.connect(':memory:')
self.cursor = self.conn.cursor()
sql = '            CREATE TABLE foo ...\n        '
self.execute(sql)

def execute(self, sql, args):
    self.cursor.execute(sql, args)

def delete(self, id, reason):
    sql = 'UPDATE table SET softdelete = 1, reason = %s where tableid = %s'
how to implement database-style table in Python