Simple framework for aiomysql
Project description
aiomysql-core
Simple framework for aiomysql
introduce
simple package, easy to use
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)
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.3.tar.gz
(2.8 kB
view details)
Built Distribution
File details
Details for the file aiomysql-core-0.0.3.tar.gz
.
File metadata
- Download URL: aiomysql-core-0.0.3.tar.gz
- Upload date:
- Size: 2.8 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 | 04bd7a0e1fdc61f3dde385332231ef1431634bf03e386c65dfe76d93d8b0ebef |
|
MD5 | 3ba84eff7887df6e6f093f3057209718 |
|
BLAKE2b-256 | e512e30c77e65507550f9d623d028b9036edc884362a7c6c875c12c9765db8ca |
File details
Details for the file aiomysql_core-0.0.3-py2.py3-none-any.whl
.
File metadata
- Download URL: aiomysql_core-0.0.3-py2.py3-none-any.whl
- Upload date:
- Size: 3.8 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 | bbc669c573090d04af6d28ce9e1958c302fd1f1cefa27a0dc599f2091c185c75 |
|
MD5 | 7a85b38be8afbf660709c48b3612afb0 |
|
BLAKE2b-256 | e8e30147efeacd8482b5dd97bf6b9a798e33206fe2025e6fe6f2108ac8c356b3 |