THIS IS HOW I CALCULATED USING THE STEEM-PYTHON API
#1 YOU SHOULD INSTALL PYTHON IN YOUR COMPUTER
Windows
If you are running Windows on you machine, install the latest version of python.Download the executable file from here
https://www.python.org/downloads/
preferably download the python 3.6.1
Install the python executable file(.exe) in windows.
Make sure you mark this options
- install launcher for all user
- Add python 3.6 to path
After you have successfully installed python navigate to the folder where you installed python 3.6.1 e.g
C:\python3
open command prompt (CMD) and get into the python3 folder
cd python3
Now we install steem-python using pip
C:\python3>python.exe -m pip install -U steem
After it has successfully installed steem-python libraries, we are good to go.
Run python.exe in your python3 folder
C:\python3>python.exe
This will open a command line interface where you can type your code
Now we begin by importing Steem class
>>> from steem import Steem
then we can now calculate the number of user accounts in steemit by
>>> b = Steem() #creating instance of the class steem
>>> b.get_account_count() #call method get_account_count()
232,387
Ubuntu
If you run Ubuntu version 14 and above, don't worry python 3 package comes pre-installed in the operating system
but run the following command to update python3 in ubuntu
$ sudo apt-get update
$ sudo apt-get -y upgrade
after you have installed python in your computer you must install pip in your python package
$ sudo apt-get install -y python3-pip
Then we use pip to install our steem-python package
pip3 install packagename
pip3 install -U steem
After you steem-python package has installed
run python3 in terminal e.g
kibocha@kibocha-HP-Pavilion-15-Notebook-PC:~$ python3
now we can write our code
>>> b = Steem() #creating instance of the class steem
>>> b.get_account_count() # call the method get_account_count
232,387
Great and informative. I like the fact that you not only shared the stat, but how you got it using code.
Thanks
I am glad that you liked the post.
I look forward to doing more articles on how to use the steemit-python API
Thanks i really like python, it is easy to learn, with many useful custom made function ready for you to explore and also very powerful. I have been using R and python back and forth and finally find python is much better.
That makes two of us.
Python is a great language which is used in many fields. I have never used R, but I think it's something to do with data science right? @wilkinshui
Yes basically it is similar to python but with more extensive data package for data science analysis. For me both is ok because i am using them for equity and economic trend analysis and python is much easier and clearer for me.
That's great,
I also think that Python will dominate the programming ecosystem very soon, maybe it will be Java's competitor