zcb-dbutils

db utils with pymysql by chzcb


Keywords
python, pymysql, zcb_dbutils
License
MIT
Install
pip install zcb-dbutils==0.0.7

Documentation

dbutils

使用方法

from zcb_dbutils import DBConnection

dbconn = DBConnection(host='localhost', port=3306, user='root', password='', database='mysql')

# 查询单条数据
row = dbconn.fetch_one('select * from table limit 1')
# 查询多条数据
rows = dbconn.fetch_rows('select * from table')