Skip to content

Latest commit

 

History

History
179 lines (103 loc) · 6.17 KB

api-brownie.rst

File metadata and controls

179 lines (103 loc) · 6.17 KB

Brownie API

brownie

The brownie package is the main package containing all of Brownie's functionality.

>>> from brownie import *
>>> dir()
['Contract', 'Fixed', 'Wei', 'accounts', 'alert', 'compile_source', 'config', 'history', 'network', 'project', 'rpc', 'run', 'web3']

brownie.exceptions

The exceptions module contains all Brownie Exception and Warning classes.

Exceptions

Warnings

brownie._config

The _config module handles all Brownie configuration settings. It is not designed to be accessed directly. If you wish to view or modify config settings while Brownie is running, import brownie.config which will return a ConfigDict <brownie._config.ConfigDict> with the active settings:

>>> from brownie import config
>>> type(config)
<class 'brownie._config.ConfigDict'>
>>> config['network_defaults']
{'name': 'development', 'gas_limit': False, 'gas_price': False}

ConfigDict

ConfigDict Internal Methods

brownie._singleton

Internal metaclass used to create singleton objects. Instantiating a class derived from this metaclass will always return the same instance, regardless of how the child class was imported.