Skip to content
/ amysql Public

High performance( 2.5 times to MySQLDb ) Python Mysql Driver, using Python native socket layer. pure C implemented.

Notifications You must be signed in to change notification settings

abaelhe/amysql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 host
    3306, # 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.fields
  • 4. adapte to Python async socket( c.sock is instance of Python socket class. ):

    >>> c.sock

Todo:

  • 0. As needed;

About

High performance( 2.5 times to MySQLDb ) Python Mysql Driver, using Python native socket layer. pure C implemented.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published