Skip to main content

High-level tools and library to interact with Ethereum

Project description

eth-tools

Small library/CLI tool wrapping web3py.

Installation

pip install ethereum-tools

CLI Usage

Web3 provider needs to be set either through the WEB3_PROVIDER_URI environment variable or through the --web3-uri CLI flag.

Fetching blocks

eth-tools fetch-blocks -s 10000000 -e 10000999 -o blocks.csv.gz

Fetching events

eth-tools fetch-events -a 0x6b175474e89094c44da98b954eedeac495271d0f --abi /path/to/abi.json -s 10000000 -e 10000999 -o events.jsonl.gz

Library usage

from web3 import Web3
from web3.providers.auto import load_provider_from_environment

from eth_tools.block_iterator import BlockIterator


provider = load_provider_from_environment()
web3 = Web3(provider)
block_iterator = BlockIterator(web3, start_block=10_000_000, end_block=10_000_999)

for block in block_iterator:
    print(block.number)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ethereum-tools-0.1.2.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

ethereum_tools-0.1.2-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file ethereum-tools-0.1.2.tar.gz.

File metadata

  • Download URL: ethereum-tools-0.1.2.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for ethereum-tools-0.1.2.tar.gz
Algorithm Hash digest
SHA256 88d36a2eff0e4bb3095f569def25a8645de28249e480fb0836f8ec70133debf6
MD5 425bdb861f4f9c3255be8feeb5470623
BLAKE2b-256 b7fb8ccfaf4a08fe041b0860f2af52bb23894eeffbb67952903ca6fcbefffa94

See more details on using hashes here.

File details

Details for the file ethereum_tools-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: ethereum_tools-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for ethereum_tools-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8158b5456ed3cf9207f0270dedad94a465fbf29f3c6f6880cdb8b93fb3417641
MD5 d97c0073e59fd90e9feec53ab8aee56a
BLAKE2b-256 181a755f0f75329a9a2cb6cc9ad56dce0264023a108f757b54fc413b70749c2c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page