EasyMySQL Documentation

EasyMySQL is a Python library that wraps mysql-connector-python to give you a clean, minimal API for the most common database operations: insert, select, update, and delete.

Quick Start

Install the library:

pip install easymysql

Connect and run your first query:

from easymysql.mysql import mysql

db = mysql('localhost', 'root', 'password', 'mydb')

# Insert a row
db.insert('users', {
    'name': 'Alice',
    'email': '[email protected]',
})

# Query all users
users = db.select('users')
for user in users:
    print(user['name'], user['email'])

What's inside