 As mentioned elsewhere, I dipped my toes into the Steemit API using Python and an off the shelf virtual server. Several people were interested and wanted to create their own Steem bots, so for those who wanted to do the same, here is what I did. ## Installation First, as the above image shows, I bought a virtual server especially for this. That sounds expensive or maybe even wasteful, but you can get a pretty beefy machine for just $5/mo, and you will more than make that back.  (I just resized mine for free - noice) You will also need Python 3 and various libraries. @themarkymark helped me with this because somehow I kept borking it. Here is the ingredients list: * Grab [Miniconda3](https://conda.io/miniconda.html ) ```wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh``` * Install LibSSL ```sudo apt-get install libssl-dev``` * Steem ```python3 -m pip install steem``` * and optionally, bpython ```python3 -m pip install bpython``` (this enables a rich Python interface with syntax highlighting etc) ## Hello World To test everything is working, let's create a simple script that uses the Steem class. The code below will print the current SBD balance of my account :) ``` # first, we initialize Steem class from steem import Steem s = Steem() # now we can call the API to check the SBD # and output to the console print( s.get_account('makerhacks')['sbd_balance'] ) ``` Easy! The API can do lots of cool stuff, we will dig in over future tutorials. ## Make sure you follow me so you don't miss any posts. If you liked this, please upvote :)
author | makerhacks |
---|---|
permlink | getting-started-with-python-3-and-the-steemit-api |
category | python |
json_metadata | {"tags":["python","coding","programming","technology","steemit"],"users":["themarkymark"],"image":["https://steemitimages.com/DQmVDSz9fe1rCDZPwTDaTaE9Z4JcGakFoqpXoLe5SQetVTH/DigitalOcean%20-%20Droplets.png","https://steemitimages.com/DQmf81AuBxxcyYy1TT7hjS6Xg5t32AfDr9JRXzTsHjppepE/Kicking%20Off%20the%20New%20Year%20with%20New%20Droplet%20Plans.png"],"links":["https://conda.io/miniconda.html"],"app":"steemit/0.1","format":"markdown"} |
created | 2018-01-18 19:50:33 |
last_update | 2018-01-18 19:50:33 |
depth | 0 |
children | 11 |
last_payout | 2018-01-25 19:50:33 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 6.508 HBD |
curator_payout_value | 1.407 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 1,930 |
author_reputation | 156,478,962,956,499 |
root_title | "Getting Started with Python 3 and the Steemit API" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 30,467,343 |
net_rshares | 959,198,463,973 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
nicnas | 0 | 19,765,104,271 | 50% | ||
p1c2u | 0 | 605,286,229 | 100% | ||
rawpride | 0 | 12,438,281,928 | 20% | ||
veleje | 0 | 10,752,143,775 | 100% | ||
themarkymark | 0 | 115,567,700,133 | 50% | ||
makerhacks | 0 | 11,942,188,874 | 100% | ||
lextenebris | 0 | 23,924,282,232 | 100% | ||
vishalhkothari | 0 | 77,048,827 | 100% | ||
ardox | 0 | 512,645,644 | 100% | ||
ipromote | 0 | 763,613,782,060 | 27.16% |
very interesting topic. are you already using the robot and how much are you earning?
author | ardox |
---|---|
permlink | re-makerhacks-getting-started-with-python-3-and-the-steemit-api-20180118t195417164z |
category | python |
json_metadata | {"tags":["python"],"app":"steemit/0.1"} |
created | 2018-01-18 19:54:15 |
last_update | 2018-01-18 19:54:15 |
depth | 1 |
children | 2 |
last_payout | 2018-01-25 19:54:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 85 |
author_reputation | 23,087,375,172 |
root_title | "Getting Started with Python 3 and the Steemit API" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 30,467,992 |
net_rshares | 0 |
I built a tool to help me with my curated roundup posts "best of steemit", it helps me read a lot faster and find the best stuff :)
author | makerhacks |
---|---|
permlink | re-ardox-re-makerhacks-getting-started-with-python-3-and-the-steemit-api-20180118t195736352z |
category | python |
json_metadata | {"tags":["python"],"app":"steemit/0.1"} |
created | 2018-01-18 19:57:36 |
last_update | 2018-01-18 19:57:36 |
depth | 2 |
children | 1 |
last_payout | 2018-01-25 19:57:36 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 131 |
author_reputation | 156,478,962,956,499 |
root_title | "Getting Started with Python 3 and the Steemit API" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 30,468,571 |
net_rshares | 506,469,190 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
ardox | 0 | 506,469,190 | 100% |
ok thanks
author | ardox |
---|---|
permlink | re-makerhacks-re-ardox-re-makerhacks-getting-started-with-python-3-and-the-steemit-api-20180118t204305557z |
category | python |
json_metadata | {"tags":["python"],"app":"steemit/0.1"} |
created | 2018-01-18 20:43:03 |
last_update | 2018-01-18 20:43:03 |
depth | 3 |
children | 0 |
last_payout | 2018-01-25 20:43:03 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 9 |
author_reputation | 23,087,375,172 |
root_title | "Getting Started with Python 3 and the Steemit API" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 30,475,904 |
net_rshares | 0 |
i am glad you are learning steem-python. Themarkymark was a large help to me also. I have a few things built but am new to python so its a work in progress. Ill be keeping an eye out for more. I am in discord and steemit.chat if you need help, or more likely., I need help.
author | nicnas |
---|---|
permlink | re-makerhacks-getting-started-with-python-3-and-the-steemit-api-20180119t022022906z |
category | python |
json_metadata | {"tags":["python"],"app":"steemit/0.1"} |
created | 2018-01-19 02:20:27 |
last_update | 2018-01-19 02:22:06 |
depth | 1 |
children | 0 |
last_payout | 2018-01-26 02:20:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.064 HBD |
curator_payout_value | 0.021 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 273 |
author_reputation | 38,554,121,369,241 |
root_title | "Getting Started with Python 3 and the Steemit API" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 30,524,419 |
net_rshares | 10,845,885,647 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
makerhacks | 0 | 10,845,885,647 | 100% |
If you use the official steem-python you need to edit the metadata file to change the `toml` package requirement to use 0.9.3 instead of 0.9.3.1 that was removed by the third party dev. I have switched my servers to use @furion's version of steem-python which is updated more frequently and doesn't have this problem. `python3 -m pip install -U git+git://github.com/Netherdrake/steem-python` I would make sure you remove the other version before installing this one. It fixes a few issues I've been having outside of just the installation issue.
author | themarkymark |
---|---|
permlink | re-makerhacks-getting-started-with-python-3-and-the-steemit-api-20180118t195525860z |
category | python |
json_metadata | {"tags":["python"],"users":["furion"],"app":"steemit/0.1"} |
created | 2018-01-18 19:55:21 |
last_update | 2018-01-18 19:55:21 |
depth | 1 |
children | 5 |
last_payout | 2018-01-25 19:55:21 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.304 HBD |
curator_payout_value | 0.034 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 549 |
author_reputation | 1,774,088,461,856,117 |
root_title | "Getting Started with Python 3 and the Steemit API" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 30,468,168 |
net_rshares | 41,361,204,762 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
nicnas | 0 | 19,349,072,975 | 49% | ||
veleje | 0 | 10,335,324,888 | 100% | ||
makerhacks | 0 | 11,676,806,899 | 100% |
Thank you! Will do that asap :)
author | makerhacks |
---|---|
permlink | re-themarkymark-re-makerhacks-getting-started-with-python-3-and-the-steemit-api-20180118t195826914z |
category | python |
json_metadata | {"tags":["python"],"app":"steemit/0.1"} |
created | 2018-01-18 19:58:27 |
last_update | 2018-01-18 19:58:27 |
depth | 2 |
children | 3 |
last_payout | 2018-01-25 19:58:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 31 |
author_reputation | 156,478,962,956,499 |
root_title | "Getting Started with Python 3 and the Steemit API" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 30,468,705 |
net_rshares | 0 |
python3 -m pip uninstall steem python3 -m pip install -U git+git://github.com/Netherdrake/steem-python
author | makerhacks |
---|---|
permlink | re-makerhacks-re-themarkymark-re-makerhacks-getting-started-with-python-3-and-the-steemit-api-20180118t200409661z |
category | python |
json_metadata | {"tags":["python"],"app":"steemit/0.1"} |
created | 2018-01-18 20:04:09 |
last_update | 2018-01-18 20:04:09 |
depth | 3 |
children | 2 |
last_payout | 2018-01-25 20:04:09 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 102 |
author_reputation | 156,478,962,956,499 |
root_title | "Getting Started with Python 3 and the Steemit API" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 30,469,688 |
net_rshares | 0 |
Thank you, removing steem and replacing it with furion's version of steem-python helped me also, I was pulling my hair out for last few days.
author | veleje |
---|---|
permlink | re-themarkymark-re-makerhacks-getting-started-with-python-3-and-the-steemit-api-20180118t210209357z |
category | python |
json_metadata | {"tags":["python"],"app":"steemit/0.1"} |
created | 2018-01-18 21:02:09 |
last_update | 2018-01-18 21:02:09 |
depth | 2 |
children | 0 |
last_payout | 2018-01-25 21:02:09 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.064 HBD |
curator_payout_value | 0.017 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 141 |
author_reputation | 490,220,361,761 |
root_title | "Getting Started with Python 3 and the Steemit API" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 30,479,056 |
net_rshares | 10,380,111,417 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
makerhacks | 0 | 10,380,111,417 | 100% |
@makerhacks what kind of bot you are about to make plz elaborate if possible I have some ideas to share but have no time to work on Python as I am not much aware of it
author | vishalhkothari |
---|---|
permlink | re-makerhacks-getting-started-with-python-3-and-the-steemit-api-20180119t082654808z |
category | python |
json_metadata | {"tags":["python"],"users":["makerhacks"],"app":"steemit/0.1"} |
created | 2018-01-19 08:26:57 |
last_update | 2018-01-19 08:26:57 |
depth | 1 |
children | 0 |
last_payout | 2018-01-26 08:26:57 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 167 |
author_reputation | 3,418,555,827,595 |
root_title | "Getting Started with Python 3 and the Steemit API" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 30,576,466 |
net_rshares | 0 |