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.4.tar.gz
(15.1 kB
view details)
Built Distribution
File details
Details for the file ethereum-tools-0.1.4.tar.gz
.
File metadata
- Download URL: ethereum-tools-0.1.4.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.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26836d39df97a7c17040fc19bafa1953e3a0f535de700b0111f111912e11ed04 |
|
MD5 | 2ad45ac9ffd0dd88e1595483d6749004 |
|
BLAKE2b-256 | 86193e074ec37a613dfbc7efc9e33850bead1b154a256803b8db5df9432011d1 |
File details
Details for the file ethereum_tools-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: ethereum_tools-0.1.4-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.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1122cf9fac6458c42317372f475498907b8d35d49d33434304c82db322166a6 |
|
MD5 | 29d573bbf13efdbc489eaa40dd81bc08 |
|
BLAKE2b-256 | 28d0d63ef1ffdcf278d71ce0c5a24930d7c4ab91b169d3528f13a151e4129511 |