{ "info": { "author": "Piper Merriam", "author_email": "pipermerriam@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "# Web3.py\n\n0x-web3 is a temporary fork of web3. It adds primitive support for ABI tuples, which is needed in order to facilitate calling the 0x smart contracts. The fork\u2019s changes to web3.py are visible in an open PR, and when that PR (or something analogous) is merged, this package will be taken down.\n\n[![Join the chat at https://gitter.im/ethereum/web3.py](https://badges.gitter.im/ethereum/web3.py.svg)](https://gitter.im/ethereum/web3.py?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n[![Build Status](https://circleci.com/gh/ethereum/web3.py.svg?style=shield)](https://circleci.com/gh/ethereum/web3.py.svg?style=shield)\n\n\nA Python implementation of [web3.js](https://github.com/ethereum/web3.js)\n\n* Python 3.5+ support\n\nRead more in the [documentation on ReadTheDocs](http://web3py.readthedocs.io/). [View the change log on Github](docs/releases.rst).\n\n## Quickstart\n\n```python\nimport json\nimport web3\n\nfrom web3 import Web3, HTTPProvider, TestRPCProvider\nfrom solc import compile_source\nfrom web3.contract import ConciseContract\n\n# Solidity source code\ncontract_source_code = '''\npragma solidity ^0.4.0;\n\ncontract Greeter {\n string public greeting;\n\n function Greeter() {\n greeting = 'Hello';\n }\n\n function setGreeting(string _greeting) public {\n greeting = _greeting;\n }\n\n function greet() constant returns (string) {\n return greeting;\n }\n}\n'''\n\ncompiled_sol = compile_source(contract_source_code) # Compiled source code\ncontract_interface = compiled_sol[':Greeter']\n\n# web3.py instance\nw3 = Web3(TestRPCProvider())\n\n# Instantiate and deploy contract\ncontract = w3.eth.contract(abi=contract_interface['abi'], bytecode=contract_interface['bin'])\n\n# Get transaction hash from deployed contract\ntx_hash = contract.deploy(transaction={'from': w3.eth.accounts[0], 'gas': 410000})\n\n# Get tx receipt to get contract address\ntx_receipt = w3.eth.getTransactionReceipt(tx_hash)\ncontract_address = tx_receipt['contractAddress']\n\n# Contract instance in concise mode\nabi = contract_interface['abi']\ncontract_instance = w3.eth.contract(address=contract_address, abi=abi,ContractFactoryClass=ConciseContract)\n\n# Getters + Setters for web3.eth.contract object\nprint('Contract value: {}'.format(contract_instance.greet()))\ncontract_instance.setGreeting('Nihao', transact={'from': w3.eth.accounts[0]})\nprint('Setting value to: Nihao')\nprint('Contract value: {}'.format(contract_instance.greet()))\n```\n\n## Developer Setup\n\n```sh\ngit clone git@github.com:ethereum/web3.py.git\ncd web3.py\n```\n\nPlease see OS-specific instructions for:\n\n- [Linux](docs/README-linux.md#Developer-Setup)\n- [Mac](docs/README-osx.md#Developer-Setup)\n- [Windows](docs/README-windows.md#Developer-Setup)\n- [FreeBSD](docs/README-freebsd.md#Developer-Setup)\n\nThen run these install commands:\n\n```sh\nvirtualenv venv\n. venv/bin/activate\npip install -e .[dev]\n```\n\nFor different environments, you can set up multiple `virtualenv`. For example, if you want to create a `venvdocs`, then you do the following:\n\n```sh\nvirtualenv venvdocs\n. venvdocs/bin/activate\npip install -e .[docs]\npip install -e .\n```\n\n## Using Docker\n\nIf you would like to develop and test inside a Docker environment, use the *sandbox* container provided in the **docker-compose.yml** file.\n\nTo start up the test environment, run:\n\n```\ndocker-compose up -d\n```\n\nThis will build a Docker container set up with an environment to run the Python test code. \n\n**Note: This container does not have `go-ethereum` installed, so you cannot run the go-ethereum test suite.**\n\nTo run the Python tests from your local machine:\n\n```\ndocker-compose exec sandbox bash -c 'pytest -n 4 -f -k \"not goethereum\"'\n```\n\nYou can run arbitrary commands inside the Docker container by using the `bash -c` prefix.\n\n```\ndocker-compose exec sandbox bash -c ''\n```\n\nOr, if you would like to just open a session to the container, run:\n\n```\ndocker-compose exec sandbox bash\n```\n\n### Testing Setup\n\nDuring development, you might like to have tests run on every file save.\n\nShow flake8 errors on file change:\n\n```sh\n# Test flake8\nwhen-changed -v -s -r -1 web3/ tests/ ens/ -c \"clear; flake8 web3 tests ens && echo 'flake8 success' || echo 'error'\"\n```\n\nYou can use `pytest-watch`, running one for every Python environment:\n\n```sh\npip install pytest-watch\n\ncd venv\nptw --onfail \"notify-send -t 5000 'Test failure \u26a0\u26a0\u26a0\u26a0\u26a0' 'python 3 test on web3.py failed'\" ../tests ../web3\n```\n\nOr, you can run multi-process tests in one command, but without color:\n\n```sh\n# in the project root:\npytest --numprocesses=4 --looponfail --maxfail=1\n# the same thing, succinctly:\npytest -n 4 -f --maxfail=1\n```\n\n#### How to Execute the Tests?\n\n1. [Setup your development environment](https://github.com/ethereum/web3.py/#developer-setup).\n\n2. Execute `tox` for the tests\n\nThere are multiple [components](https://github.com/ethereum/web3.py/blob/master/.travis.yml#L53) of the tests. You can run test to against specific component. For example:\n\n```sh\n# Run Tests for the Core component (for Python 3.5):\ntox -e py35-core\n\n# Run Tests for the Core component (for Python 3.6):\ntox -e py36-core\n```\n\nIf for some reason it is not working, add `--recreate` params.\n\n`tox` is good for testing against the full set of build targets. But if you want to run the tests individually, `py.test` is better for development workflow. For example, to run only the tests in one file:\n\n```sh\npy.test tests/core/gas-strategies/test_time_based_gas_price_strategy.py\n```\n\n### Release setup\n\nFor Debian-like systems:\n```\napt install pandoc\n```\n\nTo release a new version:\n\n```sh\nmake release bump=$$VERSION_PART_TO_BUMP$$\n```\n\n#### How to bumpversion\n\nThe version format for this repo is `{major}.{minor}.{patch}` for stable, and\n`{major}.{minor}.{patch}-{stage}.{devnum}` for unstable (`stage` can be alpha or beta).\n\nTo issue the next version in line, specify which part to bump,\nlike `make release bump=minor` or `make release bump=devnum`.\n\nIf you are in a beta version, `make release bump=stage` will switch to a stable.\n\nTo issue an unstable version when the current version is stable, specify the\nnew version explicitly, like `make release bump=\"--new-version 4.0.0-alpha.1 devnum\"`\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ethereum/web3.py", "keywords": "ethereum", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "0x-web3", "package_url": "https://pypi.org/project/0x-web3/", "platform": "", "project_url": "https://pypi.org/project/0x-web3/", "project_urls": { "Homepage": "https://github.com/ethereum/web3.py" }, "release_url": "https://pypi.org/project/0x-web3/4.8.2.1/", "requires_dist": [ "eth-abi (<2.0.0,>=1.2.0)", "eth-account (<0.4.0,>=0.2.1)", "eth-utils (<2.0.0,>=1.2.0)", "hexbytes (<1.0.0,>=0.1.0)", "lru-dict (<2.0.0,>=1.1.6)", "eth-hash[pycryptodome] (<1.0.0,>=0.2.0)", "requests (<3.0.0,>=2.16.0)", "websockets (<7.0.0,>=6.0.0)", "web3 (==4.8.2)", "cytoolz (<1.0.0,>=0.9.0) ; implementation_name == \"cpython\"", "toolz (<1.0.0,>=0.9.0) ; implementation_name == \"pypy\"", "pypiwin32 (>=223) ; platform_system == \"Windows\"", "eth-tester[py-evm] (==0.1.0-beta.33) ; extra == 'dev'", "py-geth (<3.0.0,>=2.0.1) ; extra == 'dev'", "flake8 (==3.4.1) ; extra == 'dev'", "isort (<5,>=4.2.15) ; extra == 'dev'", "mock ; extra == 'dev'", "sphinx-better-theme (>=0.1.4) ; extra == 'dev'", "click (>=5.1) ; extra == 'dev'", "configparser (==3.5.0) ; extra == 'dev'", "contextlib2 (>=0.5.4) ; extra == 'dev'", "ethtoken ; extra == 'dev'", "py-geth (>=1.4.0) ; extra == 'dev'", "py-solc (>=0.4.0) ; extra == 'dev'", "pytest (>=2.7.2) ; extra == 'dev'", "sphinx ; extra == 'dev'", "sphinx-rtd-theme (>=0.1.9) ; extra == 'dev'", "toposort (>=1.4) ; extra == 'dev'", "urllib3 ; extra == 'dev'", "web3 (>=2.1.0) ; extra == 'dev'", "wheel ; extra == 'dev'", "bumpversion ; extra == 'dev'", "flaky (>=3.3.0) ; extra == 'dev'", "hypothesis (>=3.31.2) ; extra == 'dev'", "pytest (<4,>=3.5.0) ; extra == 'dev'", "pytest-mock (==1.*) ; extra == 'dev'", "pytest-pythonpath (>=0.3) ; extra == 'dev'", "pytest-watch (==4.*) ; extra == 'dev'", "pytest-xdist (==1.*) ; extra == 'dev'", "tox (>=1.8.0) ; extra == 'dev'", "tqdm ; extra == 'dev'", "when-changed ; extra == 'dev'", "mock ; extra == 'docs'", "sphinx-better-theme (>=0.1.4) ; extra == 'docs'", "click (>=5.1) ; extra == 'docs'", "configparser (==3.5.0) ; extra == 'docs'", "contextlib2 (>=0.5.4) ; extra == 'docs'", "ethtoken ; extra == 'docs'", "py-geth (>=1.4.0) ; extra == 'docs'", "py-solc (>=0.4.0) ; extra == 'docs'", "pytest (>=2.7.2) ; extra == 'docs'", "sphinx ; extra == 'docs'", "sphinx-rtd-theme (>=0.1.9) ; extra == 'docs'", "toposort (>=1.4) ; extra == 'docs'", "urllib3 ; extra == 'docs'", "web3 (>=2.1.0) ; extra == 'docs'", "wheel ; extra == 'docs'", "flake8 (==3.4.1) ; extra == 'linter'", "isort (<5,>=4.2.15) ; extra == 'linter'", "eth-tester[py-evm] (==0.1.0-beta.33) ; extra == 'tester'", "py-geth (<3.0.0,>=2.0.1) ; extra == 'tester'", "eth-testrpc (<2.0.0,>=1.3.3) ; extra == 'testrpc'" ], "requires_python": ">=3.5.3,<4", "summary": "Web3.py", "version": "4.8.2.1" }, "last_serial": 5568707, "releases": { "4.7.1": [ { "comment_text": "", "digests": { "md5": "8dd9b3179061b120ef02d6e5ac9874d0", "sha256": "60c5b564cebf6a6b4e1b21ccdf63b72dcd17838de8a90d87511e4902d57216b0" }, "downloads": -1, "filename": "0x_web3-4.7.1-py3-none-any.whl", "has_sig": false, "md5_digest": "8dd9b3179061b120ef02d6e5ac9874d0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.3,<4", "size": 131682, "upload_time": "2018-12-20T17:01:56", "url": "https://files.pythonhosted.org/packages/46/b3/daf24f7b0cec580cc3ea5dc35780e573509723e66bb5c439a4651ec53e55/0x_web3-4.7.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dbe48e482a1b6361827fa7e743e86d31", "sha256": "dfc1f19118b8be9760550ee4ed7c912461429cceba48365a8c0a95d9ddb27b1e" }, "downloads": -1, "filename": "0x-web3-4.7.1.tar.gz", "has_sig": false, "md5_digest": "dbe48e482a1b6361827fa7e743e86d31", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.3,<4", "size": 103097, "upload_time": "2018-12-20T17:01:59", "url": "https://files.pythonhosted.org/packages/e4/3c/419be2f7a997831de0057689678bdcfb8e85932855fce235a3ef4497a3a2/0x-web3-4.7.1.tar.gz" } ], "4.7.1.post0": [ { "comment_text": "", "digests": { "md5": "56e4813617c67441beb1e928f1eac991", "sha256": "8011b9b8fab435aa7632fcbeacbcb1c5f4842087e86852314c0a928dc20119d3" }, "downloads": -1, "filename": "0x_web3-4.7.1.post0-py3-none-any.whl", "has_sig": false, "md5_digest": "56e4813617c67441beb1e928f1eac991", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.3,<4", "size": 132205, "upload_time": "2018-12-28T22:50:10", "url": "https://files.pythonhosted.org/packages/5f/25/be0a61c60ac5bad77664c546af9cfbb077ce0f7003ba6812e031449cd4cd/0x_web3-4.7.1.post0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6de5aed2db9be902ea298fc2e491091a", "sha256": "a97da176f76c89942d3c90966a5bc60ce647e918d302c584c9b111cfec410ebe" }, "downloads": -1, "filename": "0x-web3-4.7.1.post0.tar.gz", "has_sig": false, "md5_digest": "6de5aed2db9be902ea298fc2e491091a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.3,<4", "size": 103228, "upload_time": "2018-12-28T22:50:12", "url": "https://files.pythonhosted.org/packages/60/fe/37be25405c370c3c041d25e7c4580c105649971a3b8450ccbf25f350dc76/0x-web3-4.7.1.post0.tar.gz" } ], "4.7.1.post1": [ { "comment_text": "", "digests": { "md5": "b6e56e50b2a613bc06945ffc89ca679e", "sha256": "4177db78518d91de5da78001829ba7ccbb643a79ad7290c50515627dd2db7e48" }, "downloads": -1, "filename": "0x_web3-4.7.1.post1-py3-none-any.whl", "has_sig": false, "md5_digest": "b6e56e50b2a613bc06945ffc89ca679e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.3,<4", "size": 132207, "upload_time": "2018-12-28T22:54:10", "url": "https://files.pythonhosted.org/packages/dc/7b/ebe34d46e6fafb376e06cc5b2ae70b46379b9e9a762e45f8d1d594ca8da7/0x_web3-4.7.1.post1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "113e92500d40b5b46d535506f32cbd44", "sha256": "21bd2ef73f101da042e1bb6c1bef068092a5e9a8e92d860cb398f7a6881cf041" }, "downloads": -1, "filename": "0x-web3-4.7.1.post1.tar.gz", "has_sig": false, "md5_digest": "113e92500d40b5b46d535506f32cbd44", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.3,<4", "size": 103242, "upload_time": "2018-12-28T22:54:12", "url": "https://files.pythonhosted.org/packages/53/5a/49f4a3caf96e1ab08167adf48b82d7f1fa63f79f92b0fff824872bdd7c32/0x-web3-4.7.1.post1.tar.gz" } ], "4.8.2": [ { "comment_text": "", "digests": { "md5": "90bf7f8fb3049f339edb3b374efee708", "sha256": "ede98a177b25101d8c205b4747123797f77e024eaf55ffe5b9c0e3c16ef17113" }, "downloads": -1, "filename": "0x_web3-4.8.2-py3-none-any.whl", "has_sig": false, "md5_digest": "90bf7f8fb3049f339edb3b374efee708", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.3,<4", "size": 125634, "upload_time": "2019-02-14T01:50:09", "url": "https://files.pythonhosted.org/packages/a8/57/26afc2de02daa030d67d92e83d91288616e902cb8fce5c911e37daa2675c/0x_web3-4.8.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0a87f66c79535b68d0efd673dcf442a9", "sha256": "0950c72e6d4c6b1e06290a381da39a2e34106a31b56ea65d18dac4c20b2cdc2e" }, "downloads": -1, "filename": "0x-web3-4.8.2.tar.gz", "has_sig": false, "md5_digest": "0a87f66c79535b68d0efd673dcf442a9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.3,<4", "size": 97389, "upload_time": "2019-02-14T01:50:10", "url": "https://files.pythonhosted.org/packages/50/49/3e7ff1ab02fee9264e3db2656ad8e5e3728ec15bd9f9008a084648cae379/0x-web3-4.8.2.tar.gz" } ], "4.8.2.1": [ { "comment_text": "", "digests": { "md5": "ae6fa3c39ea9ef476f67792e2fee265c", "sha256": "f78c95809ead54b67c1bfb76886b364f174b93536ebac7a7756cc6d28c7d6a10" }, "downloads": -1, "filename": "0x_web3-4.8.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ae6fa3c39ea9ef476f67792e2fee265c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.3,<4", "size": 125839, "upload_time": "2019-02-14T02:20:19", "url": "https://files.pythonhosted.org/packages/f4/ee/c063d8f583a5773b6463b73c9ea61e9f6b5c45287424e5600f756d0fadfc/0x_web3-4.8.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "117a11c2e8bf62d29a9102f06119c31a", "sha256": "cc1154252525072856320214a5ebfee935a794054a7d41ee1d5e1e0acdd37ae2" }, "downloads": -1, "filename": "0x-web3-4.8.2.1.tar.gz", "has_sig": false, "md5_digest": "117a11c2e8bf62d29a9102f06119c31a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.3,<4", "size": 97602, "upload_time": "2019-02-14T02:20:21", "url": "https://files.pythonhosted.org/packages/17/a1/fa92d2dc186a305383d467c0318d190ed8ea119010e3b7fb1b574fb8281f/0x-web3-4.8.2.1.tar.gz" } ], "5.0.0a5": [ { "comment_text": "", "digests": { "md5": "9670b074a452fbf1685d5b54cf326011", "sha256": "248550ffb42fa2bd6b579b065b447c20028c0af58eea9d2c9707390117e1785b" }, "downloads": -1, "filename": "0x_web3-5.0.0a5-py3-none-any.whl", "has_sig": false, "md5_digest": "9670b074a452fbf1685d5b54cf326011", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4", "size": 138599, "upload_time": "2019-02-13T22:27:10", "url": "https://files.pythonhosted.org/packages/51/45/6a8a93e1656e56136eb3a911397dfbb7cad47c5cbe9218e2fbcfb57ec6f7/0x_web3-5.0.0a5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e825f813e6cf1b6a9037f4912f867b9a", "sha256": "421d64f4024eaa65d80bde0155a6eb1775c6f7d0a8eb195e97a69e7249774806" }, "downloads": -1, "filename": "0x-web3-5.0.0a5.tar.gz", "has_sig": false, "md5_digest": "e825f813e6cf1b6a9037f4912f867b9a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4", "size": 108506, "upload_time": "2019-02-13T22:27:13", "url": "https://files.pythonhosted.org/packages/c3/af/eb0e53c14d936f76102caa2ebb811f793421622085f089c17557c22ac8c8/0x-web3-5.0.0a5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ae6fa3c39ea9ef476f67792e2fee265c", "sha256": "f78c95809ead54b67c1bfb76886b364f174b93536ebac7a7756cc6d28c7d6a10" }, "downloads": -1, "filename": "0x_web3-4.8.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ae6fa3c39ea9ef476f67792e2fee265c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5.3,<4", "size": 125839, "upload_time": "2019-02-14T02:20:19", "url": "https://files.pythonhosted.org/packages/f4/ee/c063d8f583a5773b6463b73c9ea61e9f6b5c45287424e5600f756d0fadfc/0x_web3-4.8.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "117a11c2e8bf62d29a9102f06119c31a", "sha256": "cc1154252525072856320214a5ebfee935a794054a7d41ee1d5e1e0acdd37ae2" }, "downloads": -1, "filename": "0x-web3-4.8.2.1.tar.gz", "has_sig": false, "md5_digest": "117a11c2e8bf62d29a9102f06119c31a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.3,<4", "size": 97602, "upload_time": "2019-02-14T02:20:21", "url": "https://files.pythonhosted.org/packages/17/a1/fa92d2dc186a305383d467c0318d190ed8ea119010e3b7fb1b574fb8281f/0x-web3-4.8.2.1.tar.gz" } ] }