Viewing a response to: @l0k1/a-python-script-that-streams-the-new-blocks-in-json-format-and-how-to-find-full-documentation-for-the-python-steem-library
Nifty! :) I just saw the `We can't code here` thing and I had to agree completely. :)
author | dragosroua |
---|---|
permlink | re-l0k1-a-python-script-that-streams-the-new-blocks-in-json-format-and-how-to-find-full-documentation-for-the-python-steem-library-20170308t080638416z |
category | steem |
json_metadata | {"tags":["steem"],"app":"steemit/0.1"} |
created | 2017-03-08 08:06:39 |
last_update | 2017-03-08 08:06:39 |
depth | 1 |
children | 7 |
last_payout | 2017-04-08 09:28:30 |
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 | 372,798,229,806,288 |
root_title | "A python script that streams the new blocks in JSON format - and how to find full documentation for the python steem library" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 2,670,951 |
net_rshares | 193,414,002,934 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
l0k1 | 0 | 193,414,002,934 | 100% |
I will be publishing soon the info on how to bypass piston because it is missing some vital bit of code that stops it running (and you can't set default_author with it). I dug back into my old posts and found that I had already partly worked out this problem and I have gone further now, setting a specified RPC node to connect to. The code looks like this: st = Steem ( wif = 'aoeuaoeuaoeuaoeuaoeuaoeuaoeuaoeuaoeuaoeuaoeuaoeuaoe', node = 'wss://node.steem.ws') This sets the account that it requires to have at least one set, that lets you do broadcasts (so you could use a posting key here rather than master or active, possibly even memo only for read only functions). I think it needs this for the `custom_json` function in `Steem`, I am writing a script to grab the data of the active witnesses so I can process the data in the output.
author | l0k1 |
---|---|
permlink | re-dragosroua-re-l0k1-a-python-script-that-streams-the-new-blocks-in-json-format-and-how-to-find-full-documentation-for-the-python-steem-library-20170308t085854876z |
category | steem |
json_metadata | {"tags":["steem"],"app":"steemit/0.1"} |
created | 2017-03-08 08:58:57 |
last_update | 2017-03-08 08:58:57 |
depth | 2 |
children | 6 |
last_payout | 2017-04-08 09:28:30 |
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 | 848 |
author_reputation | 94,800,257,230,993 |
root_title | "A python script that streams the new blocks in JSON format - and how to find full documentation for the python steem library" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 2,671,158 |
net_rshares | 0 |
Hmmm, I don't think it's because of Piston, in this case. If different nodes are allowing you to do different things, it must be from the nodes themselves, not from Piston. My guess is that node.steem.ws runs a broader set of APIs, possibly some related to accounts (don't have time to dig to see which plugins are related to accounts, but I know it was a discussion on github about this). That means you can set up your own Steem seed node, enable the plugins related to accounts, and interact with it instead of sending transactions to node.steem.ws (and increasing the load on it). If you configure your seed node properly it will take care of all the necessary operations, including broadcasting transactions, etc. Hope it helps.
author | dragosroua |
---|---|
permlink | re-l0k1-re-dragosroua-re-l0k1-a-python-script-that-streams-the-new-blocks-in-json-format-and-how-to-find-full-documentation-for-the-python-steem-library-20170308t092906608z |
category | steem |
json_metadata | {"tags":["steem"],"app":"steemit/0.1"} |
created | 2017-03-08 09:29:06 |
last_update | 2017-03-08 09:29:06 |
depth | 3 |
children | 5 |
last_payout | 2017-04-08 09:28:30 |
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 | 736 |
author_reputation | 372,798,229,806,288 |
root_title | "A python script that streams the new blocks in JSON format - and how to find full documentation for the python steem library" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 2,671,285 |
net_rshares | 189,528,437,001 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
l0k1 | 0 | 189,528,437,001 | 100% |
Yes, I have my own RPC and just finished pulling down from my server a snapshot that I will also be able to run on my laptop and when offline still test code that talks to it. No, there seems to be a bug in a fresh clean install of python with the steem library... the names are confusing me. It is called 'steem' now, just steem: `pip install steem`. But `piston` does not work saying it is missing an import of some exception definition. I am writing code for automating blockchain related things so the model with the piston wallet doesn't really suit my purposes, I have to create instances of the `Steem` class that define the RPC node and a key for something. I am not sure what to use but it accepts my memo key. I actually just discovered I can pull the data I am looking for with a simple curl command: curl https://node.steem.ws --data '{"id":8,"method":"get_witnesses_by_vote","params":["","100"]}' This spits forth the entire data for all 100 current witnesses in JSON format. I think the same parameter can be used with python `requests` library as well.
author | l0k1 |
---|---|
permlink | re-dragosroua-re-l0k1-re-dragosroua-re-l0k1-a-python-script-that-streams-the-new-blocks-in-json-format-and-how-to-find-full-documentation-for-the-python-steem-library-20170308t094632237z |
category | steem |
json_metadata | {"tags":["steem"],"links":["https://node.steem.ws"],"app":"steemit/0.1"} |
created | 2017-03-08 09:46:36 |
last_update | 2017-03-08 09:46:36 |
depth | 4 |
children | 4 |
last_payout | 2017-04-08 09:28:30 |
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 | 1,073 |
author_reputation | 94,800,257,230,993 |
root_title | "A python script that streams the new blocks in JSON format - and how to find full documentation for the python steem library" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 2,671,331 |
net_rshares | 0 |