beem.witness

class beem.witness.GetWitnesses(name_list, batch_limit=100, lazy=False, full=True, blockchain_instance=None, **kwargs)

Bases: beem.witness.WitnessesObject

Obtain a list of witnesses

Parameters:
  • name_list (list) – list of witneses to fetch
  • batch_limit (int) – (optional) maximum number of witnesses to fetch per call, defaults to 100
  • steem_instance (Steem) – Steem() instance to use when accessing a RPCcreator = Witness(creator, steem_instance=self)
from beem.witness import GetWitnesses
w = GetWitnesses(["gtg", "jesta"])
print(w[0].json())
print(w[1].json())
class beem.witness.ListWitnesses(from_account='', limit=100, lazy=False, full=False, blockchain_instance=None, **kwargs)

Bases: beem.witness.WitnessesObject

List witnesses ranked by name

Parameters:
  • from_account (str) – Witness name from which the lists starts (default = “”)
  • limit (int) – Limits the number of shown witnesses (default = 100)
  • steem_instance (Steem) – Steem instance to use when accesing a RPC
>>> from beem.witness import ListWitnesses
>>> ListWitnesses(from_account="gtg", limit=100)
<ListWitnesses gtg>
class beem.witness.Witness(owner, full=False, lazy=False, blockchain_instance=None, **kwargs)

Bases: beem.blockchainobject.BlockchainObject

Read data about a witness in the chain

Parameters:
  • account_name (str) – Name of the witness
  • steem_instance (Steem) – Steem instance to use when accesing a RPC
>>> from beem.witness import Witness
>>> Witness("gtg")
<Witness gtg>
account
feed_publish(base, quote=None, account=None)

Publish a feed price as a witness.

Parameters:
  • base (float) – USD Price of STEEM in SBD (implied price)
  • quote (float) – (optional) Quote Price. Should be 1.000 (default), unless we are adjusting the feed to support the peg.
  • account (str) – (optional) the source account for the transfer if not self[“owner”]
is_active
json()
refresh()
type_id = 3
update(signing_key, url, props, account=None)

Update witness

Parameters:
  • signing_key (str) – Signing key
  • url (str) – URL
  • props (dict) – Properties
  • account (str) – (optional) witness account name

Properties::

{
    "account_creation_fee": x,
    "maximum_block_size": x,
    "sbd_interest_rate": x,
}
class beem.witness.Witnesses(lazy=False, full=True, blockchain_instance=None, **kwargs)

Bases: beem.witness.WitnessesObject

Obtain a list of active witnesses and the current schedule

Parameters:steem_instance (Steem) – Steem instance to use when accesing a RPC
>>> from beem.witness import Witnesses
>>> Witnesses()
<Witnesses >
refresh()
class beem.witness.WitnessesObject

Bases: list

get_votes_sum()
printAsTable(sort_key='votes', reverse=True, return_str=False, **kwargs)
class beem.witness.WitnessesRankedByVote(from_account='', limit=100, lazy=False, full=False, blockchain_instance=None, **kwargs)

Bases: beem.witness.WitnessesObject

Obtain a list of witnesses ranked by Vote

Parameters:
  • from_account (str) – Witness name from which the lists starts (default = “”)
  • limit (int) – Limits the number of shown witnesses (default = 100)
  • steem_instance (Steem) – Steem instance to use when accesing a RPC
>>> from beem.witness import WitnessesRankedByVote
>>> WitnessesRankedByVote(limit=100)
<WitnessesRankedByVote >
class beem.witness.WitnessesVotedByAccount(account, lazy=False, full=True, blockchain_instance=None, **kwargs)

Bases: beem.witness.WitnessesObject

Obtain a list of witnesses which have been voted by an account

Parameters:
  • account (str) – Account name
  • steem_instance (Steem) – Steem instance to use when accesing a RPC
>>> from beem.witness import WitnessesVotedByAccount
>>> WitnessesVotedByAccount("gtg")
<WitnessesVotedByAccount gtg>