Skip to content

Latest commit

 

History

History
36 lines (25 loc) · 1.73 KB

README.md

File metadata and controls

36 lines (25 loc) · 1.73 KB

Build Status Coverage Status Documentation Status PyPI GitHub tag PyPi version PyPi downloads

redis-lua

redis-lua is a pure-Python library that eases usage of LUA scripts with Redis. It provides script loading and parsing abilities as well as testing primitives.

Quick start

A code sample is worth a thousand words:

from redis_lua import load_script

# Loads the 'create_foo.lua' in the 'lua' directory.
script = load_script(name='create_foo', path='lua/')

# Run the script with the specified arguments.
foo = script.get_runner(client=redis_client)(
    members={'john', 'susan', 'bob'},
    size=5,
)

This sample code simply loads a LUA script from disk and executes it on the specified Redis instance by specifying named arguments of various types. How simpler can it get ?

Check out the documentation to find out more !

Installation

Just type:

pip install redis-lua

That's it.