Tornado asynchronous MySQL Driver [fork of TorMySQL]
Project description
mytor
Tornado asynchronous MySQL Driver
About
mytor - presents a Tornado Future-based API and greenlet for non-blocking access to MySQL.
Installation
pip install TorMySQL
Examples
from tornado.ioloop import IOLoop from tornado.get import coroutine import mytor 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 = "TEST", 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 = IOLoop.instance() ioloop.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.2.tar.gz
(6.5 kB
view details)
Built Distributions
mytor-0.2.2-py3.4.egg
(20.5 kB
view details)
mytor-0.2.2-py2.7.egg
(19.8 kB
view details)
File details
Details for the file mytor-0.2.2.tar.gz
.
File metadata
- Download URL: mytor-0.2.2.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 440641a19e327d5893e46aca34866645e7f36f82b07101629f183eaf28a6213e |
|
MD5 | 932e3c093d37097fd3cabe63fc988be1 |
|
BLAKE2b-256 | c0cda002efdb26d2cb1d705f31b961c81df618e67e1f80f76d073e27f6838f08 |
File details
Details for the file mytor-0.2.2-py3.4.egg
.
File metadata
- Download URL: mytor-0.2.2-py3.4.egg
- Upload date:
- Size: 20.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60ec090c3bb7e029f0b04abebb9a3ce9c2cc0f022e5b91c3aeb45c343789cb57 |
|
MD5 | a2c99373bae475bb1fadbd2d3064d786 |
|
BLAKE2b-256 | e44dfb49edbcf5b79ca0a6c9fb84c32a97ca3ddb6cf03427cd1ae2fbda49ce6e |
File details
Details for the file mytor-0.2.2-py2.py3-none-any.whl
.
File metadata
- Download URL: mytor-0.2.2-py2.py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fd2ffa5a95aa85c148575079ccd21452618d11c2a59b1b47862ce10a63efdb9 |
|
MD5 | d214f2080ee537ec37d131142031a69d |
|
BLAKE2b-256 | 58de0efc4b1cacec299f155425008bf85b2a3f40e00cb656b0f13da3b4c89f18 |
File details
Details for the file mytor-0.2.2-py2.7.egg
.
File metadata
- Download URL: mytor-0.2.2-py2.7.egg
- Upload date:
- Size: 19.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9903063d184b995ef68d09d6d2c01d2f1eac9283da7b2f8765b492933c677e93 |
|
MD5 | ae7481d3013b5c8b24b6207d3baa1846 |
|
BLAKE2b-256 | d27e4520ff566249578abd5ecb5160d88acf55b5005c54ba1066f4760dee24ed |