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 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.5.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

ethereum_tools-0.1.5-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ethereum-tools-0.1.5.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for ethereum-tools-0.1.5.tar.gz
Algorithm Hash digest
SHA256 a83f6cd906507e0301d249cb979c608a32a341d16985cb40a71bd84658344208
MD5 4916d62eddb40fd261cab68c12396c38
BLAKE2b-256 b3fa942d05418228e16f60d0da8e3da908c58333c7180e7fd0a1ef64cb45e232

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ethereum_tools-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for ethereum_tools-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 647a821ed6662fc2d5e2e5bb37a0f3b48f4fe49df0b0ca07b64918130ecb09a3
MD5 1db046a83936e3d8282e52e69696a5cd
BLAKE2b-256 10ecb89bd3a811b380a09271147e0615e047ffe95d7c989e9e176c0913ee18ae

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