Clone wiki

pymysql_sa / Home


This package provides a PyMySQL dialect for SQLAlchemy.

PyMySQL is a pure Python MySQL client providing a DB-API to a MySQL database by talking directly to the server via the binary client/server protocol.

You can explicitly use pymysql by changing the 'mysql' part of your engine url to 'pymysql'.

You can also make pymysql the default mysql dialect as follows::

import pymysql_sa

In this case you don't need to change the engine url.

Being pure Python, PyMySQL is easily patched by gevent and the likes to make it cooperative.