Skip to main content

cozydb is a cozy MySQL-python wrapper

Project description

cozydb is a cozy MySQL-python wrapper.

Features:

  1. Automatically reconnect to MySQL server after disconnectted.

  2. Fetch results as dictionary without using DictCursor

  3. 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


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.7.tar.gz (2.7 kB view details)

Uploaded Source

File details

Details for the file cozydb-0.1.7.tar.gz.

File metadata

  • Download URL: cozydb-0.1.7.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cozydb-0.1.7.tar.gz
Algorithm Hash digest
SHA256 e63f841baf6b57e2e9efa79d9d95b3b2d9e0f1b23a38850962ffff6682aefc2b
MD5 5ab37f04dd4dc458663b32f6dfef3463
BLAKE2b-256 9d637a58761501b4be041a4532f26fe02d158bfcb81d218225fb2947159e6b6e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page