Skip to main content

Tornado asynchronous MySQL Driver [fork of TorMySQL]

Project description

mytor

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

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.3.tar.gz (6.6 kB view details)

Uploaded Source

Built Distributions

mytor-0.2.3-py3.4.egg (8.1 kB view details)

Uploaded Source

mytor-0.2.3-py2.py3-none-any.whl (9.6 kB view details)

Uploaded Python 2 Python 3

mytor-0.2.3-py2.7.egg (19.9 kB view details)

Uploaded Source

File details

Details for the file mytor-0.2.3.tar.gz.

File metadata

  • Download URL: mytor-0.2.3.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mytor-0.2.3.tar.gz
Algorithm Hash digest
SHA256 390c488d786696326c948e17c20f272b700cb1b29a246bc678837f64deb3a948
MD5 7d2ecff3d89e9dd2c20ff7e592852a10
BLAKE2b-256 cc83838768e8b463e389734c34123f9ebb4f247d4a60ab5531dd34a9f09b0746

See more details on using hashes here.

File details

Details for the file mytor-0.2.3-py3.4.egg.

File metadata

  • Download URL: mytor-0.2.3-py3.4.egg
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mytor-0.2.3-py3.4.egg
Algorithm Hash digest
SHA256 034023d00cd96367222809cb077773b43c097f2aa8d62004b3e5d0661d5c0999
MD5 9bb556d8d611a8052ef479e13e702487
BLAKE2b-256 391295ae8aa6ddcbb553503e88e2d65c16a9ee8c4422d4e48c8828b62027e312

See more details on using hashes here.

File details

Details for the file mytor-0.2.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for mytor-0.2.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d58e30e325f88821849f74ac4b568c63b7f415bf3a483570cbeb673fe4c98b9c
MD5 2dbfb14dc572537d0beb58a3baef65b3
BLAKE2b-256 bae3fffad6bfa5ac39a340441ca0a2d7c2a59e8cebc129983dce5ded0e3483ec

See more details on using hashes here.

File details

Details for the file mytor-0.2.3-py2.7.egg.

File metadata

  • Download URL: mytor-0.2.3-py2.7.egg
  • Upload date:
  • Size: 19.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mytor-0.2.3-py2.7.egg
Algorithm Hash digest
SHA256 128b7cbc1a5973fedfefde756685cf50f0c05054e786e392c1a5855554e478eb
MD5 fbcebcdb7dc31b98f4d0e2cf69c848a9
BLAKE2b-256 65a4a4b7c1a17d2d2a62c781c3c8448b98076940b829405f1a49d8126cb1b811

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page