Skip to content

ereOn/redis-lua

Repository files navigation

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.

About

Helpers to work with LUA script more easily in Redis

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages