我在之前写过两篇文章,一篇是《steem-python的安装和配置》,另一篇是《steemit下多用户维护同一个公共账户》,今天这篇讲下steem-python的命令行操作。
在开始之前,我们先来看下steem-python都有哪些命令操作。
在命令提示符下输入如下:
steempy-h 或 steempy--help 回车
返回如下图信息:

从上图中我们可以看出,steempy命令共包括如下(未加中文备注表示我也不清楚或没有使用过该命令):
set Set configuration
config Show local configuration
info Show basic STEEM blockchain info

changewalletpassphrase Change wallet password 修改钱包密码
listkeys List available keys in your wallet 列出你钱包里所有的key
addkey Add a new key to the wallet 添加一个新key到你的钱包
delkey Delete keys from the wallet 从钱包里删除一个key
parsewif Parse a WIF private key without importing
getkey Dump the privatekey of a pubkey from the wallet
listaccounts List available accounts in your wallet 列出你钱包里所有的信息,包括账户名称、类型和key
upvote Upvote a post 点赞帖
downvote Downvote a post 踩帖
transfer Transfer STEEM 转账STEEM
powerup Power up (vest STEEM as STEEM POWER) 将你的steem转成SP能量
powerdown Power down (start withdrawing STEEM from steem POWER) 将你的SP转成STEEM
powerdownroute Setup a powerdown route
convert Convert STEEMDollars to Steem (takes a week to settle) 将SBD转成STEEM
balance Show the balance of one more more accounts
interest Get information about interest payment
permissions Show permissions of an account 显示账户权限
allow Allow an account/key to interact with your account 添加一个账户权限到
disallow Remove allowance an account/key to interact with your account
newaccount Create a new account 创建一个新账户
importaccount Import an account using a passphrase 导入账户
updatememokey Update an account's memo key 更新账户memo key
approvewitness Approve a witnesses 赞成见证人
disapprovewitness Disapprove a witnesses 取消见证人
sign Sign a provided transaction with available and required keys 签名
broadcast broadcast a signed transaction
orderbook Obtain orderbook of the internal market
buy Buy STEEM or SBD from the internal market 从内部市场购买STEEM 或 SBD
sell Sell STEEM or SBD from the internal market 从内部市场出售STEEM 或 SBD
cancel Cancel order in the internal market 取消订单
resteem Resteem an existing post 转推帖子
follow Follow another account 关注某个账户
unfollow unfollow another account 取消关注
setprofile Set a variable in an account's profile 修改资料
delprofile Set a variable in an account's profile 删除资料
witnessupdate Change witness properties 见证人更新
witnesscreate Create a witness 创建一个新见证人
下边我们就来操作实践下。
如果我们要查看某个命令如何使用,可以在命令后边加 -h ,系统会显示该命令的详细参数操作,见下图:
比如我们现在要从先前的授权操作里取消某个账户的授权,需要用到 disallow 命令,

则我们按上边输入命令:
steempy disallow --account laodr XXX
注,XXX即 foreign_account,对应的公钥key,类似STMXXX
如果我们要点赞某个帖子,
输入命令:
steempy upvote --account laodr -- weight 80 https://steemit.com/xxx
--account 参数后跟跟使用的身份账户名,比如 laodr
--weight 参数表示点赞的能量大小,从0.1到100
最后边跟要点赞的帖子详细地址
其它功能大同小异,有兴趣的同学可以按照如上方法去实践。
改天试试这些命令!
A very nice way to teach the people through a well known language. I must appreciate your efforts on it my dearest friend @rivalhw. You have already written 02 Article on the steem-python and this one is 3rd from your side in a week.
This is really interesting stuff command-line operation of steem-python And people must go through with it. Some commands are very interesting and useful.
Thanks mate for your positive efforts for this awesome community. Keep smiling and stay blessed!
Thank you@jawad09
Always welcome my friend @rivalhw!
I like this steem-python.
Thanks my friend
增加删除授权都成功了,但是点赞不成功。
用的是小号点赞
steempy upvote --account robotq -- weight 1 https://steemit.com/steem-python/@rivalhw/5bv5lg-steem-python
正常是返回类似如下信息的

you have provided an interesting information thanks friend and succes for you I like steem- python
thanks for sharing
果断收藏!
谢谢,收藏了。正要学习steem-python
谢谢分享,收藏了...
参与茶馆才让你开始接触这些技术性的东西?那真的非常好啊。
谢谢分享