asyncio Groonga Client library
Project description
asyncio Groonga Client.
Requirements
Python3.5+
Usage
GQTP
import asyncio
from aiogrn.client import GroongaClient
async def fetch(grn, cmd, **kwargs):
ret = await grn.call(cmd, **kwargs)
print(ret)
loop = asyncio.get_event_loop()
grn = GroongaClient(host='localhost', port=10043, protocol='gqtp', loop=loop)
tasks = [
asyncio.ensure_future(fetch(grn, 'status')),
asyncio.ensure_future(fetch(grn, 'select', table='Foo')),
asyncio.ensure_future(fetch(grn, 'status'))]
loop.run_until_complete(asyncio.gather(*tasks))
loop.close()
HTTP
import asyncio
from aiogrn.client import GroongaClient
async def fetch(grn, cmd, **kwargs):
ret = await grn.call(cmd, **kwargs)
print(ret)
loop = asyncio.get_event_loop()
grn = GroongaClient(loop=loop)
tasks = [
asyncio.ensure_future(fetch(grn, 'status')),
asyncio.ensure_future(fetch(grn, 'select', table='Foo')),
asyncio.ensure_future(fetch(grn, 'status'))]
loop.run_until_complete(asyncio.gather(*tasks))
loop.close()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aiogrn-0.0.1.tar.gz
(3.2 kB
view details)
Built Distribution
File details
Details for the file aiogrn-0.0.1.tar.gz
.
File metadata
- Download URL: aiogrn-0.0.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7a28adcf423f7e6f18a87ecf0a2b7cf5861a1136be2e1adb11e3bbfe8fc21ea |
|
MD5 | ec9dcee6e79046ad406c48a45d9ffa89 |
|
BLAKE2b-256 | 1775da60c5155df0ec2e736eb65e0eddcadf01c2f40a649510d4ebbe2fab4023 |
File details
Details for the file aiogrn-0.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: aiogrn-0.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61a8ae0ba54105c11fdcb1b448afdbcf1e1d11887a0f3f8e61b10b2605d216d6 |
|
MD5 | 504d83f0597cdc229662350e730ebad4 |
|
BLAKE2b-256 | fe2ce2bf5e83d38945947ccbbe83b19beb1575c89bec2abd0c5213237505c69c |