peerplays.block module

class peerplays.block.Block(data, klass=None, space_id=1, object_id=None, lazy=False, use_cache=True, peerplays_instance=None, *args, **kwargs)

Bases: peerplays.blockchainobject.BlockchainObject

Read a single block from the chain


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 peerplays.block import Block
block = Block(1)


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().


Even though blocks never change, you freshly obtain its contents from an API with this method


Return a datatime instance for the timestamp of this block