Tornado asynchronous MySQL Driver [fork of TorMysql]
Project description
mytor
Tornado asynchronous MySQL Driver.
This if fork of TorMySQL.
About
mytor - presents a Tornado Future-based API and greenlet for non-blocking access to MySQL.
Installation
pip install mytor
Examples
import mytor from tornado.ioloop import IOLoop from tornado.gen import coroutine pool = mytor.ConnectionPool( max_connections = 20, #max open connections idle_seconds = 7200, #conntion idle timeout time, 0 is not timeout host = "127.0.0.1", user = "root", passwd = "secret", db = "test", charset = "utf8" ) @coroutine def test(): with (yield pool.Connection()) as conn: with conn.cursor() as cursor: yield cursor.execute("SELECT * FROM test") datas = cursor.fetchall() print datas yield pool.close() IOLoop.current().run_sync(test)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mytor-0.2.5.tar.gz
(7.3 kB
view hashes)
Built Distributions
mytor-0.2.5-py2.py3-none-any.whl
(10.7 kB
view hashes)
mytor-0.2.5-py2.7.egg
(9.1 kB
view hashes)
Close
Hashes for mytor-0.2.5.macosx-10.11-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 608c98cab1d033b00c53f62652ce347b4e34b3640e628da7cf96e11f20ae1add |
|
MD5 | 6e23926c96acef108be7a66e09d2563f |
|
BLAKE2b-256 | e55e2e9df1ba08ad8babaa2ece7118b55696c364cbeee59831bba0d1b2b30960 |
Close
Hashes for mytor-0.2.5-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1ebe8e153685c0db11cc2f6c4a1f14123378886439506136b03c4a55a50edf5 |
|
MD5 | 2b05cc32fa1714ba5dacecc3955dfc3f |
|
BLAKE2b-256 | 8fff5983dbfd2535690cc06be15c97f29b69b0070e30379152b7e1dd8320e35a |