This is meant as the first part to a series of tutorials.
The goal is to produce a hands-on guide for people who want to jump straight into developing tools for STEEM.
In this part, I will try to guide you through the process of installing beem.
beem is a Python library for STEEM and is based on steem-python, which is based on piston-lib.
While steem-python is the official lib, I chose beem, because it is updated more frequently. ( At this time, the last update to steem-python is 9 months old)
While it is possible to install Python and beem on Windows, I will start by setting up a virtual machine, which I will install Linux on.
In my opinion, this has multiple benefits, the main one being that it will encapsulate your development environment; Whatever abomination you code up, it will not be able to wreck your main operating system - In the worst case, you can stop the virtual machine and start it again.
I believe this method to be the easiest for most people.
If you want to install beem on a different system, this is not the right guide for you. If you can figure it out on your own, you can jump a chapter ahead.
There is a free version of VMware, which is ideal for our purposes:
Make sure to download the Workstation Player, as only that is free to use.
Install this, make sure to uncheck the regular updates nonsense.
I will go with Ubuntu 18.04.3 LTS, as that seems to be the most popular choice at the moment.
Open VMware, create a new virtual machine using a Ubuntu 18.04.3 LTS image.
- 10 GB HDD, 2 GB RAM is enough, perhaps less
- You do not need VMware tools
- Set a password. I bricked my first Linux ever, by trying to set it up with a blank password.
It does not have to be especially secure.
If you are new to Linux - don't panic ! I don't get it either.
Before doing anything, remove Amazon from you 'Favourites' menu.
If your keyboard layout is not English, you need to go to 'Region and Languages' and add a new keyboard layout, which makes no sense, and is very confusing.
topens a new terminal.
sudo apt-get update
Apparently, this will update your system.
It is always recommended. Once you have a running bot for STEEM, this might completely ruin your day, though.
ctrl+v do not work like they do in Windows.
This is just to confuse everybody.
sudo apt-get install build-essential libssl-dev python-dev
sudo apt install python3-pip
sudo pip3 install beem
The easiest way to test, if it went right, is to:
beempy is a wallet that is built on beem.
If you see a list of help topics, you have successfully set up beem.
To test your first own script, create a new file:
This will open a text editor.
from beem.blockchain import Blockchain blockchain = Blockchain() print(blockchain.get_current_block_num())
paste the above 3 lines of code and save the file.
This will execute your script and should print the current head-block number on your screen.
If it did not work as intended, comment below.