OpenViSTAI · Agents · Blockchain · Crypto
Menu
Developer Tools

Etherscan Python

Etherscan Python is a Python API client library for accessing Etherscan services and Ethereum-related data from scripts and applications. Its methods cover account balances and transactions, ERC-20 and ERC-721 transfer events, contract details, blocks, gas, token information and network statistics.

Independent OpenViST project profile, based on linked sources.

Etherscan Python — OpenViST project profile in Developer Tools.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when a Python application needs to call Etherscan API methods through a client library rather than assembling those calls directly.

Who it is for

  • Python developers building Ethereum data scripts or application backends.
  • Blockchain analytics developers who need Etherscan account, token, transaction or network data.

Documented uses

  • Retrieve balances and transaction histories for Ethereum addresses.
  • Look up ERC-20 and ERC-721 transfer events and token information.
  • Fetch contract ABI or source code and transaction or block details.
  • Use gas-tracker and network-statistics methods in Python tools.
Before you choose

Requirements & limits

The README says use requires an Etherscan account and personal API key. Pro endpoints require elevated privileges through Etherscan's subscription service. The library is available from PyPI and can also be installed from GitHub; the repository specifies an MIT license.

  • The method list spans account, contract, transaction, block, proxy, token, gas and statistics endpoints.
  • Historical metrics and other Pro methods depend on Etherscan Pro privileges.
  • The README includes JSON examples of method arguments and result formats.
  • The library offers a client parameter for selecting a testnet, with Kovan, Rinkeby and Ropsten named in the README.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install the library and initialize an Etherscan client

Set up the Python package and create a client using an Etherscan API key.

Before you start

  • Python environment
  • Etherscan account and personal API key

Steps

  1. Install the package with the command below, or install it from the GitHub repository.

    Documented command
    pip install etherscan-python
  2. Import Etherscan from etherscan and create a client with your API key.

  3. Call a documented method, such as get_eth_balance, with an address.

Expected outcome

A Python client configured to call Etherscan methods, with the example balance lookup returning a value.

Guide limitations

  • Pro endpoints require elevated Etherscan subscription privileges.
  • The README's testnet examples name Kovan, Rinkeby and Ropsten; it does not establish their current network availability.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
9 October 2026
Original website title
pcko1/etherscan-python · Official homepage title · retained in its source language