ERPC SDK for Python
Async Python client for ERPC. It covers standard Solana and Ethereum JSON-RPC, indexed assets, history, leader and analytics RPC, WebSocket subscriptions, price REST and server-sent events, account usage, and scoped Cloud reads.
python -m pip install erpc-sdk
Python 3.11 or newer is required.
Quick start
import asyncio
import os
from erpc_sdk import ErpcClient, ErpcClientConfig
async def main() -> None:
async with ErpcClient(ErpcClientConfig(os.environ["ERPC_API_KEY"])) as erpc:
slot = await erpc.solana.rpc.get_slot().send()
chain_id = await erpc.ethereum.rpc.eth_chain_id().send()
print(slot, chain_id)
asyncio.run(main())
Both exact wire names (getSlot, eth_chainId) and Python snake-case aliases
(get_slot, eth_chain_id) create inert requests. Network I/O starts only
when send() is awaited. request() restricts calls to the namespace catalog;
raw() is the forward-compatible escape hatch.
Namespaces
| Namespace | Purpose |
|---|---|
erpc.solana.rpc |
Standard Solana JSON-RPC |
erpc.solana.das |
Indexed assets and tokens |
erpc.solana.history |
Address transactions and transfers |
erpc.solana.leaders |
Leader slots and validator information |
erpc.solana.analytics |
Epoch, slot, program, and TPS analytics |
erpc.solana.subscriptions |
Enhanced WebSocket subscriptions |
erpc.ethereum.rpc |
Standard Ethereum JSON-RPC |
erpc.ethereum.subscriptions |
Ethereum WebSocket subscriptions |
erpc.price |
Price metadata, updates, and SSE streams |
erpc.account |
Token balance |
erpc.usage |
Masked monthly API-key usage |
Intact batches
results = await erpc.solana.rpc.batch([
{"method": "getSlot", "params": []},
{"method": "getBlockHeight", "params": []},
]).send()
The SDK sends one caller batch as one server batch, restores caller order, accepts at most 256 calls, and rejects invalid mixed or unsupported batches locally. It never silently splits a batch.
Subscriptions
subscription = await erpc.ethereum.subscriptions.subscribe("newHeads")
async for header in subscription:
print(header)
await subscription.unsubscribe()
break
Solana exposes account_subscribe, transaction_subscribe, and
raw_subscribe. HTTP requests accept a RequestOptions(cancel_event=...);
normal asyncio task cancellation is also preserved.
Cloud reads
from erpc_sdk import ErpcCloudClient, ErpcCloudClientConfig
async with ErpcCloudClient(ErpcCloudClientConfig(access_token)) as cloud:
offerings = await cloud.catalog.list()
resources = await cloud.resources.list()
Cloud configuration accepts HTTPS endpoints and localhost HTTP endpoints for testing. It retains only the access token supplied by the caller and does not implement interactive authorization or refresh-credential storage.
Safety boundaries
- Credentials are redacted from configuration representations, public endpoints, transport errors, and JSON-RPC error data.
- State-changing calls, including transaction submission, are never retried.
- REST, JSON-RPC, and caller batch boundaries remain explicit.
- Unknown methods remain available through
raw()without being included in the typed compatibility catalog.
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 erpc_sdk-0.3.0.tar.gz.
File metadata
- Download URL: erpc_sdk-0.3.0.tar.gz
- Upload date:
- Size: 21.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 |
a29cd5d1600ebe5cdd0b2c6182c23cb7993d7d15030079c39e7310590534464b
|
|
| MD5 |
89a89574e3a80cd97e49d90939dbb734
|
|
| BLAKE2b-256 |
d43a00e69f4a1802223eda02a42bdcf70b607e36bc4d5ba23dfe98758630fc40
|
Provenance
The following attestation bundles were made for erpc_sdk-0.3.0.tar.gz:
Publisher:
release.yml on elsoul/erpc-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
erpc_sdk-0.3.0.tar.gz -
Subject digest:
a29cd5d1600ebe5cdd0b2c6182c23cb7993d7d15030079c39e7310590534464b - Sigstore transparency entry: 2636956043
- Sigstore integration time:
-
Permalink:
elsoul/erpc-sdk@7a89120558b6df70bbab1df710e84247474ebb08 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/elsoul
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7a89120558b6df70bbab1df710e84247474ebb08 -
Trigger Event:
push
-
Statement type:
File details
Details for the file erpc_sdk-0.3.0-py3-none-any.whl.
File metadata
- Download URL: erpc_sdk-0.3.0-py3-none-any.whl
- Upload date:
- Size: 23.2 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 |
bd1a2ed4cd468f15f362c49d4bad2c260a901a2880ada94bfd69a5307a3d58aa
|
|
| MD5 |
7bd52f79bbd8aca34fc587423e40bd4a
|
|
| BLAKE2b-256 |
3fbe0824e9fefde84442ba29168360be29ad38917ebe041ffbf100537408b466
|
Provenance
The following attestation bundles were made for erpc_sdk-0.3.0-py3-none-any.whl:
Publisher:
release.yml on elsoul/erpc-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
erpc_sdk-0.3.0-py3-none-any.whl -
Subject digest:
bd1a2ed4cd468f15f362c49d4bad2c260a901a2880ada94bfd69a5307a3d58aa - Sigstore transparency entry: 2636956127
- Sigstore integration time:
-
Permalink:
elsoul/erpc-sdk@7a89120558b6df70bbab1df710e84247474ebb08 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/elsoul
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7a89120558b6df70bbab1df710e84247474ebb08 -
Trigger Event:
push
-
Statement type: