How to save a list of dicts in Redis against a key using Python-redis. The following is the data structure I'm aiming for:
'browsing_history' : { 'session_key_1' : [{'image': 'image-url', 'url' : 'url', 'title' : 'test_title', 'description' : 'test_description'}, {''image': 'image-url2', 'url' : 'url2', 'title' : 'test_title2', 'description' : 'test_description2'}], 'session_key_2' : [{'image': 'image-url', 'url' : 'url', 'title' : 'test_title', 'description' : 'test_description'}, {''image': 'image-url2', 'url' : 'url2', 'title' : 'test_title2', 'description' : 'test_description2'}], }
I would like to add to the lists of sessions, as well as add new sessions, as well as extract them. How can I do this using Python-redis?
source share