amysql
amysql copied to clipboard
High performance( 2.5 times to MySQLDb ) Python Mysql Driver, using Python native socket layer. pure C implemented.
Simple and High Performance MySQL Driver(Python).
-
0. This is community version, supported and tested on Linux x64, Python 2.7;
-
1. This driver works fine and with very high performance for most company and most scene;
-
2. Note: not fully compatiable with MySQL offcial protocol;
-
3. contact the maintainer for License and/or business collaboration.
Current Supported Functions:
-
0. MySQL safe handshake(SHA1, MY_SCRAMBLE_LENGTH:20 byte);
-
1. SQL CRUD;
-
2. MySQL Store procedure.
Interface:
-
0. new connection:
>>> import amysql; >>> c=amysql.Con(); >>> c.connect('localhost', # server host3306, # server port'xweb', # username'xweb123', # password'xweb') # database);1. SQL CRUD:
>>> c.query("select * from sys_usr")2. Call MySQL Store Procedure:
>>> c.query("call sys_usr_list()")3. Query Result:
>>> c.rows >>> c.fields4. adapte to Python async socket( c.sock is instance of Python socket class. ):
>>> c.sock
Todo:
-
0. As needed;
-
0. As needed;