A Python library for the Amberdata web3 API
Project description
web3data-py Python API
Obtaining an API Key
Visit Amberdata.io and select the developer plan to get started! Pass your API key to the client instance, either has a hardcoded string, or through an environment variable:
from web3data import Web3Data
w3d = Web3Data("<your key>")
… and start querying!
Installation
To install web3data-py, run this command in your terminal:
$ pip install web3data
For alternative ways to install the package, check out the installation instructions
Usage
from web3data import Web3Data
w3d = Web3Data("<your key>")
print(w3d.eth.address.information("0x06012c8cf97bead5deae237070f9587f8e7a266d"))
This will print the raw response, such as:
{'status': 200,
'title': 'OK',
'description': 'Successful request',
'payload': {'balance': '5296672643815245964',
'balanceIn': '3.0894905437937322715551e+22',
'balanceOut': '3.0889608765293507469587e+22',
'addressType': 'contract',
'changeInPrice': None,
'contractTypes': ['ERC721'],
'decimals': '0',
'name': 'CryptoKitties',
'numHolders': '84753',
'numTokens': '1860119',
'numTransfers': '2723659',
'symbol': 'CK',
'totalSupply': '1860119.0000000000000000',
'totalValueUSD': None,
'unitValueUSD': None}}
Development
Check out our contribution guidelines to see how to install the development version and run the test suite!
Resources
Free software: MIT license
Documentation: https://web3data-py.readthedocs.io.
Credits
The initial version of this package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.0.1 (2020-03-07)
First release on PyPI.
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
Built Distribution
Hashes for web3data-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bfff929779228c9113c08a33a143503f185b0f7920f10fb2482e8abe374178b |
|
MD5 | 2c50518d80526a046d1f560cf8c7e5de |
|
BLAKE2b-256 | 56a2ac708731e25dc7b715516f7eea008bfbd9b4502f147895df30b7e3971e82 |