Quick Start
EthPM is an Ethereum package manifest containing data types for contracts, deployments, and source code using EIP-2678. The library validates and serializes contract related data and provides JSON schemas.
Dependencies
- python3 version 3.9 to 3.12.
Installation
via pip
You can install the latest release via pip:
pip install ethpm-types
via setuptools
You can clone the repository and use setuptools for the most up-to-date version:
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.
from ethpm_types import ContractInstance
contract = ContractInstance(contractType="ContractClassName", address="0x123...")
print(contract.contract_type)
Contract Type
Perhaps the most common artifact type from ethmp_types is ContractType.
ContractType represents components of a compiled contract, such as the .abi or the .runtime_bytecode.
from ethpm_types import ContractType
contract = ContractType(abi=[], runtimeBytecode="0x...")
For convenience, you can also initialize a ContractType using the .from_signature() classmethod:
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=[...], ...)
ABI JSON
To easily acquire the ABI JSON for a ContractType artifact, .model_dump_json() the .abi property:
from ethpm_types import ContractType
contract_type = ContractType(abi=[], runtimeBytecode="0x...")
# Use the ABI in other application requiring ABI JSON.
abi = contract_type.abi.model_dump_json()
Release files for ethpm-types 0.6.32
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ethpm_types-0.6.32.tar.gz | 1.2 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ethpm_types-0.6.32-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.2 MB
Release files / ethpm_types-0.6.32.tar.gz
| Download URL | ethpm_types-0.6.32.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9a1c29394121b8db222cdf2b00d0d76e74801a320e9c8485b2803548ccc5dba9
|
|
BLAKE2b-256 checksum How to use checksums |
f3875dba593550fd3d822af40631c1f97754bce88ce4d0a3e488cf172842181d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.
Transparency logRelease files / ethpm_types-0.6.32-py3-none-any.whl
| Download URL | ethpm_types-0.6.32-py3-none-any.whl |
|---|---|
| Size | 35.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
82acdb9f514c64fb75693b5a4a09e506f747133ec7a78bbc1a4b78c5b0d3cce9
|
|
BLAKE2b-256 checksum How to use checksums |
7987dd8b46b44891634e27926d82dbe4a3acaeb5a7f654b92044df878931e65c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.
Transparency log