You are viewing a single comment's thread from:

RE: Sending Multiple Payments in a Single Transaction

in #steem8 years ago

Here is a quick and dirty way: You could use dict comprehension to set a 'to' field from a list. I assume the other fields are the same for all payouts, then you can do something like:

list_of_recipients = ['user1', 'user2', 'user3']
transaction_template = {'from':'user0', ... }

transactions = [transactions.Transfer(**{**transaction_template, 'to': x}) for x in list_of_recipients]
Sort:  

Awesome I'll give it a try, thank you.
Gave you a witness vote :)

Coin Marketplace

STEEM 0.17
TRX 0.15
JST 0.028
BTC 58130.32
ETH 2361.48
USDT 1.00
SBD 2.38