Skip to main content

Async Redis connection object using Greenlets and Tornado

Project description

An asynchronous redis::Connection object using Greenlets and Tornado’s event-loop.

Installation

To install gretis, simply:

$ sudo pip install gretis

or alternatively (you really should be using pip though):

$ sudo easy_install gretis

or from source:

$ sudo python setup.py install

Getting Started

Create a redis ConnectionPool instructing it to use the Gredis AsyncConnection as its connection.

>>> import redis
>>> from gretis.async_connection import AsyncConnection
>>>
>>> pool = redis.ConnectionPool(connection_class=AsyncConnection,
                                host='localhost', port=6379, db=0,
                                socket_timeout=1)
>>> r = redis.StrictRedis(connection_pool=pool)
>>> r.set('foo', 'bar')
True
>>> r.get('foo')
'bar'

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

gretis-0.0.1.tar.gz (4.9 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