# 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/32/36/47754d38268399e7acc35495e6b1e845035f7854245993432ebc5df9e0c7/ethpm-types-0.6.19.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.19",
"project_urls": {
"Homepage": "https://github.com/ApeWorX/ethpm-types"
},
"split_keywords": [
"ethereum"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "36382682004f5046e4fd2bc86e9aac61f983c9abd96a9e4d96d207e5612e034d",
"md5": "578068ec971e0a897ad08ea85bb32eaf",
"sha256": "eb777ad4ddcb3f9660ace663934056fa8ff7e7b0bf935d9ca6f838d1b51553dc"
},
"downloads": -1,
"filename": "ethpm_types-0.6.19-py3-none-any.whl",
"has_sig": false,
"md5_digest": "578068ec971e0a897ad08ea85bb32eaf",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4,>=3.9",
"size": 33896,
"upload_time": "2024-11-21T18:26:43",
"upload_time_iso_8601": "2024-11-21T18:26:43.322318Z",
"url": "https://files.pythonhosted.org/packages/36/38/2682004f5046e4fd2bc86e9aac61f983c9abd96a9e4d96d207e5612e034d/ethpm_types-0.6.19-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "323647754d38268399e7acc35495e6b1e845035f7854245993432ebc5df9e0c7",
"md5": "5221460b8b3edaf565c4d5d61cc5d39c",
"sha256": "ada3f98cbf6387b72a8c43807bfd9eef950151862b8693fe5bff7f89b2904e2c"
},
"downloads": -1,
"filename": "ethpm-types-0.6.19.tar.gz",
"has_sig": false,
"md5_digest": "5221460b8b3edaf565c4d5d61cc5d39c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.9",
"size": 1223638,
"upload_time": "2024-11-21T18:26:45",
"upload_time_iso_8601": "2024-11-21T18:26:45.258309Z",
"url": "https://files.pythonhosted.org/packages/32/36/47754d38268399e7acc35495e6b1e845035f7854245993432ebc5df9e0c7/ethpm-types-0.6.19.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-21 18:26:45",
"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"
}