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.7.tar.gz
(7.4 kB
view details)
Built Distribution
mytor-0.2.7-py2.py3-none-any.whl
(10.5 kB
view details)
File details
Details for the file mytor-0.2.7.tar.gz
.
File metadata
- Download URL: mytor-0.2.7.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b8c793e60ce487180b2289f9d2a7f0aea40864f4530a6697bc3e7385715d3ed |
|
MD5 | 3808ed2ec9316e22329539ff58665db3 |
|
BLAKE2b-256 | ad7db79fb6a1f50426cb37ead8e55cda0382511159751778fc94d114f8294a79 |
File details
Details for the file mytor-0.2.7-py2.py3-none-any.whl
.
File metadata
- Download URL: mytor-0.2.7-py2.py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0022b2e43b39d8d7fc64e80ea90625abfa45a0effa6f20a3d95170760da237dc |
|
MD5 | efd65679c9b1633e554948431abe719d |
|
BLAKE2b-256 | 5d52c01f43cfe30693062cacd3ee946001acb7bcae076efcdbc98bf0d4330899 |