MMoSP001E- install steem python with anaconda
中文版本:MMoSP001C- Anaconda 安装 steem-python 开发环境
steem-python :It is the official Python Library of Steem, which has a bip38 encrypted wallet and a practical cli utility named 'steempy'.
'steem-python' requires Python3.5+. Here, anaconda is used to install it and provide cross platform management of Python development environment. This allows Windows developers and Linux / Mac OS developers to devote themselves to similar coding operations.
MacOS10.14 install Anaconda3-2019.10
Official address:https://repo.anaconda.com/archive/Anaconda3-2019.10-MacOSX-x86_64.sh
If the official download is slow, you can use the image of Tsinghua University:https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2019.10-MacOSX-x86_64.sh
$ cd ~
$ wget https://repo.anaconda.com/archive/Anaconda3-2019.10-MacOSX-x86_64.sh
$ bash Anaconda3-2019.10-MacOSX-x86_64.sh
$ source ~/.bash_profile
(base) ~$ python -V
(base) ~$ pip -V
ubuntu18.04 install Anaconda3-2019.10
Official address:https://repo.anaconda.com/archive/Anaconda3-2019.10-Linux-x86_64.sh
If the official download is slow, you can use the image of Tsinghua University:https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2019.10-Linux-x86_64.sh
$ cd ~
$ sudo apt-get remove python3 python3-dev python3-pip
$ sudo apt-get install libffi-dev libssl-dev make
$ wget https://repo.anaconda.com/archive/Anaconda3-2019.10-Linux-x86_64.sh
$ sh ./Anaconda3-2019.10-Linux-x86_64.sh
$ source ~/.bashrc
(base) ~$ python -V
(base) ~$ pip -V
Anaconda3 install steem-python
The default installation mode of anaconda3 will automatically enter the python development environment of anaconda3 after the user logs in.
If there is no default anaconda3 environment, you can manually enter the anaconda3 environment:(base) ~$ conda activate
Quit Anaconda3 environment:(base) ~$ conda deactivate
$ cd ~
$ conda activate
(base) ~$ conda config --add channels conda-forge
(base) ~$ conda install cryptography
(base) ~$ git clone https://github.com/steemit/steem-python
(base) ~$ cd steem-python
(base) ~$ make install
Note: package installation (pip install steem
) is error frequently
Using the cli tool 'steempy'
help:steempy --help
set API node:(base) ~$ steempy set nodes https://anyx.io,https://api.steemit.com
create wallet password:$ steempy changewalletpassphrase
add steem account key:$ steempy addkey
list accounts in wallet:$ steempy listaccounts
+-----------+---------+-----------------------------------+
| Name | Type | Available Key |
+-----------+---------+-----------------------------------+
| ddxxxxnk | active | STMxxxxxx9yyE |
| ddnbbbbnk | posting | STM87YzixbssssEyyfU |
+-----------+---------+-----------------------------------+
set wallet default account:$ steempy set default_account testdappcoder
set steem vote weight:$ steempy set default_vote_weight 88
list config:$ steempy config
----------------------------------------------+
| Key | Value |
+---------------------+-------------------------+
| nodes | https://anyx.io,https://api.steemit.com |
| default_account | testdappcoder |
| default_vote_weight | 88 |
+---------------------+-------------------+
Demo a robot to scan the latest voting data(print_live_votes.py):
from steem.blockchain import Blockchain
from steem.post import Post
blockchain = Blockchain()
stream = map(Post, blockchain.stream(filter_by=['vote']))
for vote in stream:
print('vote:',vote)
Run it:python print_live_votes.py
Results consistent with expectations:
English list:
MMoSP000E-< make money on steem-python > Preface
中文列表
#cn #hive-180932 #chinese #hive-143316
MMoSP000C-《steem-python赚钱实战教程》序言
MMoSP001C- Anaconda 安装 steem-python 开发环境
!shop
Yay!
Your post has been boosted with ESTM. Keep up the good work!
Dear reader, Install Android, iOS Mobile app or Windows, Mac, Linux Surfer app!
Learn more: https://esteem.app
Join our discord: https://discord.me/esteem