A dictionary inside RedisDict
See original GitHub issueHello. Why this doesnt work and how can i get it work?
>>> from pottery import RedisDict
>>> users_dict = RedisDict(redis=redis, key='users_dict')
>>> users_dict
RedisDict{34324144: {'lastname': '', 'notification': 0, 'accesslevel': 1, 'firstname': 'First Name', 'username': 'user'}}
>>> users_dict[34324144]['accesslevel']
1
>>> users_dict[34324144]['accesslevel'] = 4
>>> users_dict[34324144]['accesslevel']
1
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
redis-dict - PyPI
redis-dict tries to make using Redis as simple as using a dictionary. redis-dict stores data in Redis with key-values, this is according to...
Read more >How to store and retrieve a dictionary with redis - Stack Overflow
If you want to store a python dict in redis, it is better to store it as json string. import json import redis...
Read more >Python Nested Dictionary (With Examples) - Programiz
In Python, a nested dictionary is a dictionary inside a dictionary. It's a collection of dictionaries into one single dictionary. nested_dict = {...
Read more >The two ways of storing nested dictionaries in Redis
The two ways of storing nested dictionaries in Redis. Short about Redis. Redis is an open-source, in-memory data structure store, used as a...
Read more >Python Nested Dictionary - GeeksforGeeks
A Dictionary in Python works similar to the Dictionary in the real world. Keys of a Dictionary must be unique and of immutable...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am using this workaround at the moment.
Hey @brainix
By the way, something I should have written earlier, thank you for your work on pottery!
I am happy to see that you like my suggestion. My use case is a RedisList inside a RedisDict and right now I am using the aforementioned workaround with re-assigning the key each time the child container is changed. So, if this gets implemented, it would let me delete a couple of lines of code.
Cheers