bhive.instance module¶
Bases:
object
Singelton for the Hive Instance
-
bhive.instance.
clear_cache
()¶ Clear Caches
This allows to set a config that will be used when calling
shared_hive_instance
and allows to define the configuration without requiring to actually create an instance
This method allows us to override default hive instance for all users of
SharedInstance.instance
.- Parameters
hive_instance (Hive) – Hive instance
This method will initialize
SharedInstance.instance
and return it. The purpose of this method is to have offer single default hive instance that can be reused by multiple classes.from bhive.account import Account from bhive.instance import shared_hive_instance account = Account("test") # is equivalent with account = Account("test", hive_instance=shared_hive_instance())