Quick Python SBD Sender

Words
96
Reading
1 min
Listen
Play
8y

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:

Captura de pantalla 2018-04-23 a la(s) 16.22.49.png

Head over to your account history and you should see the transfer:

Captura de pantalla 2018-04-23 a la(s) 16.26.47.png

Let me know what you think and make sure the check out my other scripts here:

https://github.com/PixelNoob/python-steem

Quick Python SBD Sender | Ecency