# 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/e4/0f/6e4030483e79486cf26ff3ff7e657b689e2eb2ef1b80f644b4397432496e/ethpm_types-0.6.22.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",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "ethpm_types: Implementation of EIP-2678",
"version": "0.6.22",
"project_urls": {
"Homepage": "https://github.com/ApeWorX/ethpm-types"
},
"split_keywords": [
"ethereum"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "d8356af838e2eeb185cf34b6769871bd23988c4fb5a00dea519d2c5d4065a793",
"md5": "c08acb018d089c486d72b19e4cd6e8d6",
"sha256": "12aa809474b2a57f7d840bff6f80434c7f00017a7b193bbbe339ab2d0c156f59"
},
"downloads": -1,
"filename": "ethpm_types-0.6.22-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c08acb018d089c486d72b19e4cd6e8d6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4,>=3.9",
"size": 34814,
"upload_time": "2025-02-14T05:52:34",
"upload_time_iso_8601": "2025-02-14T05:52:34.837515Z",
"url": "https://files.pythonhosted.org/packages/d8/35/6af838e2eeb185cf34b6769871bd23988c4fb5a00dea519d2c5d4065a793/ethpm_types-0.6.22-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e40f6e4030483e79486cf26ff3ff7e657b689e2eb2ef1b80f644b4397432496e",
"md5": "185b672263251fdaa7d97eeca4366e91",
"sha256": "b3733c34394e66c6ebf4b342336a4d673b5819f2aa5421f3bf8415611e45cf0a"
},
"downloads": -1,
"filename": "ethpm_types-0.6.22.tar.gz",
"has_sig": false,
"md5_digest": "185b672263251fdaa7d97eeca4366e91",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.9",
"size": 1226194,
"upload_time": "2025-02-14T05:52:37",
"upload_time_iso_8601": "2025-02-14T05:52:37.591382Z",
"url": "https://files.pythonhosted.org/packages/e4/0f/6e4030483e79486cf26ff3ff7e657b689e2eb2ef1b80f644b4397432496e/ethpm_types-0.6.22.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-14 05:52:37",
"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"
}