This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

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

With redis-py:

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'

Or with redis-cluster-py:

Create a redis cluster ConnectionPool and give it an AsyncClusterConnection.

>>> import redis
>>> from gretis.async_cluster_connection import AsyncClusterConnection
>>> from rediscluster import ClusterConnectionPool, StrictClusterRedis
>>>
>>> pool = ClusterConnectionPool(connection_class=AsyncClusterConnection,
                                 host='localhost', port=700,
                                 socket_timeout=1)
>>> r = StrictRedisCluster(connection_pool=pool,
                           max_connections=2**31,
                           socket_timeout=1)
>>> r.set('foo', 'bar')
True
>>> r.get('foo')
'bar'
Release History

Release History

This version
History Node

0.0.6

History Node

0.0.5

History Node

0.0.4

History Node

0.0.3

History Node

0.0.2

History Node

0.0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
gretis-0.0.6.tar.gz (5.1 kB) Copy SHA256 Checksum SHA256 Source Jun 5, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting