Skip to content

Commit e1973fb

Browse files
authored
Added JSON examples
1 parent 4fca86a commit e1973fb

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ A minimal python API for [etherscan.io](etherscan.io).
55
[![Build Status](https://travis-ci.com/pcko1/etherscan-python.svg?branch=master)](https://travis-ci.com/pcko1/etherscan-python)
66
[![codecov](https://codecov.io/gh/pcko1/etherscan-python/branch/master/graph/badge.svg)](https://codecov.io/gh/pcko1/etherscan-python)
77
[![Python 3.8](https://img.shields.io/badge/python-3.8-blue.svg)](https://www.python.org/downloads/release/python-385/)
8-
98
![GitHub](https://img.shields.io/github/license/pcko1/etherscan-python)
109

1110
___
@@ -37,29 +36,31 @@ pip install .
3736
## Run unittests
3837

3938
``` bash
40-
conda activate etherscan-python && bash run_tests.sh
39+
bash run_tests.sh
4140
````
4241

4342
## Usage
4443

4544
In `python` , create a client with your personal etherscan.io API key:
4645

4746
``` python
48-
from etherscan.client import Client
47+
from etherscan import Etherscan
4948
5049
api_key = YOUR_API_KEY
5150
config_path = "etherscan/configs/stable.json"
5251
53-
client = Client.from_config(config_path, api_key)
52+
eth = Etherscan.from_config(config_path, api_key)
5453
```
5554

5655
Then you can call all available methods, e.g.:
5756

5857
``` python
59-
client.get_eth_balance(address="0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a")
58+
eth.get_eth_balance(address="0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a")
6059
61-
> ('40891631566070000000000', 'OK')
60+
> '40891631566070000000000'
6261
```
6362

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+
6465
___
6566
Powered by [Etherscan.io APIs](https://etherscan.io/apis).

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy