let the official steem-python be as easy to use as beem? Dynamically search for available steem API nodes by dappcoder

View this thread on steempeak.com
· @dappcoder ·
$1.95
let the official steem-python be as easy to use as beem? Dynamically search for available steem API nodes
[steem-python](https://github.com/steemit/steem-python) :is [Steem](https://steem.io) the official Python library,  has a bip38 encryption wallet and a practical cli utility(steempy).
![0.jpg](https://cdn.steemitimages.com/DQmTTwhM1fH6GcS9MYRGe33b9ApkdEMjHySNgSnN3dCGjre/0.jpg)
However, for many Chinese users, the pain is that the official steem API node is often inaccessible.

The advantage of beem is that it can automatically find the available steem API nodes. Most of the time, you don't need to worry about network access.

So how to make the official steem-python as easy to use as beem? We can also try to use the function of dynamic switching the steem API node in the steem-python program.

Dynamically switch the stem API node
-----------------------------
Demonstration program (dynamic_nodes.py):
```python
import steembase
import steem
from steem.steemd import Steemd
from steem.account import Account
from steem.blockchain import Blockchain

steemd_nodes = [
    'https://anyx.io',
    'https://steemd.minnowsupportproject.org',
    'https://rpc.esteem.app',
    'https://api.steemit.com',
    'https://api.steem.house',
    'https://gtg.steem.house:8090',
    'https://appbasetest.timcliff.com',
]
custom_instance = Steemd(nodes=steemd_nodes)

tmpAccount = Account('dappcoder', steemd_instance=custom_instance)
print('tmpAccount:', tmpAccount)
print('')
tmpBlockchain = Blockchain(mode='head', steemd_instance=custom_instance)
print('tmpBlockchain:', tmpBlockchain)
```
run it:`python dynamic_nodes.py`
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 16 others
properties (23)
post_id83,965,910
authordappcoder
permlinklet-the-official-steem-python-be-as-easy-to-use-as-beem-dynamically-search-for-available-steem-api-nodes
categoryhive-180932
json_metadata{"tags":["steem","whalepower","dblog","actnearn","neoxian","palnet","zzan","jjm","lifestyle","marlians","mediaofficials","sct","sct-cn","sct-freeboard","upfundme","lassecash","spt","cc","steemleo","liv","vi","steemstem","stem","programming"],"image":["https:\/\/cdn.steemitimages.com\/DQmTTwhM1fH6GcS9MYRGe33b9ApkdEMjHySNgSnN3dCGjre\/0.jpg"],"links":["https:\/\/github.com\/steemit\/steem-python","https:\/\/steem.io"],"app":"steemleo\/0.1","format":"markdown"}
created2020-02-01 03:38:12
last_update2020-02-01 03:38:12
depth0
children7
net_rshares7,904,315,004,415
last_payout2020-02-08 03:38:12
cashout_time1969-12-31 23:59:59
total_payout_value0.979 SBD
curator_payout_value0.970 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length1,520
author_reputation71,889,699,236,580
root_title"let the official steem-python be as easy to use as beem? Dynamically search for available steem API nodes"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (80)
@steemitboard ·
Congratulations @dappcoder! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

<table><tr><td><img src="https://steemitimages.com/60x70/http://steemitboard.com/@dappcoder/payout.png?202002010537"></td><td>You received more than 10 as payout for your posts. Your next target is to reach a total payout of 50</td></tr>
</table>

<sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@dappcoder) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=dappcoder)_</sub>
<sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub>


To support your work, I also upvoted your post!


###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes!
properties (22)
post_id83,969,602
authorsteemitboard
permlinksteemitboard-notify-dappcoder-20200201t071832000z
categoryhive-180932
json_metadata{"image":["https:\/\/steemitboard.com\/img\/notify.png"]}
created2020-02-01 07:18:30
last_update2020-02-01 07:18:30
depth1
children0
net_rshares0
last_payout2020-02-08 07:18:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length921
author_reputation38,705,954,145,809
root_title"let the official steem-python be as easy to use as beem? Dynamically search for available steem API nodes"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@chinesebi ·
$0.05
!great
!shop
👍  
properties (23)
post_id83,981,006
authorchinesebi
permlinkq515t4
categoryhive-180932
json_metadata{"app":"steemit\/0.2"}
created2020-02-01 16:00:42
last_update2020-02-01 16:00:42
depth1
children0
net_rshares278,691,989,929
last_payout2020-02-08 16:00:42
cashout_time1969-12-31 23:59:59
total_payout_value0.023 SBD
curator_payout_value0.023 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length12
author_reputation4,872,790,926,189
root_title"let the official steem-python be as easy to use as beem? Dynamically search for available steem API nodes"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@teamcn-shop ·
你好鸭,dappcoder!

@chinesebi给您叫了一份外卖!

由 @xiaoyuanwmm 村凤 在艳阳高照 骑着共享单车 给您送来
**桃酥饼** <br> ![](https://steemitimages.com/DQmfLs1oN9q6aMSKnKo76NVpGXk2QzXtT3kdW5CxEEMYrS7/IMG_3346.JPG)
吃饱了吗?跟我猜拳吧! **石头,剪刀,布~**

如果您对我的服务满意,请不要吝啬您的点赞~
@onepagex
properties (22)
post_id83,981,014
authorteamcn-shop
permlinkq515t4
categoryhive-180932
json_metadata"{"app":"teamcn-shop bot\/1.0"}"
created2020-02-01 16:00:54
last_update2020-02-01 16:00:54
depth1
children2
net_rshares0
last_payout2020-02-08 16:00:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length236
author_reputation65,900,527,192,856
root_title"let the official steem-python be as easy to use as beem? Dynamically search for available steem API nodes"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@chinesebi · (edited)
$0.05
剪刀
👍  
properties (23)
post_id83,981,636
authorchinesebi
permlinkq5171v
categoryhive-180932
json_metadata{"app":"steemit\/0.2"}
created2020-02-01 16:27:33
last_update2020-02-01 16:27:48
depth2
children1
net_rshares308,217,145,146
last_payout2020-02-08 16:27:33
cashout_time1969-12-31 23:59:59
total_payout_value0.025 SBD
curator_payout_value0.026 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length2
author_reputation4,872,790,926,189
root_title"let the official steem-python be as easy to use as beem? Dynamically search for available steem API nodes"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@teamcn-shop · (edited)
https://3.bp.blogspot.com/-5H1CgvU1VD8/WoGwGhtQe6I/AAAAAAATXJU/KY0eCFjyWT02REouDSyRz-o2Pf-Q0OEHwCLcBGAs/s1600/AW785125_21.gif 
 It’s a tie! 平局!想不到你也出鸡爪!
properties (22)
post_id83,981,640
authorteamcn-shop
permlinkq5171v
categoryhive-180932
json_metadata"{"app":"teamcn-shop bot\/1.0"}"
created2020-02-01 16:27:42
last_update2020-02-01 16:27:57
depth3
children0
net_rshares0
last_payout2020-02-08 16:27:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length152
author_reputation65,900,527,192,856
root_title"let the official steem-python be as easy to use as beem? Dynamically search for available steem API nodes"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@mzmt ·
这是为何
properties (22)
post_id84,006,554
authormzmt
permlinkq52zm3
categoryhive-180932
json_metadata{"app":"busy\/2.5.4"}
created2020-02-02 15:42:03
last_update2020-02-02 15:42:03
depth1
children1
net_rshares0
last_payout2020-02-09 15:42:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length4
author_reputation0
root_title"let the official steem-python be as easy to use as beem? Dynamically search for available steem API nodes"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@dappcoder ·
$0.03
不可描述的原因比较多.
👍  , , ,
properties (23)
post_id84,008,717
authordappcoder
permlinkq533wy
categoryhive-180932
json_metadata{"app":"busy\/2.5.4"}
created2020-02-02 17:15:12
last_update2020-02-02 17:15:12
depth2
children0
net_rshares191,829,741,169
last_payout2020-02-09 17:15:12
cashout_time1969-12-31 23:59:59
total_payout_value0.016 SBD
curator_payout_value0.015 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length11
author_reputation71,889,699,236,580
root_title"let the official steem-python be as easy to use as beem? Dynamically search for available steem API nodes"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (4)