Asynchronous Redis client that works within Tornado IO loop.
Python Shell
Switch branches/tags
Nothing to show
#27 Compare This branch is 76 commits ahead, 1 commit behind kmerenkov:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
brukva [client] support for P[UN]SUBSCRIBE, thanks to https://github.com/ani… May 19, 2011
demos fix #3: demos now working properly Apr 13, 2011
tests [unittest] very basic test for psubscribe May 19, 2011
.gitignore adding basic packaging, .gitignore, and the ability to run tests with… May 18, 2010
LICENSE Added LICENSE, mentioned it in readme. May 17, 2010
README.md fix #7: call callbacks through context.ret_call Apr 16, 2011
redis.conf
run_nose.sh added AsyncWrapperTestCase Apr 13, 2011
setup.py Executable bit is added to setup.py Apr 12, 2011
show_coverage.py show_coverage displays quantity of already covered commands May 18, 2010

README.md

brükva

Asynchronous Redis client that works within Tornado IO loop.

Usage

Input:

import logging
logging.basicConfig()
import brukva
c = brukva.Client()
c.connect()
loop = c.connection._stream.io_loop
def on_result(result):
    print result
c.set('foo', 'bar', on_result)
c.get('foo', on_result)
c.hgetall('foo', [on_result, lambda r: loop.stop()])
loop.start() # start tornado mainloop

Output:

True
bar
ERROR:brukva.client:ResponseError (on HGETALL [('foo',), {}]): Operation against a key holding the wrong kind of value
ResponseError (on HGETALL [('foo',), {}]): Operation against a key holding the wrong kind of value

Tips on testing

Run redis-server on localhost:6379 with option "timeout 1". Run tests with the following command:

./run_nose.sh

Credits

brukva is developed and maintained by Konstantin Merenkov

License

See LICENSE file. Long story short: WTFPL v2