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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cozydb-0.1.6.post0.macosx-10.11-x86_64.exe (65.2 kB view details)

Uploaded Source

File details

Details for the file cozydb-0.1.6.post0.tar.gz.

File metadata

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

File hashes

Hashes for cozydb-0.1.6.post0.tar.gz
Algorithm Hash digest
SHA256 61ec47fbb46d0c09289e484f5dc52ed31b2d0f610f08b69b16fd38e8dbaf74f8
MD5 86054b3ab8279347d62a70cc1ded58cf
BLAKE2b-256 58d6d22f4e62e1197acbde19d4d87c8aab37eeb6e18d0db00352b746e2b6c2ce

See more details on using hashes here.

File details

Details for the file cozydb-0.1.6.post0.macosx-10.11-x86_64.exe.

File metadata

File hashes

Hashes for cozydb-0.1.6.post0.macosx-10.11-x86_64.exe
Algorithm Hash digest
SHA256 2a23e5519ca4e62dac20e296ab8a9c86bb78e5ecc4c64bea94bc77ef4d1bae87
MD5 297e2881c448cd53c9f034cf12c8458a
BLAKE2b-256 9161045cd5e2c9a6bf5de375251613a8ddb3885ec78a367471b293075579245c

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