--- id: web3 version: "7.16.0" license: MIT license_treatment: permissive maintenance: active --- # web3 — web3: A Python library for interacting with Ethereum License: permissive · Maintenance: active · Downloads: 5.2M/mo ## What it is and what it does web3.py is the standard Python interface to the Ethereum blockchain. It abstracts the JSON-RPC protocol used by Ethereum nodes, letting you query blockchain state, send transactions, deploy contracts, and listen to events without managing low-level HTTP or WebSocket details yourself. The library bundles Ethereum-specific utilities like account management (via eth-account), ABI encoding (via eth-abi), and type definitions (via eth-typing) into a cohesive API. You use it by connecting to an Ethereum node—either a local node you run or a remote service like Infura—then calling methods to read data or submit transactions. It handles the cryptographic signing of transactions via eth-account and provides both synchronous (requests) and asynchronous (aiohttp, websockets) I/O patterns. The library supports modern Python versions and is actively maintained by the Ethereum Foundation. Use it for: - Query account balances, transaction history, and contract state on Ethereum mainnet or testnets. - Send Ether transfers or call smart contract functions from a Python script or application. - Deploy new smart contracts and interact with their methods programmatically. - Build backend services for decentralized applications (dApps) that need to read or write blockchain data. - Monitor blockchain events and react to contract state changes in real time. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. web3.py is a Python library for interacting with the Ethereum blockchain, enabling you to send transactions, query smart contracts, and build decentralized applications. Yes. web3.py is the de facto standard for Ethereum development in Python, actively maintained, permissively licensed, and carries low install friction. Install it if you need to interact with Ethereum from Python—whether for querying data, sending transactions, or building dApp backends. No known vulnerabilities as of the fact sheet date. ## Install pip install web3 uv add web3 poetry add web3 ## Installing web3 Before you install: Low install friction with a pure-wheel distribution. Active maintenance with a recent release and ongoing commits. The package carries 14 runtime dependencies including eth-account, eth-abi, and aiohttp, which are standard Ethereum tooling libraries. License in practice: MIT license permits commercial and private use, modification, and distribution with minimal restrictions—standard permissive terms suitable for most projects. Quickstart: pip install web3 from web3 import Web3 w3 = Web3(Web3.HTTPProvider('https://mainnet.infura.io/v3/YOUR_INFURA_KEY')) print(w3.is_connected()) Requires an Ethereum node endpoint (local or remote) to connect to; Python 3.8 or later. Verify before relying: - Whether pywin32 is required on all platforms or only Windows; may affect non-Windows install experience. - Performance characteristics and rate limits when interacting with public RPC endpoints. - Specific smart contract interaction patterns and ABI encoding/decoding workflows beyond basic connectivity. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 5.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags ethereum python library, interact with ethereum, smart contract interaction, blockchain python sdk, ethereum web3 client, decentralized app development, ethereum transactions python, ethereum, blockchain, cryptography [View on SkillFed](https://skillfed.io/packages/web3) · [View on PyPI](https://pypi.org/project/web3/)