HTTP Riak connector for aiohttp
Project description
aiohttp_riak
riakhttp protocol implementation for aiohttp.web.
Example
import asyncio
import aiohttp
from aiohttp_riak import RiakHTTP, Bucket
async def riak_requests(client):
bucket = Bucket(client, 'example')
# Secondary indexes
indexes = [
('example_bin', 'ex'),
('example_int', '1')
]
await bucket.put('key', 'val', [indexes[0]])
await bucket.put('key2', 'val2', [indexes[1]])
await bucket.put('key3', 'val3', indexes)
keys = await bucket.keys()
print('KEYS', keys)
keys = await bucket.index('example_bin', 'ex')
print('INDEX_BIN', keys)
keys = await bucket.index('example_int', '1')
print('INDEX_INT', keys)
print('GET', await bucket.get('key2'))
print('DEL', await bucket.delete('key2'))
print('GET', await bucket.get('key2'))
print('BUCKETS', await bucket.buckets())
print('PING', await client.ping())
props = await bucket.props()
print('PROPS', props)
loop = asyncio.get_event_loop()
rh = RiakHTTP('127.0.0.1',loop=loop)
content = loop.run_until_complete(
riak_requests(rh))
rh.close()
License
aiohttp_riak BSD license.
CHANGES
0.0.1 (2016-02-03)
Init release
Credits
aiohttp_riak is written by Veniamin Gvozdikov.
Contributors
Please add yourself here alphabetically when you submit your first pull request.
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
aiohttp_riak-0.0.1.tar.gz
(3.9 kB
view details)
Built Distribution
File details
Details for the file aiohttp_riak-0.0.1.tar.gz
.
File metadata
- Download URL: aiohttp_riak-0.0.1.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e40cf0615372774b9d962325f32eecf231ce0eddecfd2c909c7d13f12a12c72b |
|
MD5 | 523d6cc4a38836e1f08b4c9083590cea |
|
BLAKE2b-256 | c13a94d3c5089bcb77abaf993055d52ba2949f5fefb6eb9ed74188a27f7d61f1 |
File details
Details for the file aiohttp_riak-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: aiohttp_riak-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 432d46c730b6c498ff29f7cf2a5bcbbddfde827f60cf2424c65dede4aacf55ee |
|
MD5 | 620bb4ba9cbc73380d8a46e1a4cc12e2 |
|
BLAKE2b-256 | 611f6b247dfc4e04f8833b602736eb641b5ad6ae82a31ff59354a5bcf066dcb8 |