Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
High performance( 2.5 times to MySQLDb ) Python Mysql Driver, using Python native socket layer. pure C implemented.
C Python
Branch: master
Failed to load latest commit information.
README.md Update README.md
amysql.c Add usage and interface
amysql.so add pre-build python module: amysql.so
setup.py init version:1.0
test.py init version:1.0

README.md

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;

Something went wrong with that request. Please try again.