Python bindings for rlite. For more information about rlite, go to rlite repository
$ pip install hirlite
>>> import hirlite
>>> rlite = hirlite.Rlite()
>>> rlite.command('set', 'key', 'value')
True
>>> rlite.command('get', 'key')
'value'
>>> rlite = hirlite.Rlite(encoding='utf8')
>>> rlite.command('set', 'key', 'value')
True
>>> rlite.command('get', 'key')
u'value'
>>> rlite = hirlite.Rlite(path='mydb.rld')
>>> rlite.command('set', 'key', 'value')
True
>>> rlite = hirlite.Rlite(path='mydb.rld')
>>> rlite.command('get', 'key')
'value'
>>> subscriber = hirlite.Rlite(path='mydb.rld')
>>> subscriber.command('subscribe', 'channel', 'channel2')
['subscribe', 'channel', 1L]
>>> subscriber.command('__rlite_poll')
['subscribe', 'channel2', 2L]
>>> subscriber.command('__rlite_poll')
>>> publisher = hirlite.Rlite(path='mydb.rld')
>>> publisher.command('publish', 'channel', 'hello world')
1L
>>> subscriber.command('__rlite_poll')
['message', 'channel', 'hello world']
>>> subscriber.command('__rlite_poll')
>>>