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
- Installation — requirements and install options
- Connecting to a Database — how to open a connection
- Inserting Data —
insert() - Querying Data —
select() - Updating Data —
update() - Deleting Data —
delete() - Changelog — version history