## It only took me 22 days to figure out ... ## This was my issue: https://github.com/steemit/steem-python/issues/9 In the [commit.py](https://github.com/steemit/steem-python/blob/452b6423aaae3428781628c02eec0eaf6af564e2/steem/commit.py#L214) it says: ``` For example, if we would like to split rewards between account1 and account2: beneficiaries = [ {'account': 'account1', 'weight': 5000}, {'account': 'account2', 'weight': 5000} ] ``` ### And that **doesn't work** and it was driving me crazy. # This worked: ## ``` beneficiaries = [ OrderedDict('account': 'account1', 'weight': 5000), OrderedDict('account': 'account2', 'weight': 5000) ] ``` ## ( You need ```from collections import OrderedDict``` ) Now you can make a post with the ```beneficiaries``` argument. I almost put a 100 SBD bounty on solving this issue. For my report with @deutschbot, I use it like this: # ``` bene_list = [] bene_weight = 10000 // len(mentioned_authors) bene_rest = 10000 - (bene_weight * len(mentioned_authors)) for author in mentioned_authors: bene_dict = OrderedDict() bene_dict['account'] = author bene_dict['weight'] = bene_weight if author == report_author: bene_dict['weight'] = bene_weight + bene_rest bene_list.append(bene_dict) ``` ## ### Now you can ## ``` steem.post( title = 'My funky title', body = beautiful_post, author = 'beststeemitaccountever111', tags = ['such', 'code', 'much', 'win'] beneficiaries = bene_list) ``` ##
author | felixxx |
---|---|
permlink | hot-to-set-beneficiaries-with-steem-python |
category | steemdev |
json_metadata | {"tags":["steemdev","steem-python","python","code"],"links":["https://github.com/steemit/steem-python/issues/9","https://github.com/steemit/steem-python/blob/452b6423aaae3428781628c02eec0eaf6af564e2/steem/commit.py#L214"],"app":"steemit/0.1","format":"markdown","users":["deutschbot"]} |
created | 2017-06-23 19:31:24 |
last_update | 2017-06-24 06:58:21 |
depth | 0 |
children | 10 |
last_payout | 2017-06-30 19:31:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 55.052 HBD |
curator_payout_value | 14.505 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 1,625 |
author_reputation | 214,898,450,825,704 |
root_title | "How to set beneficiaries with steem-python" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 5,813,405 |
net_rshares | 5,915,327,106,971 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
pharesim | 0 | 103,935,030,420 | 0.32% | ||
boy | 0 | 645,450,697 | 100% | ||
bue-witness | 0 | 787,018,124 | 100% | ||
bunny | 0 | 107,336,230 | 100% | ||
bue | 0 | 13,237,034,895 | 100% | ||
mini | 0 | 344,982,684 | 100% | ||
healthcare | 0 | 128,564,546 | 100% | ||
daniel.pan | 0 | 203,392,126 | 100% | ||
helen.tan | 0 | 54,362,990 | 100% | ||
cryptofunk | 0 | 2,229,958,675 | 8% | ||
skapaneas | 0 | 113,707,830,421 | 100% | ||
fabio | 0 | 62,352,161,256 | 16% | ||
redpalestino | 0 | 397,478,814,790 | 50% | ||
ausbitbank | 0 | 2,427,354,559,052 | 21% | ||
jesta | 0 | 17,581,935,356 | 1% | ||
rouketas | 0 | 3,120,587,339 | 100% | ||
opheliafu | 0 | 13,809,643,659 | 2% | ||
ubg | 0 | 403,904,827 | 100% | ||
ace108 | 0 | 0 | 19% | ||
bullionstackers | 0 | 5,005,088,422 | 1% | ||
uwe69 | 0 | 909,642,234 | 100% | ||
shortcut | 0 | 48,530,462,995 | 25% | ||
ap2002 | 0 | 52,105,486 | 100% | ||
craigslist | 0 | 86,992,889 | 100% | ||
dumar022 | 0 | 17,058,667,384 | 15% | ||
twinner | 0 | 1,454,456,744,695 | 25% | ||
elena000 | 0 | 167,390,083 | 100% | ||
herbertmueller | 0 | 1,744,875,912 | 100% | ||
sc-steemit | 0 | 2,151,774,191 | 15% | ||
gammagooblin | 0 | 4,696,702,978 | 100% | ||
neptun | 0 | 1,682,835,609 | 100% | ||
nang1 | 0 | 461,923,959 | 100% | ||
andrewawerdna | 0 | 16,880,666,262 | 100% | ||
sumiiit | 0 | 3,894,943,387 | 100% | ||
englishtchrivy | 0 | 93,530,012,800 | 25% | ||
runridefly | 0 | 5,263,631,482 | 1% | ||
pollux.one | 0 | 405,590,005,794 | 100% | ||
penguinpablo | 0 | 220,261,921,345 | 20% | ||
richardjuckes | 0 | 43,745,682,426 | 100% | ||
allyouneedtoknow | 0 | 4,909,508,633 | 12.6% | ||
saamychristen | 0 | 14,848,332,739 | 50% | ||
nelyp | 0 | 7,664,994,955 | 16% | ||
ocrdu | 0 | 4,304,992,993 | 10% | ||
koskl | 0 | 4,214,630,240 | 100% | ||
rishi556 | 0 | 1,255,765,422 | 100% | ||
freiheit50 | 0 | 24,560,619,418 | 100% | ||
dek | 0 | 2,458,221,024 | 10% | ||
jaki01 | 0 | 108,314,239,972 | 5% | ||
unityofmulti | 0 | 2,005,167,720 | 25% | ||
cosmicfontaint | 0 | 347,751,612 | 100% | ||
schererf | 0 | 31,867,019,627 | 25% | ||
trans-juanmi | 0 | 5,395,490,824 | 15% | ||
steemer0815 | 0 | 632,295,589 | 100% | ||
jumowa | 0 | 1,590,055,961 | 5% | ||
cardboard | 0 | 1,050,918,870 | 100% | ||
juliosalas | 0 | 5,071,321,543 | 100% | ||
exanime15 | 0 | 2,838,583,679 | 100% | ||
darth-azrael | 0 | 996,800,530 | 3% | ||
kobold-djawa | 0 | 830,408,454 | 1% | ||
eem | 0 | 59,063,866 | 4% | ||
schamangerbert | 0 | 52,826,629,452 | 25% | ||
con-dom | 0 | 2,730,824,804 | 100% | ||
darth-cryptic | 0 | 148,376,045 | 3% | ||
sawang | 0 | 82,702,810 | 100% | ||
buzzbeergeek | 0 | 35,572,361,639 | 100% | ||
rcecelja2503 | 0 | 1,215,936,518 | 100% | ||
pepe.maya | 0 | 952,653,936 | 10% | ||
aismor | 0 | 348,931,099 | 100% | ||
dakashin | 0 | 4,596,903,064 | 100% | ||
velimir | 0 | 16,281,996,209 | 100% | ||
thatgermandude | 0 | 46,570,607,663 | 100% | ||
flatrider | 0 | 228,612,769 | 100% | ||
schlees | 0 | 1,863,787,859 | 100% | ||
steemchiller | 0 | 4,487,780,609 | 100% | ||
rondonson | 0 | 5,537,323,242 | 100% | ||
austrobot | 0 | 604,956,108 | 100% | ||
flurgx | 0 | 21,471,355,679 | 55% | ||
howie | 0 | 391,813,199 | 100% | ||
dsego | 0 | 9,010,607,938 | 100% | ||
nu-art-fidelity | 0 | 406,245,680 | 100% | ||
bobfromsales | 0 | 1,125,878,558 | 100% | ||
no0balot | 0 | 0 | 100% |
You say you are not an advanced developer, I disagree! :]
author | cryptofunk |
---|---|
permlink | re-felixxx-hot-to-set-beneficiaries-with-steem-python-20170623t221223572z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"app":"steemit/0.1"} |
created | 2017-06-23 22:12:24 |
last_update | 2017-06-23 22:12:24 |
depth | 1 |
children | 1 |
last_payout | 2017-06-30 22:12:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.032 HBD |
curator_payout_value | 0.008 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 57 |
author_reputation | 22,006,702,786,195 |
root_title | "How to set beneficiaries with steem-python" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 5,830,715 |
net_rshares | 3,689,313,478 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
felixxx | 0 | 3,689,313,478 | 1% |
Nah, I'm a noob.
author | felixxx |
---|---|
permlink | re-cryptofunk-re-felixxx-hot-to-set-beneficiaries-with-steem-python-20170623t224003224z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"app":"steemit/0.1"} |
created | 2017-06-23 22:40:03 |
last_update | 2017-06-23 22:40:03 |
depth | 2 |
children | 0 |
last_payout | 2017-06-30 22:40: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 | 16 |
author_reputation | 214,898,450,825,704 |
root_title | "How to set beneficiaries with steem-python" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 5,833,325 |
net_rshares | 0 |
Versteh leider nur Bahnhof, bin halt kein Programmierer, dir scheints aber zu taugen :-D
author | flurgx |
---|---|
permlink | re-felixxx-hot-to-set-beneficiaries-with-steem-python-20170623t210520508z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"app":"steemit/0.1"} |
created | 2017-06-23 21:05:24 |
last_update | 2017-06-23 21:05:24 |
depth | 1 |
children | 0 |
last_payout | 2017-06-30 21:05:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.030 HBD |
curator_payout_value | 0.010 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 88 |
author_reputation | 11,309,016,996,281 |
root_title | "How to set beneficiaries with steem-python" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 5,823,583 |
net_rshares | 3,689,313,478 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
felixxx | 0 | 3,689,313,478 | 1% |
Ugh, I've run into headaches like this in the past, and they can be frustrating! Hopefully steem-python will get first-class support for that at some point.
author | jesta | ||||||
---|---|---|---|---|---|---|---|
permlink | re-felixxx-hot-to-set-beneficiaries-with-steem-python-2017623t183834371z | ||||||
category | steemdev | ||||||
json_metadata | {"app":"chainbb/0.2","format":"markdown+html","tags":[]} | ||||||
created | 2017-06-23 22:38:33 | ||||||
last_update | 2017-06-23 22:38:33 | ||||||
depth | 1 | ||||||
children | 0 | ||||||
last_payout | 2017-06-30 22:38:33 | ||||||
cashout_time | 1969-12-31 23:59:59 | ||||||
total_payout_value | 1.418 HBD | ||||||
curator_payout_value | 0.372 HBD | ||||||
pending_payout_value | 0.000 HBD | ||||||
promoted | 0.000 HBD | ||||||
body_length | 158 | ||||||
author_reputation | 140,605,453,893,072 | ||||||
root_title | "How to set beneficiaries with steem-python" | ||||||
beneficiaries |
| ||||||
max_accepted_payout | 1,000,000.000 HBD | ||||||
percent_hbd | 10,000 | ||||||
post_id | 5,833,194 | ||||||
net_rshares | 175,005,315,504 | ||||||
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
ausbitbank | 0 | 161,823,637,270 | 1% | ||
jesta | 0 | 8,791,006,380 | 0.05% | ||
felixxx | 0 | 3,689,313,478 | 1% | ||
allyouneedtoknow | 0 | 701,358,376 | 0.6% |
Wo kann ein Programmnixkapierer nachlesen, was hier gemeint ist?
author | jumowa |
---|---|
permlink | re-felixxx-hot-to-set-beneficiaries-with-steem-python-20170629t182934660z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"app":"steemit/0.1"} |
created | 2017-06-29 18:29:36 |
last_update | 2017-06-29 18:29:42 |
depth | 1 |
children | 1 |
last_payout | 2017-07-06 18:29: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 | 64 |
author_reputation | 33,607,268,748,503 |
root_title | "How to set beneficiaries with steem-python" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 6,659,529 |
net_rshares | 0 |
Ich wΓΌsste nicht wo ...
author | felixxx |
---|---|
permlink | re-jumowa-re-felixxx-hot-to-set-beneficiaries-with-steem-python-20170629t183202614z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"app":"steemit/0.1"} |
created | 2017-06-29 18:32:00 |
last_update | 2017-06-29 18:32:00 |
depth | 2 |
children | 0 |
last_payout | 2017-07-06 18:32:00 |
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 | 23 |
author_reputation | 214,898,450,825,704 |
root_title | "How to set beneficiaries with steem-python" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 6,659,806 |
net_rshares | 0 |
Great work! I still have not gained experience in programming the steemit API but I think it's really time to start...
author | schererf |
---|---|
permlink | re-felixxx-hot-to-set-beneficiaries-with-steem-python-20170626t080440332z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"app":"steemit/0.1"} |
created | 2017-06-26 08:04:39 |
last_update | 2017-06-26 08:04:39 |
depth | 1 |
children | 0 |
last_payout | 2017-07-03 08:04:39 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.304 HBD |
curator_payout_value | 0.003 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 118 |
author_reputation | 26,658,463,264,121 |
root_title | "How to set beneficiaries with steem-python" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 6,149,788 |
net_rshares | 31,628,552,606 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
felixxx | 0 | 31,628,552,606 | 10% |
great going!!
author | sumiiit |
---|---|
permlink | re-felixxx-hot-to-set-beneficiaries-with-steem-python-20170624t075747002z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"app":"steemit/0.1"} |
created | 2017-06-24 07:57:27 |
last_update | 2017-06-24 07:57:27 |
depth | 1 |
children | 0 |
last_payout | 2017-07-01 07:57: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 | 13 |
author_reputation | 91,303,667,510 |
root_title | "How to set beneficiaries with steem-python" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 5,880,253 |
net_rshares | 0 |
I loved this notes and your profile picture, I also wanted to play like that with the default image, very inspiring!
author | troof |
---|---|
permlink | re-felixxx-hot-to-set-beneficiaries-with-steem-python-20170624t061351238z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"app":"steemit/0.1"} |
created | 2017-06-24 06:13:57 |
last_update | 2017-06-24 06:13:57 |
depth | 1 |
children | 1 |
last_payout | 2017-07-01 06:13:57 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.030 HBD |
curator_payout_value | 0.008 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 116 |
author_reputation | 88,002,672,556 |
root_title | "How to set beneficiaries with steem-python" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 5,871,186 |
net_rshares | 3,690,553,999 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
felixxx | 0 | 3,690,553,999 | 1% |
I'm kinda proud of my profile picture :D
author | felixxx |
---|---|
permlink | re-troof-re-felixxx-hot-to-set-beneficiaries-with-steem-python-20170624t072756399z |
category | steemdev |
json_metadata | {"tags":["steemdev"],"app":"steemit/0.1"} |
created | 2017-06-24 07:27:54 |
last_update | 2017-06-24 07:27:54 |
depth | 2 |
children | 0 |
last_payout | 2017-07-01 07:27:54 |
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 | 40 |
author_reputation | 214,898,450,825,704 |
root_title | "How to set beneficiaries with steem-python" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 5,877,678 |
net_rshares | 0 |