Probeer het SCAN-commando als volgt: r = Redis(....) #redis url for user in r.scan_iter(match='userinfo_*'): print(user)