lightmysql
1.0.5
Le package amélioré de Pymysql, fabriqué par Yixiangzhilv.
pip3 install lightmysql
> >> import lightmysql
> >> conn = lightmysql . Connect ( host = "127.0.0.1" , user = "root" , password = "" , database = "yxzl" )
连接到 127.0 .0 .1 / yxzl 成功!当前用户为: root
> >> conn . insert ( "test" , { "name" : "Python-Test" , "age" : 15 })
> >> conn . get ( "test" )
[( 'Python-Test' , 15 )]
> >> conn . update ( "test" , changes = { "age" : "20" }, condition = { "name" : "Python-Test" })
> >> conn . delete ( "test" , condition = { "name" : "Python-Test" })Pour plus de détails, veuillez vérifier l'exemple.py
Désolé, mais dans cette version, vous ne pouvez pas créer de table avec LightMysql.