{ "info": { "author": "Akshay Ramasubramanian", "author_email": "araa@connect.ust.hk", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Internet", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "PyEtherBalance \n=============\n\n`pyetherbalance` is a python module for getting Ethereum and er20 token balances. There are other modules like web3py out there, however the goal of this module is to be super light weight and not depend on too many other modules. \n\nInstallation\n------------\n\nSimply clone the project and run `python setup.py install` - or install via pip `pip install pyetherbalance`.\n\nThis module only depends on the 'requests' library in python to send post requests\n\n\nBasic Usage:\n----\n\n\n```python\nimport pyetherbalance \n# Sign up for https://infura.io/, and get the url to an ethereum node\ninfura_url = 'https://mainnet.infura.543254324532543254345'\nethereum_address = '0xeb9f035dd1211af75976427d68d2d6dc549c458e'\n# Create an pyetherbalance object , pass the infura_url\nethbalance = pyetherbalance.PyEtherBalance(infura_url)\n# get ether balance\nbalance_eth = ethbalance.get_eth_balance(ethereum_address)\nprint(balance_eth)\n# get token balance \nbalance_omg = ethbalance.get_token_balance('OMG', ethereum_address)\nprint(balance_omg)\n\n```\n\nAdvanced Usage: \n----\n\nAdding tokens\n\nCurrently the module uses https://github.com/ethereum-lists/tokens for a list of tokens. If you want to add your own custom token, you can follow the steps below. This will also work for overwriting internal token contract addresses. \n\n```python\nimport pyetherbalance \n# Sign up for https://infura.io/, and get the url to an ethereum node\ninfura_url = 'https://mainnet.infura.543254324532543254345'\nethereum_address = '0xeb9f035dd1211af75976427d68d2d6dc549c458e'\n# Create an pyetherbalance object , pass the infura_url\nethbalance = pyetherbalance.PyEtherBalance(infura_url)\n# New token symbol\ntoken = \"OMG\"\n# Token details. The fields below are all required\ndetails = {'symbol': 'OMG', 'address': '0xd26114cd6EE289AccF82350c8d8487fedB8A0C07', 'decimals': 18, 'name': 'OmiseGO'}\n# Add token \nerc20tokens = ethbalance.add_token(token, details)\n# print list of all internal tokens\nprint(erc20tokens['OMG'])\n```\n\nGetting all tokens:\n\n```python\nimport pyetherbalance \n# Sign up for https://infura.io/, and get the url to an ethereum node\ninfura_url = 'https://mainnet.infura.543254324532543254345'\n# Create an pyetherbalance object , pass the infura_url\nethbalance = pyetherbalance.PyEtherBalance(infura_url)\n# Get a dictionary with all tokens and details \nerc20tokens = ethbalance.get_erc20_tokens()\nprint(erc20tokens)\n```\n\n\n\n\nTesting:\n----\n\nTest You can test on either Ropsten, Kovan, Rinkeby or local testnets by providing the url of your corresponding ethereum node, while initializing pyetherbalance object. \n\n\nCopyright\n---------\n\nMTI License - See LICENSE for details.\n\nChangelog\n--------- \n## Version 0.0.1\n### New\n - First Working Version \n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/araa47", "keywords": "ethereum", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pyetherbalance", "package_url": "https://pypi.org/project/pyetherbalance/", "platform": "", "project_url": "https://pypi.org/project/pyetherbalance/", "project_urls": { "Homepage": "http://github.com/araa47" }, "release_url": "https://pypi.org/project/pyetherbalance/0.0.1/", "requires_dist": [ "requests" ], "requires_python": "", "summary": "Lightweight Module to get Ethereum and ERC20 token balances", "version": "0.0.1" }, "last_serial": 4834932, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "18d6f80f52358356a7ee0c20cc074438", "sha256": "05776a268d3fe0077a000c7f0e3df0411177743f5316ded40f74218292346316" }, "downloads": -1, "filename": "pyetherbalance-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "18d6f80f52358356a7ee0c20cc074438", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 129877, "upload_time": "2019-02-18T12:50:45", "url": "https://files.pythonhosted.org/packages/3a/61/a22d94e286f12297b3427bfd32d6f3eb1531cf3aa3407ebc8ceca62d6be8/pyetherbalance-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7c29d127b5feac3c856588433761822f", "sha256": "3ab72404e32790f69ed4207f388f8693b50a41756c3102a615cbfe3a53d287c0" }, "downloads": -1, "filename": "pyetherbalance-0.0.1.tar.gz", "has_sig": false, "md5_digest": "7c29d127b5feac3c856588433761822f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 124804, "upload_time": "2019-02-18T12:50:48", "url": "https://files.pythonhosted.org/packages/9c/a5/6bab3ba914cc4af0835c5ddc2049b66bc119b3a486f0e0703932da0759bf/pyetherbalance-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "18d6f80f52358356a7ee0c20cc074438", "sha256": "05776a268d3fe0077a000c7f0e3df0411177743f5316ded40f74218292346316" }, "downloads": -1, "filename": "pyetherbalance-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "18d6f80f52358356a7ee0c20cc074438", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 129877, "upload_time": "2019-02-18T12:50:45", "url": "https://files.pythonhosted.org/packages/3a/61/a22d94e286f12297b3427bfd32d6f3eb1531cf3aa3407ebc8ceca62d6be8/pyetherbalance-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7c29d127b5feac3c856588433761822f", "sha256": "3ab72404e32790f69ed4207f388f8693b50a41756c3102a615cbfe3a53d287c0" }, "downloads": -1, "filename": "pyetherbalance-0.0.1.tar.gz", "has_sig": false, "md5_digest": "7c29d127b5feac3c856588433761822f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 124804, "upload_time": "2019-02-18T12:50:48", "url": "https://files.pythonhosted.org/packages/9c/a5/6bab3ba914cc4af0835c5ddc2049b66bc119b3a486f0e0703932da0759bf/pyetherbalance-0.0.1.tar.gz" } ] }