ethereum-tools


Nameethereum-tools JSON
Version 0.1.6 PyPI version JSON
download
home_pagehttps://github.com/danhper/ethereum-tools
SummaryHigh-level tools and library to interact with Ethereum
upload_time2023-02-07 22:56:52
maintainer
docs_urlNone
authorDaniel Perez
requires_python
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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

```python
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)
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/danhper/ethereum-tools",
    "name": "ethereum-tools",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Daniel Perez",
    "author_email": "daniel@perez.sh",
    "download_url": "https://files.pythonhosted.org/packages/07/92/adb00ab883c19c3980f7a0c5268518d499b4a0dde8eb89d656b953c6e31d/ethereum-tools-0.1.6.tar.gz",
    "platform": null,
    "description": "# eth-tools\n\nSmall library/CLI tool wrapping web3py.\n\n## Installation\n\n```\npip install ethereum-tools\n```\n\n## CLI Usage\n\nWeb3 provider needs to be set either through the `WEB3_PROVIDER_URI` environment\nvariable or through the `--web3-uri` CLI flag.\n\n### Fetching blocks\n\n```\neth-tools fetch-blocks -s 10000000 -e 10000999 -o blocks.csv.gz\n```\n\n### Fetching events\n\n```\neth-tools fetch-events 0x6b175474e89094c44da98b954eedeac495271d0f --abi /path/to/abi.json -s 10000000 -e 10000999 -o events.jsonl.gz\n```\n\n## Library usage\n\n```python\nfrom web3 import Web3\nfrom web3.providers.auto import load_provider_from_environment\n\nfrom eth_tools.block_iterator import BlockIterator\n\n\nprovider = load_provider_from_environment()\nweb3 = Web3(provider)\nblock_iterator = BlockIterator(web3, start_block=10_000_000, end_block=10_000_999)\n\nfor block in block_iterator:\n    print(block.number)\n```\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "High-level tools and library to interact with Ethereum",
    "version": "0.1.6",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2e599ad1a8ff8c33ed2d998035728eb682002fb7fb596f839bc2ab460558e1b5",
                "md5": "79e4193fdad3e561d9297f82a9e68ea5",
                "sha256": "d5762a59c1c46745400fc5b7c0b124dcc192346e223854d89492e0aadab5dd7d"
            },
            "downloads": -1,
            "filename": "ethereum_tools-0.1.6-py3-none-any.whl",
            "has_sig": true,
            "md5_digest": "79e4193fdad3e561d9297f82a9e68ea5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 20434,
            "upload_time": "2023-02-07T22:56:50",
            "upload_time_iso_8601": "2023-02-07T22:56:50.112798Z",
            "url": "https://files.pythonhosted.org/packages/2e/59/9ad1a8ff8c33ed2d998035728eb682002fb7fb596f839bc2ab460558e1b5/ethereum_tools-0.1.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0792adb00ab883c19c3980f7a0c5268518d499b4a0dde8eb89d656b953c6e31d",
                "md5": "520eb8adf8513511993e4a5f0cf80772",
                "sha256": "7ffc674d6432abb53014bbfa00ff7225fe77f706547110e4bd878e974a5d0fcf"
            },
            "downloads": -1,
            "filename": "ethereum-tools-0.1.6.tar.gz",
            "has_sig": true,
            "md5_digest": "520eb8adf8513511993e4a5f0cf80772",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 14976,
            "upload_time": "2023-02-07T22:56:52",
            "upload_time_iso_8601": "2023-02-07T22:56:52.444157Z",
            "url": "https://files.pythonhosted.org/packages/07/92/adb00ab883c19c3980f7a0c5268518d499b4a0dde8eb89d656b953c6e31d/ethereum-tools-0.1.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-07 22:56:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "danhper",
    "github_project": "ethereum-tools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "ethereum-tools"
}
        
Elapsed time: 0.16591s