solitude module¶
-
class
solitude.
Factory
(cfg)[source]¶ Bases:
object
Create a Factory object
The Factory object can be used to create pre-configured objects from a solitude configuration dictionary.
Parameters: cfg – solitude configuration dictionary -
create_client
(endpoint=None) → ETHClient[source]¶ Create a ETHClient object, used to interact with an ethereum node.
Parameters: endpoint – if set, it overrides the Client.Endpoint setting in the configuration
-
create_linter
(add_contract_dir=False) → Linter[source]¶ Create a Linter object, used to invoke solium.
Parameters: add_contract_dir – whether to load contracts from the directory specified in Compiler.ContractDir or not
-
-
solitude.
read_config_file
(url: str) → dict[source]¶ Read a solitude configuration from YAML or JSON.
Parameters: url – URL or path of configuration; if url ends with ‘.yaml’, the configuration file is interpreted as YAML, otherwise it is assumed to be JSON. Returns: configuration dictionary