Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Internet > HTTP (WWW)

    redis-completion 0.4.0

    Download button

    No screenshots available
    Downloads: 116  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Charles Leifer | More programs
    MIT/X Consortium Lic... / FREE
    September 19th, 2012, 16:56 GMT
    ROOT / Internet / HTTP (WWW)

     Read user reviews (0)  Refer to a friend  Subscribe

    redis-completion description

    Autocomplete with redis

    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/1966188

    Usage

    If you just want to store really simple things, like strings:

    engine = RedisEngine()
    titles = ['python programming', 'programming c', 'unit testing python',
     'testing software', 'software design']
    map(engine.store, titles)

    >>> engine.search('pyt')
    ['python programming', 'unit testing python']

    >>> engine.search('test')
    ['testing software', 'unit testing python']


    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')
    [{'published': True, 'title': 'an entry about python', 'url': '/blog/1/'},
     {'published': False, 'title': 'using redis with python', 'url': '/blog/3/'}]

    # just published entries, please
    >>> engine.search_json('redis', filters=[lambda i: i['published'] == True])
    [{u'published': True, u'title': u'all about redis', u'url': u'/blog/2/'}]


    Installing

    Install with pip:

    pip install redis-completion

    Install via git:

    git clone https://github.com/coleifer/redis-completion.git
    cd redis-completion
    python setup.py install



    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    redis completion | redis autocomplete | redis | completion | autocomplete

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM