237237.. code :: python
238238
239239 >> > with r.pipeline(transaction = True ) as pipe: # Using context manager
240- >> > pipe.set(" key" , " value" )
241- >> > pipe.get(" key" )
242- >> > response = pipe.execute()
240+ ... pipe.set(" key" , " value" )
241+ ... pipe.get(" key" )
242+ ... response = pipe.execute()
243243
244244 As you see there's no need to explicitly send `MULTI/EXEC ` commands to control context start/end
245245`ClusterPipeline ` will take care of it.
@@ -252,11 +252,11 @@ More information `here <https://redis.io/docs/latest/operate/oss_and_stack/refer
252252.. code :: python
253253
254254 >> > with r.pipeline(transaction = True ) as pipe:
255- >> > pipe.set(" {tag} foo" , " bar" )
256- >> > pipe.set(" {tag} bar" , " foo" )
257- >> > pipe.get(" {tag} foo" )
258- >> > pipe.get(" {tag} bar" )
259- >> > response = pipe.execute()
255+ ... pipe.set(" {tag} foo" , " bar" )
256+ ... pipe.set(" {tag} bar" , " foo" )
257+ ... pipe.get(" {tag} foo" )
258+ ... pipe.get(" {tag} bar" )
259+ ... response = pipe.execute()
260260
261261 CAS Transactions
262262~~~~~~~~~~~~~~~~~~~~~~~~
@@ -274,12 +274,12 @@ transaction execution.
274274.. code :: python
275275
276276 >> > with r.pipeline(transaction = True ) as pipe:
277- >> > pipe.watch(" mykey" ) # Apply locking by immediately executing command
278- >> > val = pipe.get(" mykey" ) # Immediately retrieves value
279- >> > val = val + 1 # Increment value
280- >> > pipe.multi() # Starting transaction context
281- >> > pipe.set(" mykey" , val) # Command will be pipelined
282- >> > response = pipe.execute() # Returns OK or None if key was modified in the meantime
277+ ... pipe.watch(" mykey" ) # Apply locking by immediately executing command
278+ ... val = pipe.get(" mykey" ) # Immediately retrieves value
279+ ... val = val + 1 # Increment value
280+ ... pipe.multi() # Starting transaction context
281+ ... pipe.set(" mykey" , val) # Command will be pipelined
282+ ... response = pipe.execute() # Returns OK or None if key was modified in the meantime
283283
284284
285285 Publish / Subscribe
0 commit comments