Skip to main content

asyncio (PEP 3156) Gibson cache support

Project description

https://travis-ci.org/jettify/aiogibson.svg?branch=master

aiogibson is a library for accessing a gibson cache database from the asyncio (PEP-3156/tulip) framework.

Code heavily reused from awesome aioredis library. GibsonPool, GibsonConnection, almost direct copy of RedisPool and RedisConnection, so I highly recommend to checkout aioredis.

Example

import asyncio
from aiogibson import create_gibson

loop = asyncio.get_event_loop()


@asyncio.coroutine
def go():
    gibson = yield from create_gibson('/tmp/aio.sock', loop=loop)
    # set value
    yield from gibson.set(b'foo', b'bar', 7)
    # get value
    result = yield from gibson.get(b'foo')
    print(result)
    # delete value
    yield from gibson.delete(b'foo')

loop.run_until_complete(go())

Requirements

Other Python client

License

The aiogibson is offered under MIT license.

Changes

0.1.0 (2014-08-17)

  • Initial release;

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

aiogibson-0.1.0.tar.gz (10.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page