@@ -5,7 +5,6 @@ A minimal python API for [etherscan.io](etherscan.io).
5
5
[ ![ Build Status] ( https://travis-ci.com/pcko1/etherscan-python.svg?branch=master )] ( https://travis-ci.com/pcko1/etherscan-python )
6
6
[ ![ codecov] ( https://codecov.io/gh/pcko1/etherscan-python/branch/master/graph/badge.svg )] ( https://codecov.io/gh/pcko1/etherscan-python )
7
7
[ ![ Python 3.8] ( https://img.shields.io/badge/python-3.8-blue.svg )] ( https://www.python.org/downloads/release/python-385/ )
8
-
9
8
![ GitHub] ( https://img.shields.io/github/license/pcko1/etherscan-python )
10
9
11
10
___
@@ -37,29 +36,31 @@ pip install .
37
36
## Run unittests
38
37
39
38
``` bash
40
- conda activate etherscan-python && bash run_tests.sh
39
+ bash run_tests.sh
41
40
````
42
41
43
42
# # Usage
44
43
45
44
In ` python` , create a client with your personal etherscan.io API key:
46
45
47
46
` ` ` python
48
- from etherscan.client import Client
47
+ from etherscan import Etherscan
49
48
50
49
api_key = YOUR_API_KEY
51
50
config_path = " etherscan/configs/stable.json"
52
51
53
- client = Client .from_config(config_path, api_key)
52
+ eth = Etherscan .from_config(config_path, api_key)
54
53
` ` `
55
54
56
55
Then you can call all available methods, e.g.:
57
56
58
57
` ` ` python
59
- client .get_eth_balance(address=" 0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a" )
58
+ eth .get_eth_balance(address=" 0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a" )
60
59
61
- > ( ' 40891631566070000000000' , ' OK ' )
60
+ > ' 40891631566070000000000'
62
61
` ` `
63
62
63
+ Examples (arguments and results) for all methods may be found as JSON files [here](https://github.com/pcko1/etherscan-python/tree/master/logs).
64
+
64
65
___
65
66
Powered by [Etherscan.io APIs](https://etherscan.io/apis).
0 commit comments