Web3 API¶
-
class
web3.
Web3
(provider)¶
Each web3
instance exposes the following APIs.
Providers¶
-
Web3.
HTTPProvider
¶ Convenience API to access
web3.providers.rpc.HTTPProvider
-
Web3.
IPCProvider
¶ Convenience API to access
web3.providers.ipc.IPCProvider
-
Web3.
setProviders
(provider)¶ Updates the current web3 instance with the new list of providers. It also accepts a single provider.
Attributes¶
-
Web3.
api
¶ Returns the current Web3 version.
>>> web3.api "4.7.0"
-
Web3.
clientVersion
¶ - Delegates to
web3_clientVersion
RPC Method
Returns the current client version.
>>> web3.clientVersion 'Geth/v1.4.11-stable-fed692f6/darwin/go1.7'
- Delegates to
Addresses¶
See Addresses
RPC APIS¶
Each web3
instance also exposes these namespaced APIs.
-
Web3.
eth
¶ See web3.eth API
-
Web3.
pm
¶
-
Web3.
parity
¶ See Parity API