get-eth-balance
The site Etherscan allows you retrieve information on accounts and transactions. There is an interface to the Reposten testnet as well. While doing some work on a project I was monitoring the page to view an account balance and ended up creating a script to do the monitoring programmatically.
See blog post at http://blog.bradlucas.com/posts/2017-07-27-ethereum-get-eth-balance-script/
Setup
Create virtual enviroment
$ python3 -m venv env
$ source env/bin/activate
Install required libraries
$ pip install -r requirements.txt
Usage
Command line Arguments:
-t use Ropsten testnet otherwise default to mainnet chain
-a account
Environment variables: Use these in liu of the command line arguments
GET_ETH_BALANCE_CHAIN=[testnet|mainnet] - Default to mainnet if not set
GET_ETH_BALANCE_ACCOUNT=account
Command line arguments will take precedence
$ python get-eth-balance.py -t -a 0xd60e64afb753583941e1ab42f836ced0d23af2db
Metadata
Release files for get-eth-balance 0.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| get_eth_balance-0.2.5.tar.gz | 3.5 kB | Without provenance | Details for get_eth_balance-0.2.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| get_eth_balance-0.2.5-py3-none-any.whl | Python 3 | none | any | Details for get_eth_balance-0.2.5-py3-none-any.whl |
Total release size: 6.3 kB
Release files / get_eth_balance-0.2.5.tar.gz
| Download URL | get_eth_balance-0.2.5.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7aebe9efe339898948cb30d734f84d14b3655342c3e9d856ee168a83e1e79ec6
|
|
BLAKE2b-256 checksum How to use checksums |
9ae9b964ca108080593a5d0a496cebc8f481c9a28d1b120f16144b7f3ff9194c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.11.2
|
Release files / get_eth_balance-0.2.5-py3-none-any.whl
| Download URL | get_eth_balance-0.2.5-py3-none-any.whl |
|---|---|
| Size | 2.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
858bc3732ce9a3ee75ee3f8420b59c507e85e996dcee161ba63f2a2c2135eaf4
|
|
BLAKE2b-256 checksum How to use checksums |
89e866eef7ed812eb7992457501849a159638d07e9830efe9aad16b7a60fa721
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.11.2
|
Security for get-eth-balance 0.2.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.