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)
Metadata
Release files for mytor 0.2.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mytor-0.2.7.tar.gz | 7.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mytor-0.2.7-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 17.9 kB
Release files / mytor-0.2.7.tar.gz
| Download URL | mytor-0.2.7.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7b8c793e60ce487180b2289f9d2a7f0aea40864f4530a6697bc3e7385715d3ed
|
|
BLAKE2b-256 checksum How to use checksums |
ad7db79fb6a1f50426cb37ead8e55cda0382511159751778fc94d114f8294a79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / mytor-0.2.7-py2.py3-none-any.whl
| Download URL | mytor-0.2.7-py2.py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
0022b2e43b39d8d7fc64e80ea90625abfa45a0effa6f20a3d95170760da237dc
|
|
BLAKE2b-256 checksum How to use checksums |
5d52c01f43cfe30693062cacd3ee946001acb7bcae076efcdbc98bf0d4330899
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |