A fully typed, validated async client for the Etherscan API.
from typed_etherscan import Etherscan
async with Etherscan.new() as client: # reads ETHERSCAN_API_KEY from the environment
balance = await client.account.balance(address='0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae')
print(balance)
Why Typed Etherscan?
- 🎯 Precise Types:
Literalrequest parameters (module,action,closest, ...) so a typo is caught before the call leaves your machine. - ✅ Runtime Validation: every response is validated against Etherscan's own
status/message/resultenvelope by default. - ⚡ Async First: async HTTP built on
httpx, with a client-side rate limit for Etherscan's strict free-tier cap. - 📚 Full Surface: all 88 documented Etherscan V2 endpoints — account, blocks, contracts, gas tracker, logs, raw proxy RPC, stats, tokens, transactions, and usage — across every chain the V2 API supports.
Installation
pip install typed-etherscan
Documentation
- API Keys Setup — get an Etherscan API key and configure it
- How To — task-focused guides for common queries
- Reference — error handling, environment variables, async usage, timestamps
License
MIT — see LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file typed_etherscan-0.3.1.tar.gz.
File metadata
- Download URL: typed_etherscan-0.3.1.tar.gz
- Upload date:
- Size: 32.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f05b8b4a915defadd5c64ffa1e05c7d8a68f5ae0c9a14d5f43ab65bbf5af25ad
|
|
| MD5 |
a7d9e87f1bc84b2f84b51a717b14bbe1
|
|
| BLAKE2b-256 |
043c4046243d289c8c9ff43d9e5a7b5f1a27d032f5830a708aa6e7dac7c7ca4a
|
Provenance
The following attestation bundles were made for typed_etherscan-0.3.1.tar.gz:
Publisher:
release-etherscan.yml on tribulnation/typed
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
typed_etherscan-0.3.1.tar.gz -
Subject digest:
f05b8b4a915defadd5c64ffa1e05c7d8a68f5ae0c9a14d5f43ab65bbf5af25ad - Sigstore transparency entry: 2552773896
- Sigstore integration time:
-
Permalink:
tribulnation/typed@d73ebac8c9683489c58b94d8ab30623c45ff2844 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tribulnation
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-etherscan.yml@d73ebac8c9683489c58b94d8ab30623c45ff2844 -
Trigger Event:
pull_request
-
Statement type:
File details
Details for the file typed_etherscan-0.3.1-py3-none-any.whl.
File metadata
- Download URL: typed_etherscan-0.3.1-py3-none-any.whl
- Upload date:
- Size: 118.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce2b9cbf3cbe4cb827c64ca3f0dfc2c83b519fecf959caed6ebdfefcbac88a6d
|
|
| MD5 |
e20684e7840dfd27be0467a67d9c9b82
|
|
| BLAKE2b-256 |
19f2700764835f0b5b41693c97706d376af89f675f90f957461a7f66c6fa681d
|
Provenance
The following attestation bundles were made for typed_etherscan-0.3.1-py3-none-any.whl:
Publisher:
release-etherscan.yml on tribulnation/typed
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
typed_etherscan-0.3.1-py3-none-any.whl -
Subject digest:
ce2b9cbf3cbe4cb827c64ca3f0dfc2c83b519fecf959caed6ebdfefcbac88a6d - Sigstore transparency entry: 2552773955
- Sigstore integration time:
-
Permalink:
tribulnation/typed@d73ebac8c9683489c58b94d8ab30623c45ff2844 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tribulnation
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-etherscan.yml@d73ebac8c9683489c58b94d8ab30623c45ff2844 -
Trigger Event:
pull_request
-
Statement type: