gitmyhub

web3.py

Python ★ 5.5k updated 1mo ago

A python interface for interacting with the Ethereum blockchain and ecosystem.

web3.py is a Python library for connecting to the Ethereum blockchain, check wallet balances, send transactions, call smart contract functions, and build apps that interact with the Ethereum network.

PythonEthereumsetup: moderatecomplexity 3/5

web3.py is a Python library for interacting with the Ethereum blockchain. Ethereum is a decentralized network where programs called smart contracts run on shared infrastructure across many computers worldwide. You can use web3.py to read data from the blockchain, send transactions, call smart contract functions, and build applications that connect to the Ethereum network.

The library is installed as a standard Python package using pip and supports Python 3.10 and newer. Once installed, you create a connection to an Ethereum node, either a local one or a hosted service that provides network access over the internet, and then use the library's functions to interact with the blockchain from your code.

Common tasks web3.py handles include checking wallet balances, reading the current state of smart contracts, sending transactions to transfer cryptocurrency or trigger contract logic, and listening for events that contracts emit. Developers building applications on top of Ethereum, whether wallets, exchanges, games, or data tools, typically use a library like this to handle the underlying communication with the network rather than implementing it from scratch.

The README is brief and points to an external documentation site for detailed usage. A quickstart guide is available that walks through getting started in about five minutes, and a Discord community exists for questions about implementation and usage.

This repository is hosted under the ApeWorX organization, but the original and primary upstream project is maintained by the Ethereum Foundation at github.com/ethereum/web3.py. The two share the same codebase.

Where it fits