As a series of Steem-Python scripts I have been creating, today I wanted to show you a simple code that allows you to make transfers in Python.
To start, create the python file:
sudo nano sbd_sender.py
Then paste this code inside:
# PYTHON quick SBD sender
from steem import Steem
s = Steem(
nodes=["http://rpc.buildteam.io"],
keys=["PRIV POSTING", "PRIV ACTIVE"]
)
print ("welcome to quick SBD Sender")
to = input("Please provide receiver account: ")
amount1 = input("Please provide amount to send: ")
amount = float(amount1)
memo = input("Please provide a memo (optional) or press enter to continue: ")
s.commit.transfer(
to,
amount,
"SBD",
memo= memo,
account="YOUR ACCOUNT"
)
print (amount1 + " SBD has been sent to " + to)
Make sure to change your keys and your account fields
To run the the script just type:
python3 sbd_sender.py
The result should look like this:
Head over to your account history and you should see the transfer:
Let me know what you think and make sure the check out my other scripts here: