You are viewing a single comment's thread from:RE: HIVE上使用steem-python的一些尝试 (上)View the full contextView the direct parentoflyhigh (85)in #cn • 5 years ago steempy set nodes https://xxxxx
我问题没问清楚,我说的不是在命令行更改默认的节点,而是在Python程序中指定,这样就可以指添加一句话指定hive的节点,来运行之前在Steem上运行的程序了。
我又试了一下,能够正常运行hivepy了:https://hive.blog/cn/@aafeng/hive-hivepy
这样:
node = 'https://anyx.io' hive=Hive(nodes=node)
举个查询账户余额的例子:
from hive.account import Account from hive import Hive node = 'https://anyx.io' hive=Hive(nodes=node) acc=Account("fishaa",hived_instance=hive) banner=acc.get_balances() print(banner)
抱歉,以为你是问hivepy,beem是这样:
from beem.steem import Steem from beem.account import Account nodes = 'https://api.steemit.com' s=Steem(node=nodes) acc = Account(player,steem_instance=s)
谢谢啦