Using pipelines

Redis pipelines can be implemented very easily with redis-py.

Let's create another file RedisPipelineDemo.py:

In this example, we will get a list that contains the responses of the SET, SADD, GET, and SCARD commands respectively:

[True, 0, 'myvalue', 2] 

Get Redis 4.x Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.