You can establish a transaction by calling the pipeline method on the StrictRedis. Redis commands executed against the transaction are performed in a single block.
# defaults to transaction="/?originalUrl=https%3A%2F%2Friptutorial.com%2FTrue%2520tx%2520%3D%2520r.pipeline()tx.hincrbyfloat(debit_account_key%2C"balance', -amount)
tx.hincrbyfloat(credit_account_key, 'balance', amount)
tx.execute()