Skip to content

Instantly share code, notes, and snippets.

@adamv
adamv / mysql.py
Created September 13, 2010 17:39
Simple wrapper around MySQLdb
import collections
import MySQLdb as dbapi
__all__ = ['MySql']
class MySql(object):
def __init__(self, **kwargs):
self.connection = dbapi.connect(**kwargs)
self.host_name = kwargs.get('host')