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.1.tar.gz
(10.7 kB
view hashes)
Built Distribution
Close
Hashes for ethereum_tools-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c9e12d69fab09f522c7a18257d56a7e4b73abbbfa050fd9c2e663b4515e856a |
|
MD5 | fe85dadbec88b9b37444584e16cdada2 |
|
BLAKE2b-256 | f7957900ec717d55243b327433bb182c5fa0bb94de1f0435f6b72c3916552699 |