Local Light Node
To avoid high API fees, running a local node is an obvious solution. We are currently running on an Ethereum light node hosted on an Azure Virtual Machine.
geth --syncmode light --http --http.addr 0.0.0.0
Add the following line to your *.env file :
LOCALHOST = "http://127.0.0.1:8545" # alternatively http://localhost:8545
You are now able connect to the main net from your Python environment by running :
from dotenv import load_dotenv
from web3 import Web3
web3 = Web3(Web3.HTTPProvider(os.getenv('LOCALHOST')))
We are currently considering running our own server and archive node to improve the node stability and reduce hardware provider costs.