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.6.tar.gz
(7.3 kB
view hashes)
Built Distributions
mytor-0.2.6-py2.py3-none-any.whl
(10.6 kB
view hashes)
mytor-0.2.6-py2.7.egg
(9.1 kB
view hashes)
Close
Hashes for mytor-0.2.6.macosx-10.11-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c9c6dba45f70588d8aa9f1c14df36fa21db6696a899ca9f5c88399353091ac1 |
|
MD5 | aa9f021b36d62fbfcc0c64d25ce8c2f5 |
|
BLAKE2b-256 | bd7ad0968311410561f56eb5d00cc777c3692a3f49ae475f410892bfe9f68bd2 |
Close
Hashes for mytor-0.2.6-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3132480631897a8c35053f2dd4cbfa8908d4cf20fa37295c8ad225ec53682c2c |
|
MD5 | 13bab923a0b78df14899a9853b30235a |
|
BLAKE2b-256 | 97ad6ac6ce426af099a6d27fef26734b73840ce65f0af8901fdef8939f5ea07b |