How to connect to the Ethereum blockchain using a node

In order to connect Python to the Ethereum blockchain you need to connect your application to an endpoint. Endpoints (also known as nodes) are running a version of the blockchain. Each node is connected to other nodes and this is what makes up the Ethereum network.

To connect to an endpoint there are a few options you can choose from. Each of these options will allow you to interact with the blockchain.

  • Use a third party provider to connect to a node that is already running. One can use https://infura.io/ or another provider. They offer a free account (but it is limited) and one can connect to the production or test environments. This is the fastest option and you can be connected to the blockchain in minutes.

Another option is:

  • Setup and run your own node. A lot of times this is not an option and most developers don’t want to bother with this process. One needs to procure a machine, learn how GETH works, wait for the chain to sync, etc. Click here to learn how to download and Install GETH from Docker.

Next – How to install Web3.py in Python

Leave a Reply