sripathikrishnan/redis-rdb-tools — pull request #49 by ilogik (2014-09-15 11:14:43+00:00)
Title: added parse_stream method that parses file-like objects

I moved most of the code from the parse method in the parser to a new method parse_stream, which takes a file-like object as an argument.

This allows you to do something like:

parser.parse_stream(sys.stdin) #or any other file-like object

One of the reasons I wanted this, is so that I could do:

pv /var/lib/redis/dump.rdb | ./main.py

And I get a nice progress bar as the file is being processed.

It shouldn't break anything, I also added a test for this functionality.