create account

Python-Steem Example: Your Curation Highscore by felixxx

View this thread on: hive.blogpeakd.comecency.com
· @felixxx ·
$0.51
Python-Steem Example: Your Curation Highscore
The new Python-Steem 0.4 is out, but I think it could use more examples.
As I try out the new functions, I thought it would be helpful, to post some working code.

This script uses the classes _Account_ and _Amount_ that were part oft steemtools by @furion.

The longest part was to build the url.

# Code

    from steem import Steem
    steem = Steem(node="wss://node.steem.ws") #temporary fix (usually: wss://this.piston.rocks )
    from steem.account import Account
    from steem.amount import Amount

    account = Account("felixxx")

    best = 0

    for event in account.history(filter_by='curation_reward'): 
        reward = account.converter.vests_to_sp(Amount(event['reward']).amount)
        if reward > best:
            best = reward
            link = ("https://steemit.com/tag/@" + event['comment_author'] + '/' + event['comment_permlink'])

    print('\nYour curation-highscore: ' + str(best) + ' SP\nfor ' + link +'\n')
___

## Just replace _felixxx_ with your account name and run.

___

# Result*
http://i.imgur.com/kuaiRkN.png

<sub>*The curation reward shown in Steem Power might be slightly wrong, since the script uses the reward VEST values</sub>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 62 others
properties (23)
authorfelixxx
permlinkpython-steem-example-your-curation-highscore
categorypython-steem
json_metadata{"tags":["python-steem","python","steem","howto"],"users":["furion"],"image":["http://i.imgur.com/kuaiRkN.png"],"app":"steemit/0.1","format":"markdown"}
created2017-01-23 14:55:06
last_update2017-01-23 14:55:06
depth0
children7
last_payout2017-02-23 15:26:39
cashout_time1969-12-31 23:59:59
total_payout_value0.455 HBD
curator_payout_value0.058 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,173
author_reputation215,984,148,000,556
root_title"Python-Steem Example: Your Curation Highscore"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id2,321,308
net_rshares7,392,037,814,980
author_curate_reward""
vote details (126)
@germansailor ·
Upvote und resteemd
👍  
properties (23)
authorgermansailor
permlinkre-felixxx-python-steem-example-your-curation-highscore-20170123t152333422z
categorypython-steem
json_metadata{"tags":["python-steem"],"app":"steemit/0.1"}
created2017-01-23 15:23:39
last_update2017-01-23 15:23:39
depth1
children1
last_payout2017-02-23 15:26:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length19
author_reputation119,934,813,620,574
root_title"Python-Steem Example: Your Curation Highscore"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,321,486
net_rshares66,085,162,778
author_curate_reward""
vote details (1)
@felixxx ·
Danke :)
👍  
properties (23)
authorfelixxx
permlinkre-germansailor-re-felixxx-python-steem-example-your-curation-highscore-20170123t160429516z
categorypython-steem
json_metadata{"tags":["python-steem"],"app":"steemit/0.1"}
created2017-01-23 16:04:27
last_update2017-01-23 16:04:27
depth2
children0
last_payout2017-02-23 15:26:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length8
author_reputation215,984,148,000,556
root_title"Python-Steem Example: Your Curation Highscore"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,321,789
net_rshares2,789,685,125
author_curate_reward""
vote details (1)
@majes ·
Did you ever find a golos API ?
properties (22)
authormajes
permlinkre-felixxx-python-steem-example-your-curation-highscore-20170123t145626707z
categorypython-steem
json_metadata{"tags":["python-steem"],"app":"steemit/0.1"}
created2017-01-23 14:56:27
last_update2017-01-23 14:56:27
depth1
children2
last_payout2017-02-23 15:26:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length31
author_reputation132,839,043,973,673
root_title"Python-Steem Example: Your Curation Highscore"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,321,313
net_rshares0
@felixxx ·
i didn't even register for golos ...
properties (22)
authorfelixxx
permlinkre-majes-re-felixxx-python-steem-example-your-curation-highscore-20170123t150429589z
categorypython-steem
json_metadata{"tags":["python-steem"],"app":"steemit/0.1"}
created2017-01-23 15:04:27
last_update2017-01-23 15:04:27
depth2
children1
last_payout2017-02-23 15:26:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length36
author_reputation215,984,148,000,556
root_title"Python-Steem Example: Your Curation Highscore"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,321,373
net_rshares0
@majes ·
Ah, ok sorry i thought you were working on something for golos. I must have been mistaken :)
properties (22)
authormajes
permlinkre-felixxx-re-majes-re-felixxx-python-steem-example-your-curation-highscore-20170123t150527432z
categorypython-steem
json_metadata{"tags":["python-steem"],"app":"steemit/0.1"}
created2017-01-23 15:05:27
last_update2017-01-23 15:05:27
depth3
children0
last_payout2017-02-23 15:26:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length92
author_reputation132,839,043,973,673
root_title"Python-Steem Example: Your Curation Highscore"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,321,382
net_rshares0
@shortcut ·
Thanks!
`Your curation-highscore: 1.0266766921192612 SP
for https://steemit.com/tag/@steemvoter/steemvoter-open-sourcing-python-components-and-browser-compatibility-updates`
👍  
properties (23)
authorshortcut
permlinkre-felixxx-python-steem-example-your-curation-highscore-20170123t161511875z
categorypython-steem
json_metadata{"tags":["python-steem"],"app":"steemit/0.1"}
created2017-01-23 16:15:12
last_update2017-01-23 16:15:12
depth1
children0
last_payout2017-02-23 15:26:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length173
author_reputation147,160,908,051,729
root_title"Python-Steem Example: Your Curation Highscore"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,321,889
net_rshares64,736,485,987
author_curate_reward""
vote details (1)
@steevc ·
I just got python-steem installed on my Ubuntu. Needed a few other things, but it's working now. My best curation was 0.56 SP :)
👍  
properties (23)
authorsteevc
permlinkre-felixxx-python-steem-example-your-curation-highscore-20170123t205501922z
categorypython-steem
json_metadata{"tags":["python-steem"],"app":"steemit/0.1"}
created2017-01-23 20:55:00
last_update2017-01-23 20:55:00
depth1
children0
last_payout2017-02-23 15:26:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length128
author_reputation1,376,597,250,890,962
root_title"Python-Steem Example: Your Curation Highscore"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,324,033
net_rshares63,389,936,292
author_curate_reward""
vote details (1)