Skip to content
Snippets Groups Projects
  • Holger's avatar
    3d632e19
    Improved chain detection · 3d632e19
    Holger authored
    * Improve chain detection (Steem chain detection fixed and preparing for Hive HF24)
    * Add authored_by and description fields in YAMLM header
    * Improve doc
    * beempy post image upload includes the markdown file path now
    3d632e19
    History
    Improved chain detection
    Holger authored
    * Improve chain detection (Steem chain detection fixed and preparing for Hive HF24)
    * Add authored_by and description fields in YAMLM header
    * Improve doc
    * beempy post image upload includes the markdown file path now
quickstart.rst 6.20 KiB

Quickstart

Hive/Steem blockchain

Nodes for using beem with the Hive blockchain can be set by the command line tool with:

beempy updatenodes --hive

Nodes for the Hive blockchain are set with

beempy updatenodes

Hive nodes can be set in a python script with

from beem import Hive
from beem.nodelist import NodeList
nodelist = NodeList()
nodelist.update_nodes()
nodes = nodelist.get_hive_nodes()
hive = Hive(node=nodes)
print(hive.is_hive)

Steem nodes can be set in a python script with

from beem import Steem
from beem.nodelist import NodeList
nodelist = NodeList()
nodelist.update_nodes()
nodes = nodelist.get_steem_nodes()
hive = Steem(node=nodes)
print(hive.is_hive)

Hive

The hive object is the connection to the Hive blockchain. By creating this object different options can be set.

Note

All init methods of beem classes can be given the blockchain_instance= parameter to assure that all objects use the same steem object. When the blockchain_instance= parameter is not used, the steem object is taken from get_shared_blockchain_instance().

:func:`beem.instance.shared_blockchain_instance` returns a global instance of steem. It can be set by :func:`beem.instance.set_shared_blockchain_instance` otherwise it is created on the first call.

from beem import Hive
from beem.account import Account
hive = Hive()
account = Account("test", blockchain_instance=hive)
from beem import Hive
from beem.account import Account
from beem.instance import set_shared_blockchain_instance
hive = Hive()
set_shared_blockchain_instance(hive)
account = Account("test")

Wallet and Keys

Each account has the following keys: