redis-completionAutocomplete with redis | |
Download |
redis-completion Ranking & Summary
Advertisement
- License:
- MIT/X Consortium Lic...
- Price:
- FREE
- Publisher Name:
- Charles Leifer
- Publisher web site:
- http://www.charlesleifer.com/blog/
redis-completion Tags
redis-completion Description
redis-completion is a package that provides autocompletion with redis based on:- http://antirez.com/post/autocomplete-with-redis.html- http://stackoverflow.com/questions/1958005/redis-autocomplete/1966188UsageIf you just want to store really simple things, like strings:engine = RedisEngine()titles = map(engine.store, titles)>>> engine.search('pyt')>>> engine.search('test')If you want to store more complex data, like blog entries:Entry.create(title='an entry about python', published=True)Entry.create(title='all about redis', published=True)Entry.create(title='using redis with python', published=False)for entry in Entry.select(): engine.store_json(entry.id, entry.title, { 'published': entry.published, 'title': entry.title, 'url': entry.get_absolute_url(), })>>> engine.search_json('pytho')# just published entries, please>>> engine.search_json('redis', filters= == True])InstallingInstall with pip:pip install redis-completionInstall via git:git clone https://github.com/coleifer/redis-completion.gitcd redis-completionpython setup.py installProduct's homepage
redis-completion Related Software