Web3.py
It is possible to connect to the Nethermind node using web3.py (python web3.js implementation). You will need to have web3.py installed using following guides:
You may use below script in order to check your connection. Please make sure you have enabled JSON RPC module, this can be done by passing flag --JsonRpc.Enabled true to either Nethermind.Launcher or Nethermind.Runner
1
from web3.auto import w3
2
3
connected = w3.isConnected()
4
print(connected)
5
6
if connected and w3.clientVersion.startswith('Nethermind'):
7
client = w3.clientVersion
8
print(client)
9
10
else:
11
client = None
12
print(client)
Copied!
You should see the following output (depends on the node version):
1
True
2
Nethermind/v1.4.8-13-5c66dcdf6-20200120/X64-Linux 5.3.2-050302-generic/Core3.1.1
Copied!
Last modified 1yr ago
Copy link