Metadata-Version: 1.1
Name: toradbapi
Version: 0.1.3
Summary: Wrapper for twisted.enterprise.adbapi.ConnectionPool to use with tornado
Home-page: https://github.com/geerk/toradbapi
Author: Timofey Trukhanov
Author-email: timofey.trukhanov@gmail.com
License: MIT
Description: Want to use twisted's adbapi in tornado but does not know how? Try toradbapi.
        
        This is just wrapper for `twisted.enterprise.adbapi.ConnectionPool` to use with tornado. So documentation for `__init__` args you can find at twisted docs_
        
        .. _docs: https://twistedmatrix.com/documents/14.0.2/api/twisted.enterprise.adbapi.ConnectionPool.html#__init__
        
        Available methods in `toradbapi.ConnectionPool`:
        
        - run_query
        - run_operation
        - run_interaction
        
        They all have similar interface as twisted's corresponding methods. They return instance of `Future`, so can be yielded inside coroutine.
        
        Example usage::
        
            from tornado import gen
            from toradbapi import ConnectionPool
        
            pool = ConnectionPool('MySQLdb', db='test')
        
            @gen.coroutine
            def get_entities():
                entities = yield pool.run_query('SELECT * FROM `entity`')
                raise gen.Return(entities)
        
        
        Demo project is under demo.py file. Also there are more examples in tests.py.
        
        Only Python 2.7 supported for now.
        
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Programming Language :: Python :: 2.7
Classifier: Operating System :: OS Independent
Classifier: Topic :: Database
