Etharc
A modern, fully typed Python SDK for Ethereum and EVM-compatible chains
A complete Python-native alternative to web3.py: typed clients, ABI,
contracts, tokens, ENS, simulation, tracing, and account abstraction
under one consistent, strongly typed API.
Documentation · Capabilities · Installation · Usage · Contributing
Capabilities
| Family | Covers |
|---|---|
| Types & units | Address, Hash, Signature, Wei; integer base units, Decimal for display |
| RPC & clients | Client, AsyncClient; HTTP, WebSocket, IPC, batching, retries |
| Chains | Built-in chain definitions, capabilities, chain id validation |
| Accounts & signing | Local accounts, keystores, mnemonics; EIP-191 messages, EIP-712 typed data |
| ABI | Encoding, decoding, selectors, events, custom errors, revert reasons |
| Contracts | Deployment, reading, writing; statically typed bindings from ABIs |
| Transactions | Legacy, EIP-2930, EIP-1559, EIP-4844, EIP-7702; fees, replacement, confirmations |
| Blocks & events | Blocks, receipts, logs, filters, decoding, subscriptions |
| Tokens | ERC-20, ERC-721, ERC-1155, ERC-4626 |
| Fees & multicall | Gas estimation, EIP-1559 fee calculation, Multicall3 batching |
| ENS | Normalization, resolution, reverse resolution, text records |
| Simulation & tracing | Remote and local simulation, structured results, call trees, state diffs |
| Account abstraction | ERC-4337 user operations, bundler client, paymasters |
Installation
Etharc supports Python 3.12 and newer.
Add it to a uv project:
uv add etharc
To install it in an active Python environment:
pip install etharc
To build from source:
git clone https://github.com/oceanus403/etharc
cd etharc
uv sync --locked
Usage
from etharc import (
MAINNET,
Client,
ERC20,
Address,
create_account,
parse_ether,
sign_message,
)
# Read-only: balances and token data need no account.
client = Client.from_chain(MAINNET)
balance = client.get_balance("0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe")
print(balance) # in wei
usdc = ERC20("0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", client)
print(usdc.symbol(), usdc.decimals()) # USDC 6
# Sign locally; nothing is broadcast until you ask for it.
account = create_account()
signature = sign_message(account, "hello etharc")
print(signature.r, signature.s, signature.v)
# Send an EIP-1559 transfer; nonce, gas, and fees are filled in.
from etharc import build_eip1559
tx = build_eip1559(
Address("0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe"),
value=parse_ether("0.01"),
max_fee_per_gas=20_000_000_000,
max_priority_fee_per_gas=1_000_000_000,
)
tx_hash = client.send_transaction(account, tx)
receipt = client.wait_for_transaction_receipt(tx_hash)
print(receipt.succeeded)
Project status
Etharc 0.1.0 is released. The API may change before 1.0.
License
MIT. See LICENSE.
Metadata
Release files for etharc 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| etharc-0.1.0.tar.gz | 39.1 kB | With provenance | Details for etharc-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| etharc-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for etharc-0.1.0-py3-none-any.whl |
Total release size: 87.2 kB
Release files / etharc-0.1.0.tar.gz
| Download URL | etharc-0.1.0.tar.gz |
|---|---|
| Size | 39.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d5cc5ec127ed8fed45e31badfc3c1569351c9de9b92dd9efdca3be05f83b3a01
|
|
BLAKE2b-256 checksum How to use checksums |
8151abb3777ab6bcff965bc670f1f773fe3051d047b6e544603c2529a2ce771f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 26, 2026.
Transparency logRelease files / etharc-0.1.0-py3-none-any.whl
| Download URL | etharc-0.1.0-py3-none-any.whl |
|---|---|
| Size | 48.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0318d404fc989d5e874e56cf6e0dfd905d96aba5acb3eda2f2dc244bff3075fc
|
|
BLAKE2b-256 checksum How to use checksums |
50a0b53257ef45f3685d8dc40682160bf863fb83de0d1995d1f5554017023e73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 26, 2026.
Transparency logSecurity for etharc 0.1.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for etharc-0.1.0.tar.gz
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 Nov 26, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.