etherscan-python
A minimal, yet complete, python API for etherscan.io.
What it is and what it does
etherscan-python wraps Etherscan.io's REST API into a Python client, letting you query Ethereum blockchain data without writing HTTP requests directly. It covers standard endpoints for account balances, transaction history, contract metadata, block information, token transfers (ERC20 and ERC721), gas prices, and network statistics, plus PRO endpoints for historical analytics when you have a paid API key. The client supports Ethereum mainnet and testnets (Kovan, Rinkeby, Ropsten) by passing a network parameter.
You instantiate a client with your API key, then call methods like `get_eth_balance()`, `get_normal_txs_by_address()`, or `get_gas_oracle()` to retrieve data as strings or structured results. The package is minimal—it depends only on requests—and aims for completeness rather than abstraction, exposing most of Etherscan's public API surface directly.
Use it for:
- Fetch ETH balances and transaction history for addresses to build wallet monitoring or portfolio tracking tools.
- Retrieve ERC20 and ERC721 token transfer events for a contract or address to audit token movements.
- Look up smart contract source code and ABI from Etherscan to interact with contracts programmatically.
- Query gas price estimates and confirmation time predictions to optimize transaction timing.
- Access block rewards, block timestamps, and network statistics for blockchain analysis or research.
- Test your code against Ethereum testnets (Ropsten, Rinkeby, Kovan) before mainnet deployment.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a complete Python client for Etherscan.io's blockchain API, covering accounts, contracts, transactions, blocks, tokens, gas tracking, and network statistics across mainnet and testnets.
Yes, if you need to query Etherscan data from Python and are comfortable managing an API key. The package is straightforward, has no complex dependencies, and covers a broad API surface. The main caveat is that the last release was in 2021, so verify that its endpoints match your current Etherscan API needs and that it works with your Python version before relying on it for production.
Install
etherscan-python on PyPI
pip
pip install etherscan-pythonuv
uv add etherscan-pythonpoetry
poetry add etherscan-pythonInstalling etherscan-python
Before you install
Low friction installation with a single runtime dependency (requests). Repository is active with recent commits as of 2026-06-17, though the package itself has not had a release since 2021-03-31.
License in practice
MIT license permits commercial and private use with minimal restrictions, requiring only attribution and inclusion of the license text.
Quickstart
pip install etherscan-python
from etherscan import Etherscan
eth = Etherscan('YOUR_API_KEY')
balance = eth.get_eth_balance(address='0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a')
Requires a free Etherscan.io account and personal API key; PRO endpoints require a paid subscription.
Verify before relying
- Whether the package works with current Python versions given no explicit version constraint is specified.
- Whether recent repository activity indicates active maintenance or if commits are from community contributors.
- Whether the 2021-03-31 release date means the package is stable or potentially stale relative to Etherscan API changes.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — requests |
| Maintenance | actively maintained — 1,962 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 100,736/month — #12,975 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: etherscan_python-2.1.0-py3-none-any.whl
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
web3web3.py is a Python library for interacting…
permissive · top 5,000 on PyPI
pycoingeckoPython wrapper around the CoinGecko API (v3)…
permissive · top 15,000 on PyPI
eth-testereth-tester provides an in-memory Ethereum…
permissive · top 15,000 on PyPI
py-builder-relayer-clientA Python client library for submitting…
permissive · top 15,000 on PyPI
stellar-sdkStellar SDK provides Python APIs to build and…
permissive · top 15,000 on PyPI
cdp-sdkPython client library for the Coinbase…
permissive · top 15,000 on PyPI
eth-accounteth-account signs Ethereum transactions and…
permissive · top 5,000 on PyPI
python-binanceUnofficial Python wrapper for the Binance…
permissive · top 15,000 on PyPI
cosmpyCosmPy provides Python bindings to interact…
permissive · top 15,000 on PyPI