bhive.vote module

class bhive.vote.AccountVotes(account, start=None, stop=None, lazy=False, full=False, hive_instance=None)

Bases: bhive.vote.VotesObject

Obtain a list of votes for an account Lists the last 100+ votes on the given account.

Parameters
  • account (str) – Account name

  • hive_instance (Hive) – Hive() instance to use when accesing a RPC

class bhive.vote.ActiveVotes(authorperm, lazy=False, full=False, hive_instance=None)

Bases: bhive.vote.VotesObject

Obtain a list of votes for a post

Parameters
  • authorperm (str) – authorperm link

  • hive_instance (Hive) – Hive() instance to use when accesing a RPC

class bhive.vote.Vote(voter, authorperm=None, full=False, lazy=False, hive_instance=None)

Bases: bhive.blockchainobject.BlockchainObject

Read data about a Vote in the chain

Parameters
  • authorperm (str) – perm link to post/comment

  • hive_instance (Hive) – Hive() instance to use when accesing a RPC

>>> from bhive.vote import Vote
>>> from bhive import Hive
>>> hv = Hive()
>>> v = Vote("@gtg/hive-pressure-4-need-for-speed|gandalf", hive_instance=hv)
property authorperm
property hbd
json()
property percent
refresh()
property rep
property reputation
property rshares
property time
type_id = 11
property votee
property voter
property weight
class bhive.vote.VotesObject

Bases: list

get_list(var='voter', voter=None, votee=None, start=None, stop=None, start_percent=None, stop_percent=None, sort_key='time', reverse=True)
get_sorted_list(sort_key='time', reverse=True)
printAsTable(voter=None, votee=None, start=None, stop=None, start_percent=None, stop_percent=None, sort_key='time', reverse=True, allow_refresh=True, return_str=False, **kwargs)
print_stats(return_str=False, **kwargs)