Python的PostgreSQL异步驱动aiopg.zip
aiopg是一个使用asyncio(PEP-3156/tulip)框架开发的用来访问PostgreSQL数据库的Python开发库,封装了基于Psycopg数据库驱动程序的异步特性。
示例代码:
import asyncio
from aiopg.pool import create_pool
dsn = 'dbname=jetty user=nick password=1234 host=localhost port=5432'
@asyncio.coroutine
def test_select():
pool = yield from create_po
下载地址
用户评论