beem.block module¶
-
class
beem.block.
Block
(data, klass=None, space_id=1, object_id=None, lazy=False, use_cache=True, id_item=None, steem_instance=None, *args, **kwargs)¶ Bases:
beem.blockchainobject.BlockchainObject
Read a single block from the chain
Parameters: - block (int) – block number
- steem_instance (beem.steem.Steem) – Steem instance
- lazy (bool) – Use lazy loading
Instances of this class are dictionaries that come with additional methods (see below) that allow dealing with a block and it’s corresponding functions.
from beem.block import Block block = Block(1) print(block)
Note
This class comes with its own caching function to reduce the load on the API server. Instances of this class can be refreshed with
Account.refresh()
.-
ops
()¶
-
ops_statistics
(add_to_ops_stat=None)¶
-
refresh
()¶ Even though blocks never change, you freshly obtain its contents from an API with this method
-
time
()¶ Return a datatime instance for the timestamp of this block
-
class
beem.block.
BlockHeader
(data, klass=None, space_id=1, object_id=None, lazy=False, use_cache=True, id_item=None, steem_instance=None, *args, **kwargs)¶ Bases:
beem.blockchainobject.BlockchainObject
-
refresh
()¶ Even though blocks never change, you freshly obtain its contents from an API with this method
-
time
()¶ Return a datatime instance for the timestamp of this block
-