cozydb is a cozy MySQL-python wrapper
Project description
cozydb is a cozy MySQL-python wrapper.
Features:
Automatically reconnect to MySQL server after disconnectted.
Fetch results as dictionary without using DictCursor
Support execute retry
Example:
from cozydb import CozyStore store = CozyStore(host='server', port=3306, user='test', passwd='test', db='test') cursor = store.get_cursor() cursor.execute('select name from person where id=%s', (100,)) cursor.fetchall(as_dict=True)
cozydb.CozyStore has the same params as MySQLdb.connect and cozydb.CozyCursor has the same interfaces as MySQLdb.cursors.Cursor, so it’s easy to replace your cursors with CozyCursor and have the cozy features.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cozydb-0.1.5.tar.gz
(2.7 kB
view hashes)