{ "info": { "author": "Piper Merriam", "author_email": "pipermerriam@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "ETHPM\n=====\n\n- parse and validate packages\n- given a web3 instance provide access to contract factory classes\n- given a web3 instance provide access to all of the deployed contract\n instances for the chain that web3 is connected to.\n- validate package bytecode matches compilation output.\n- validate deployed bytecode matches compilation output\n- access to packages dependencies\n- construct new packages\n\nWeb3\n----\n\nThe ``Package`` object will function much like the ``Contract`` class\nprovided by ``web3``. Rather than instantiating the base class provided\nby ``ethpm``, you will instead use a ``classmethod`` which generates a\nnew ``Package`` class for a given package.\n\n.. code:: python\n\n OwnedPackage = BasePackage.factory('/path/to/owned-v1.0.0.json')\n\nThen, the ``OwnedPackage`` can be instantiated with any ``web3``\nintance.\n\n.. code:: python\n\n owned_package = OwnedPackage(web3)\n\nA ``Package`` class can only be directly constructed from the parsed\npackage JSON. It can also be initialized with the package\u2019s URI or the\nlocal filesystem path to a package by using ``Package.from_file(path)``.\n\nContract Factories\n------------------\n\nContract factories should be accessible from the package class but you\nmust also provide a web3 instance.\n\n.. code:: python\n\n Owned = OwnedPackage.get_contract_factory(web3, 'owned')\n\nFrom a package instance, they are also available as properties.\n\n.. code:: python\n\n Owned = owned_package.contract_factories.owned\n\nIn cases where a contract uses a library, the contract factory will have\nunlinked bytecode. The ``ethpm`` package ships with its own subclass of\n``web3.contract.Contract`` with a few extra methods and properties\nrelated to bytecode linking\n\n.. code:: python\n\n >>> math = owned_package.contract_factories.math\n >>> math.has_linkable_bytecode\n True\n >>> math.is_bytecode_linked\n False\n >>> linked_math = math.link_bytecode({'MathLib': '0x1234...'})\n >>> linked_math.is_bytecode_linked\n True\n\n..\n\n Note: the actual format of the link data is not clear since library\n names aren\u2019t a one-size-fits all solution. We need the ability to\n specify specific link references in the code.\n\nDeployed Contracts\n------------------\n\nDeployed contracts are only available from package instances. The\npackage instance will filter the ``deployments`` based on the chain that\n``web3`` is connected to.\n\nAccessing deployments is done with property access\n\n.. code:: python\n\n package.deployed_contracts.Greeter\n\nIPFS\n----\n\nWe\u2019ll need a pluggable backend system for IPFS access. A built-in\ndefault one that defaults to using infura should be enough to get off\nthe ground.\n\nLower priority but important will be ensuring that a user can configure\nconnecting to their own IPFS node.\n\nVerifying Things\n----------------\n\nThe ``Package`` class should verify all of the following things.\n\n- Package json matches EthPM V2 Manifest Specification\n- Included bytecode matches compilation output\n- Deployed bytecode matches compilation output\n\nDependencies\n------------\n\nThe ``Package`` class should provide access to the full dependency tree.\n\n.. code:: python\n\n >>> owned_package.build_dependencies['zeppelin']\n \n\nTesting Strategy\n----------------\n\n- Load and validate packages from disk.\n- Access package data.\n- Access contract factories.\n\nEthPM-Spec\n----------\n\n- `EthPM-Spec `__ is referenced\n inside this repo as a submodule.*\\*\n- If you clone this repository, you should run this command to fetch\n the contents of the submodule\n\n.. code:: sh\n\n git submodule init\n\nRegistry URI\n------------\n\nThe URI to lookup a package from a registry should follow the following\nformat. (subject to change as the Registry Contract Standard makes it\u2019s\nway through the EIP process)\n\n::\n\n scheme://authority/package-name?version=x.x.x\n\n- URI must be a string type\n- ``scheme``: ``ercxxx``\n- ``authority``: Must be a valid ENS domain or a valid checksum address\n pointing towards a registry contract.\n- ``package-name``: Must conform to the package-name as specified in\n the\n `EthPM-Spec `__.\n- ``version``: The URI escaped version string, *should* conform to the\n `semver `__ version numbering specification.\n\ni.e. ``ercxxx://packages.zeppelinos.eth/owned?version=1.0.0``\n\nRelease setup\n-------------\n\nFor Debian-like systems:\n\n.. code:: sh\n\n apt install pandoc\n\nTo release a new version:\n\n.. code:: sh\n\n make release bump=$$VERSION_PART_TO_BUMP$$\n\nHow to bumpversion\n------------------\n\nThe version format for this repo is ``{major}.{minor}.{patch}`` for\nstable, and ``{major}.{minor}.{patch}-{stage}.{devnum}`` for unstable\n(``stage`` can be alpha or beta).\n\nTo issue the next version in line, specify which part to bump, like\n``make release bump=minor`` or ``make release bump=devnum``.\n\nIf you are in a beta version, ``make release bump=stage`` will switch to\na stable.\n\nTo issue an unstable version when the current version is stable, specify\nthe new version explicitly, like\n``make release bump=\"--new-version 4.0.0-alpha.1 devnum\"``\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ethpm/py-ethpm", "keywords": "ethereum", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "eth-pm", "package_url": "https://pypi.org/project/eth-pm/", "platform": "", "project_url": "https://pypi.org/project/eth-pm/", "project_urls": { "Homepage": "https://github.com/ethpm/py-ethpm" }, "release_url": "https://pypi.org/project/eth-pm/0.1.0a23/", "requires_dist": null, "requires_python": "", "summary": "Python abstraction for ERC190 packages.", "version": "0.1.0a23" }, "last_serial": 4201125, "releases": { "0.1.0a23": [ { "comment_text": "", "digests": { "md5": "fea9c5e0ec377b137d2c744283e5df79", "sha256": "4ca2fdc40c3812c7421f3dec8bffafaadee53622e2fafdd0f6225745e65830f4" }, "downloads": -1, "filename": "eth_pm-0.1.0a23-py3-none-any.whl", "has_sig": false, "md5_digest": "fea9c5e0ec377b137d2c744283e5df79", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 15741, "upload_time": "2018-06-29T16:07:58", "url": "https://files.pythonhosted.org/packages/e5/be/4479ae9bec1fc02b829b9f273ac1facccb1f732f03098017f44c3c72e75e/eth_pm-0.1.0a23-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ea8b41b73e436d4f4e276b4b6a23db11", "sha256": "4cdbf0c2dfc9a0d7aa9348e5ac4b8aad6ccdded8c560056b556d0b39cff087de" }, "downloads": -1, "filename": "eth-pm-0.1.0a23.tar.gz", "has_sig": false, "md5_digest": "ea8b41b73e436d4f4e276b4b6a23db11", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14685, "upload_time": "2018-06-29T16:07:57", "url": "https://files.pythonhosted.org/packages/cb/18/d92dc1fe819430dc6b1395db55ddaaf2316b0c288cc2d9ec9c42079d5cfe/eth-pm-0.1.0a23.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fea9c5e0ec377b137d2c744283e5df79", "sha256": "4ca2fdc40c3812c7421f3dec8bffafaadee53622e2fafdd0f6225745e65830f4" }, "downloads": -1, "filename": "eth_pm-0.1.0a23-py3-none-any.whl", "has_sig": false, "md5_digest": "fea9c5e0ec377b137d2c744283e5df79", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 15741, "upload_time": "2018-06-29T16:07:58", "url": "https://files.pythonhosted.org/packages/e5/be/4479ae9bec1fc02b829b9f273ac1facccb1f732f03098017f44c3c72e75e/eth_pm-0.1.0a23-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ea8b41b73e436d4f4e276b4b6a23db11", "sha256": "4cdbf0c2dfc9a0d7aa9348e5ac4b8aad6ccdded8c560056b556d0b39cff087de" }, "downloads": -1, "filename": "eth-pm-0.1.0a23.tar.gz", "has_sig": false, "md5_digest": "ea8b41b73e436d4f4e276b4b6a23db11", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14685, "upload_time": "2018-06-29T16:07:57", "url": "https://files.pythonhosted.org/packages/cb/18/d92dc1fe819430dc6b1395db55ddaaf2316b0c288cc2d9ec9c42079d5cfe/eth-pm-0.1.0a23.tar.gz" } ] }