beem.nodelist

class beem.nodelist.NodeList

Bases: list

Returns HIVE/STEEM nodes as list

from beem.nodelist import NodeList
n = NodeList()
nodes_urls = n.get_nodes()
get_hive_nodes(testnet=False, not_working=False, wss=True, https=True)

Returns hive only nodes as list

Parameters:
  • testnet (bool) – when True, testnet nodes are included
  • not_working (bool) – When True, all nodes including not working ones will be returned
get_nodes(hive=False, exclude_limited=False, dev=False, testnet=False, testnetdev=False, wss=True, https=True, not_working=False, normal=True, appbase=True)

Returns nodes as list

Parameters:
  • hive (bool) – When True, only HIVE nodes will be returned
  • exclude_limited (bool) – When True, limited nodes are excluded
  • dev (bool) – when True, dev nodes with version 0.19.11 are included
  • testnet (bool) – when True, testnet nodes are included
  • testnetdev (bool) – When True, testnet-dev nodes are included
  • not_working (bool) – When True, all nodes including not working ones will be returned
  • normal (bool) – deprecated
  • appbase (bool) – deprecated
get_steem_nodes(testnet=False, not_working=False, wss=True, https=True)

Returns steem only nodes as list

Parameters:
  • testnet (bool) – when True, testnet nodes are included
  • not_working (bool) – When True, all nodes including not working ones will be returned
get_testnet(testnet=True, testnetdev=False)

Returns testnet nodes

update_nodes(weights=None, steem_instance=None)

Reads metadata from fullnodeupdate and recalculates the nodes score

Parameters:weight (list, dict) – can be used to weight the different benchmarks
from beem.nodelist import NodeList
nl = NodeList()
weights = [0, 0.1, 0.2, 1]
nl.update_nodes(weights)
weights = {'block': 0.1, 'history': 0.1, 'apicall': 1, 'config': 1}
nl.update_nodes(weights)