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.

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

Uploaded Source

Built Distributions

mytor-0.2.6.macosx-10.11-x86_64.tar.gz (16.8 kB view details)

Uploaded Source

mytor-0.2.6-py2.py3-none-any.whl (10.6 kB view details)

Uploaded Python 2 Python 3

mytor-0.2.6-py2.7.egg (9.1 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for mytor-0.2.6.tar.gz
Algorithm Hash digest
SHA256 e608767e5b1b67a057ade3b707f4e17bb3b688e9e2913688c7a3f030f66be109
MD5 fda2dec10b6571075a442b54d8ca4897
BLAKE2b-256 4901d3201f2655e30917ab319b39d8172f5a5a8ef354a34573e7865cb55875df

See more details on using hashes here.

File details

Details for the file mytor-0.2.6.macosx-10.11-x86_64.tar.gz.

File metadata

File hashes

Hashes for mytor-0.2.6.macosx-10.11-x86_64.tar.gz
Algorithm Hash digest
SHA256 3c9c6dba45f70588d8aa9f1c14df36fa21db6696a899ca9f5c88399353091ac1
MD5 aa9f021b36d62fbfcc0c64d25ce8c2f5
BLAKE2b-256 bd7ad0968311410561f56eb5d00cc777c3692a3f49ae475f410892bfe9f68bd2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mytor-0.2.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3132480631897a8c35053f2dd4cbfa8908d4cf20fa37295c8ad225ec53682c2c
MD5 13bab923a0b78df14899a9853b30235a
BLAKE2b-256 97ad6ac6ce426af099a6d27fef26734b73840ce65f0af8901fdef8939f5ea07b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for mytor-0.2.6-py2.7.egg
Algorithm Hash digest
SHA256 ba7f41ec4050fbabc5f5d5edb3d90c3f4147b841435afb49addd09961e1c50c3
MD5 0f71bd2da2d1cd1b5b369d7051936fad
BLAKE2b-256 ccedd88cc8002ade0cb9a8b4d67bada9fc262baf5c5fb07b905bafabf75da97d

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