skillfed

web3

web3: A Python library for interacting with Ethereum

web3 v7.16.0 5.2M downloads/30d#2,154 on PyPI5,519
Permissive license MIT Active released

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 on this page — 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

web3 on PyPI

pip

pip install web3

uv

uv add web3

poetry

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 the current Python release (<4,>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 14 — eth-abi, eth-account, eth-hash, eth-typing, eth-utils, hexbytes, aiohttp, pydantic, pywin32, requests, typing-extensions, types-requests, websockets, pyunormalize
Maintenance actively maintained — 105 days since the last release
Last repo commit
First released
Downloads 5,152,034/month — #2,154 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: web3-7.16.0-py3-none-any.whl

Keywords: ethereum

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

ethereum python libraryinteract with ethereumsmart contract interactionblockchain python sdkethereum web3 clientdecentralized app developmentethereum transactions python
ethereumblockchaincryptography

More Internet packages