Simple framework for aiomysql
Project description
Aiomysql-Core
Simple framework for aiomysql
Introduce
simple package, easy to use
Document
Installation
pip install aiomysql-core
Simple uses
import asyncio
import aiomysql
from aiomysql_core import AioMysqlCore
async def test_example(loop):
pool = await aiomysql.create_pool(host='', port=3308,
user='', password='',
db='', loop=loop)
core = AioMysqlCore(pool=pool)
rows = await core.query('select * from users where uid=%s', 113)
print(rows)
rows = await core.gener('select * from users limit 100')
async for row in rows:
print(row)
row = await core.get('select * from users where uid=%(uid)s', {'uid': 113})
print(row)
rowcount = await core.execute_rowcount('select * from users where uid=%(uid)s', {'uid': 113})
print(rowcount)
pool.close()
await pool.wait_closed()
loop = asyncio.get_event_loop()
loop.run_until_complete(test_example(loop))
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
aiomysql-core-0.0.5.tar.gz
(2.9 kB
view details)
Built Distribution
File details
Details for the file aiomysql-core-0.0.5.tar.gz
.
File metadata
- Download URL: aiomysql-core-0.0.5.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 913b2fb02c6d3c7e298a08ea03bd40bd2d71c04f1509596df77fbd87f7b0da5d |
|
MD5 | 15c1c6012144c638d14161215bf08269 |
|
BLAKE2b-256 | 403817d5cf7a2f6de6f45b23da80bb9027aea1dc7152228766d081c0fcb9a715 |
File details
Details for the file aiomysql_core-0.0.5-py2.py3-none-any.whl
.
File metadata
- Download URL: aiomysql_core-0.0.5-py2.py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89c939b1b8a56cd1190f5b07658707380c046aa5bf69709b99783122656a29a1 |
|
MD5 | 2387d8209ecdd7f21907acc880bed71a |
|
BLAKE2b-256 | 272ee194792d757bfbba62bf846d2f502797251d25a3e9bbb3a28b1d152a0f37 |