https://github.com/SpotlightKid/picoredis
I tested it on the esp8266 and unix port and on CPython 2/3 and PyPy 2/3. Python 2 support is accidental and not guaranteed, though.
On my ESP8266 board running the latest Git version of MicroPython, importing the pre-compiled `picoredis.mpy` module, uses up about 3800 bytes of memory. A Redis instance will use a further ~750 bytes when created and dynamically allocate more memory when parsing responses from the Redis server (which can get quite big), but this memory should be collected by the GC again after the response has been returned.
Code: Select all
MicroPython v1.9.3-55-g4ffe3e7b on 2017-11-26; ESP module with ESP8266
Type "help()" for more information.
>>>
>>> import gc; gc.collect()
>>> gc.mem_free()
29120
>>> from picoredis import Redis
>>> gc.mem_free()
25296
>>> 29120 - 25296
3824
>>> redis = Redis('192.168.1.100')
>>> gc.mem_free()
24544
>>> redis.ping('hello world')
b'hello world'
>>> gc.mem_free()
24816
Share & Enjoy!