ethpm-types


Nameethpm-types JSON
Version 0.6.18 PyPI version JSON
download
home_pagehttps://github.com/ApeWorX/ethpm-types
Summaryethpm_types: Implementation of EIP-2678
upload_time2024-10-03 17:05:41
maintainerNone
docs_urlNone
authorApeWorX Ltd.
requires_python<4,>=3.9
licenseApache-2.0
keywords ethereum
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Quick Start

EthPM is an Ethereum package manifest containing data types for contracts, deployments, and source code using [EIP-2678](https://eips.ethereum.org/EIPS/eip-2678).
The library validates and serializes contract related data and provides JSON schemas.

## Dependencies

- [python3](https://www.python.org/downloads) version 3.9 to 3.12.

## Installation

### via `pip`

You can install the latest release via [`pip`](https://pypi.org/project/pip/):

```bash
pip install ethpm-types
```

### via `setuptools`

You can clone the repository and use [`setuptools`](https://github.com/pypa/setuptools) for the most up-to-date version:

```bash
git clone https://github.com/ApeWorX/ethpm-types.git
cd ethpm-types
python3 setup.py install
```

## Quick Usage

Starting with a dictionary of attribute data, such as a contract instance, you can build an EthPM typed object.

```python
from ethpm_types import ContractInstance

contract = ContractInstance(contractType="ContractClassName", address="0x123...")
print(contract.contract_type)
```

You can also parse `ethpm_types.abi` objects using the `.from_signature` classmethod:

```py
from ethpm_types.abi import MethodABI, EventABI

>>> MethodABI.from_signature("function_name(uint256 arg1)")
MethodABI(type='function', name='function_name', inputs=[...], ...)

>>> EventABI.from_signature("Transfer(address indexed from, address indexed to, uint256 value)")
EventABI(type='event', name='Transfer', inputs=[...], ...)
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ApeWorX/ethpm-types",
    "name": "ethpm-types",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4,>=3.9",
    "maintainer_email": null,
    "keywords": "ethereum",
    "author": "ApeWorX Ltd.",
    "author_email": "admin@apeworx.io",
    "download_url": "https://files.pythonhosted.org/packages/4a/a8/7a2e71c230a6cf1d629eb4dc2aa3749fdffe7bde64ab3e81ed653a9a811e/ethpm-types-0.6.18.tar.gz",
    "platform": null,
    "description": "# Quick Start\n\nEthPM is an Ethereum package manifest containing data types for contracts, deployments, and source code using [EIP-2678](https://eips.ethereum.org/EIPS/eip-2678).\nThe library validates and serializes contract related data and provides JSON schemas.\n\n## Dependencies\n\n- [python3](https://www.python.org/downloads) version 3.9 to 3.12.\n\n## Installation\n\n### via `pip`\n\nYou can install the latest release via [`pip`](https://pypi.org/project/pip/):\n\n```bash\npip install ethpm-types\n```\n\n### via `setuptools`\n\nYou can clone the repository and use [`setuptools`](https://github.com/pypa/setuptools) for the most up-to-date version:\n\n```bash\ngit clone https://github.com/ApeWorX/ethpm-types.git\ncd ethpm-types\npython3 setup.py install\n```\n\n## Quick Usage\n\nStarting with a dictionary of attribute data, such as a contract instance, you can build an EthPM typed object.\n\n```python\nfrom ethpm_types import ContractInstance\n\ncontract = ContractInstance(contractType=\"ContractClassName\", address=\"0x123...\")\nprint(contract.contract_type)\n```\n\nYou can also parse `ethpm_types.abi` objects using the `.from_signature` classmethod:\n\n```py\nfrom ethpm_types.abi import MethodABI, EventABI\n\n>>> MethodABI.from_signature(\"function_name(uint256 arg1)\")\nMethodABI(type='function', name='function_name', inputs=[...], ...)\n\n>>> EventABI.from_signature(\"Transfer(address indexed from, address indexed to, uint256 value)\")\nEventABI(type='event', name='Transfer', inputs=[...], ...)\n```\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "ethpm_types: Implementation of EIP-2678",
    "version": "0.6.18",
    "project_urls": {
        "Homepage": "https://github.com/ApeWorX/ethpm-types"
    },
    "split_keywords": [
        "ethereum"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b8e6dd7fdebf33a3d83be1ba9e791c28b1a7dc2daeb1d6a96d642e683d5cf125",
                "md5": "bcbc001bb440d06454fa8e9c0d2cdc77",
                "sha256": "ffd8598970a57e015c53b4cac6ef110648061c3a02e6d6e375561d9feb57c9c9"
            },
            "downloads": -1,
            "filename": "ethpm_types-0.6.18-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bcbc001bb440d06454fa8e9c0d2cdc77",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.9",
            "size": 33726,
            "upload_time": "2024-10-03T17:05:39",
            "upload_time_iso_8601": "2024-10-03T17:05:39.732288Z",
            "url": "https://files.pythonhosted.org/packages/b8/e6/dd7fdebf33a3d83be1ba9e791c28b1a7dc2daeb1d6a96d642e683d5cf125/ethpm_types-0.6.18-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4aa87a2e71c230a6cf1d629eb4dc2aa3749fdffe7bde64ab3e81ed653a9a811e",
                "md5": "b8bc716147f20b3a69b19ea357e97547",
                "sha256": "727ed978a99db114ee57b833d28c2ac0105f70fcddcb524cc93ccb4bff50631e"
            },
            "downloads": -1,
            "filename": "ethpm-types-0.6.18.tar.gz",
            "has_sig": false,
            "md5_digest": "b8bc716147f20b3a69b19ea357e97547",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.9",
            "size": 1223468,
            "upload_time": "2024-10-03T17:05:41",
            "upload_time_iso_8601": "2024-10-03T17:05:41.786123Z",
            "url": "https://files.pythonhosted.org/packages/4a/a8/7a2e71c230a6cf1d629eb4dc2aa3749fdffe7bde64ab3e81ed653a9a811e/ethpm-types-0.6.18.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-03 17:05:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ApeWorX",
    "github_project": "ethpm-types",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ethpm-types"
}
        
Elapsed time: 0.38137s