web3.py lets Python programs connect to Ethereum nodes, send transactions, call smart contracts, and read chain data. It targets Python 3.10 and later.
Overview
web3.py is the Python interface for interacting with Ethereum and compatible EVM networks. Applications use it to build decentralized apps, deploy and call smart contracts, subscribe to events, and inspect blocks and accounts without writing low-level RPC code by hand.
The library organizes APIs around providers, accounts, transactions, contracts, logs, middleware, and utilities such as ENS helpers. Documentation offers quickstart guides, migration notes between major versions, and troubleshooting for sync and async usage patterns.
Community support channels include the Ethereum Python Discord and Stack Exchange, with contribution guidelines welcoming fixes and tests on GitHub. Release notes track breaking changes as the ecosystem evolves.
Consumers install via standard Python packaging and configure connection endpoints for local nodes or remote providers.
Key features
- Ethereum JSON-RPC provider abstraction
- Account and transaction signing helpers
- Contract ABI deployment and calls
- Event log filtering and subscriptions
- Middleware pipeline for requests
- ENS name resolution utilities
- Async and sync API surfaces
- Python 3.10+ compatibility
Use cases
- Automating on-chain scripts in Python
- Backend services listening to contract events
- Prototyping DeFi integrations
- Teaching Ethereum development in Python courses