An Interest In:
Web News this Week
- March 14, 2024
- March 13, 2024
- March 12, 2024
- March 11, 2024
- March 10, 2024
- March 9, 2024
- March 8, 2024
January 30, 2022 03:48 pm GMT
Original Link: https://dev.to/vorg/pythonic-redis-77a
Pythonic Redis
pottery
Star 611 Watch 11 Fork 23
Pottery is a Pythonic way to access Redis. If you know how to use Python dicts, then you already know how to use Pottery.
Pottery is useful for accessing Redis more easily, and also for implementing microservice resilience patterns; and it has been battle tested in production at scale.
>>> from pottery import RedisList>>> tel = RedisDict({'jack': 4098, 'sape': 4139}, redis=redis, key='tel')>>> tel['guido'] = 4127>>> telRedisDict{'jack': 4098, 'sape': 4139, 'guido': 4127}>>> tel['jack']4098>>> squares = RedisList([1, 4, 9, 16, 25], redis=redis, key='squares')>>> squaresRedisList[1, 4, 9, 16, 25]>>> squares[0]1
Original Link: https://dev.to/vorg/pythonic-redis-77a
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To