<repo_name>gdisneyleugers/redisshell<file_sep>/Reloader.py
__author__ = 'gregorydisney'
import RKeyClient
RKeyClient
if __name__ == '__main__':
    import RKeyClient
    RKeyClient<file_sep>/RSet.py
__author__ = 'gregorydisney'
from RedisController import RedisConnect
db = RedisConnect.r
class RedisSet:
    name = raw_input("Name: ")
    value = raw_input("Value: ")
    db.set(name,value)
    import RKeyClient
    RKeyClient
if __name__ == '__main__':
    import RKeyClient
    RKeyClient<file_sep>/RKeyClient.py
__author__ = 'gregorydisney'

while True:
    rediscmd = ['get', 'set', 'keys', 'connect', 'help', 'flush', 'reload', 'exit']
    cmd = raw_input("Redis-Shell=> ")

    def Reload(self):
        self = RKeyClient
        import Reloader
        Reloader

    if cmd == 'get':
        import RGet
        RGet.RedisGet()
        import Reloader
        Reloader


    if cmd == 'keys':
        import  RKeys
        RKeys.RedisKeys()
        import Reloader
        Reloader

    if cmd == 'connect':
        import RedisController
        RedisController.RedisConnect()
        print RedisController.RedisConnect.r
        import Reloader
        Reloader

    if cmd == 'set':
        import RSet
        RSet.RedisSet()
        import Reloader
        Reloader

    if cmd == 'exit':
        print "Exiting"
        quit()

    if cmd == 'help':
        print "Options: \n"
        print "get: Query key in DB\n"
        print "set: Set key in DB\n"
        print "keys: Show all keys in DB\n"
        print "connect: Connect to Redis DB\n"
        print "flush: Flush Redis DB"
        import Reloader
        Reloader

    if cmd == 'reload':
        print "Reloading Shell"
        import Reloader
        Reloader

    if cmd == 'flush':
        import RedisController
        db = RedisController.RedisConnect.r
        db.flushall()
        print "DB flushed"
        import Reloader
        Reloader

    if cmd not in rediscmd:
        for a in enumerate(rediscmd):
            print "Command is: " + cmd + "\n"
            print "Allowed comand: " + ''.join(str(a)) + "\n"
            import Reloader

if __name__ == '__main__':
    import RKeyClient<file_sep>/RKeys.py
__author__ = 'gregorydisney'
import redis


def pattern(self):
    pass

class RedisKeys:
            r = redis.StrictRedis()
            keys = r.keys("*")
            a = ''.join(keys)
            for i,elem in enumerate(keys):
                print elem + "\n"
if __name__ == '__main__':
    import RKeyClient<file_sep>/RedisController.py
__author__ = 'gregorydisney'
import redis

class RedisConnect:
    r = redis.StrictRedis()
<file_sep>/RGet.py
__author__ = 'gregorydisney'
from RedisController import RedisConnect
db = RedisConnect.r

class RedisGet:
        n = raw_input("Name: ")
        a = db.get(n)
        print a

if __name__ == '__main__':
    import RKeyClient