Skip to main content

mytor

https://travis-ci.org/mosquito/mytor.svg

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)

Source distribution for mytor 0.2.7
File Size Uploaded
mytor-0.2.7.tar.gz 7.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mytor 0.2.7
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.2.7 This release

2 release files

0.2.6

4 release files

0.2.5

4 release files

0.2.4

3 release files

0.2.3

4 release files

0.2.2

4 release files

0.2.1

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page