A high-performance Python wrapper for Evrmore blockchain RPC commands with a seamless API
Project description
evrmore-rpc: Python Client for Evrmore Blockchain
A high-performance, fully featured Python client for the Evrmore blockchain. Designed for both synchronous and asynchronous environments, it includes full RPC and ZMQ support, automatic decoding of blocks and transactions, intelligent asset detection, and robust configuration options.
🚀 Features
- 🔄 Context-Aware: Automatically switches between sync and async modes
- ⚙️ Flexible Configuration: Load settings from
evrmore.conf, env vars, or manual args - 💡 Smart RPC Handling: Full method coverage with type hints and structured responses
- ⚡ Fast + Efficient: Connection pooling for low-latency concurrent RPC calls
- 🧠 Asset Intelligence: Auto-parses asset transactions with enhanced metadata
- 📡 ZMQ Notifications: Subscribe to real-time
BLOCK,TX,RAW_*,HASH_*events - 🧰 Fully Tested Utilities: Stress test, coverage verification, pooling demo, and more
📦 Installation
pip install evrmore-rpc
🧪 Quick Start
from evrmore_rpc import EvrmoreClient
client = EvrmoreClient()
info = client.getblockchaininfo()
print("Height:", info['blocks'])
print("Difficulty:", info['difficulty'])
🔁 Asynchronous Usage
import asyncio
from evrmore_rpc import EvrmoreClient
async def main():
client = EvrmoreClient()
info = await client.getblockchaininfo()
print("Height:", info['blocks'])
await client.close()
asyncio.run(main())
🧩 Configuration Options
# Default (evrmore.conf)
client = EvrmoreClient()
# Env vars (EVR_RPC_*)
client = EvrmoreClient()
# Manual args
client = EvrmoreClient(url="http://localhost:8819", rpcuser="user", rpcpassword="pass")
# Testnet toggle
client = EvrmoreClient(testnet=True)
Supports cookie authentication and auto-parsing of .cookie file.
💰 Asset Support
# Get asset info
info = client.getassetdata("MYTOKEN")
print(info['amount'], info['reissuable'])
# Transfer asset
txid = client.transfer("MYTOKEN", 100, "EVRAddress")
📡 ZMQ Notifications (Real-Time)
from evrmore_rpc import EvrmoreClient
from evrmore_rpc.zmq import EvrmoreZMQClient, ZMQTopic
rpc = EvrmoreClient()
zmq = EvrmoreZMQClient(rpc_client=rpc)
@zmq.on(ZMQTopic.BLOCK)
def block_handler(note):
print(f"Block #{note.height} with {len(note.block['tx'])} txs")
@zmq.on(ZMQTopic.TX)
def tx_handler(note):
print(f"TX {note.tx['txid']} has {note._vin_count} inputs")
zmq.start()
Supports:
HASH_BLOCK,HASH_TX,RAW_BLOCK,RAW_TXBLOCK,TX(auto-decoded)- Asset metadata and event info on decoded transactions
📊 Stress Test Results
Tested on local node and remote RPC endpoint:
| Mode | Time | RPS | Avg (ms) | Median | Min | Max |
|---|---|---|---|---|---|---|
| Local Async | 0.01 s | 10442.42 | 0.59 | 0.50 | 0.39 | 1.84 |
| Local Sync | 0.06 s | 1861.26 | 1.52 | 1.42 | 0.43 | 3.40 |
| Remote Async | 1.75 s | 57.31 | 167.77 | 155.93 | 111 | 324 |
| Remote Sync | 1.86 s | 53.83 | 160.39 | 163.26 | 112 | 310 |
🔬 Examples & Utilities
readme_test.py— basic client usagestress_test.py— performance benchmarking, concurrency testsconnection_pooling.py— pooled connections for sync/asyncflexible_config.py— shows all configuration optionsrpc_coverage.py— full method coverage checkerzmq_notifications.py— live decoded transaction/block stream
Run with:
python3 -m evrmore_rpc.stress_test --sync --remote
🧪 Requirements
- Python 3.8+
- Evrmore daemon running with RPC and optional ZMQ endpoints
🪪 License
MIT License — See LICENSE
🤝 Contributing
PRs welcome! Please lint, document, and include examples.
git clone https://github.com/youruser/evrmore-rpc
cd evrmore-rpc
python3 -m venv .venv && source .venv/bin/activate
pip install -e .[dev]
Test locally with:
python3 -m evrmore_rpc.stress_test
🧭 Summary
evrmore-rpc is not just a wrapper — it's a full developer toolkit for Evrmore blockchain apps. With context-aware clients, full RPC coverage, rich ZMQ integration, and intelligent asset decoding, it's built to power production-grade wallets, explorers, indexers, and game engines alike.
Enjoy building with it.
Project details
Release history Release notifications | RSS feed
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 evrmore_rpc-4.0.2.tar.gz.
File metadata
- Download URL: evrmore_rpc-4.0.2.tar.gz
- Upload date:
- Size: 45.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b4e817996ab223a82b5c93a592199c347efd2c1e8c155b83ffc6d4b84abef6b
|
|
| MD5 |
0ede1c178da1c9151dc194bb5ca0a966
|
|
| BLAKE2b-256 |
2a8d75e9ff6266b75d81bb5e21a3669693d24aa2ab62b4ebeae48ce9b68cbc29
|
File details
Details for the file evrmore_rpc-4.0.2-py3-none-any.whl.
File metadata
- Download URL: evrmore_rpc-4.0.2-py3-none-any.whl
- Upload date:
- Size: 48.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99485990a00b577db5eb91c79c3c933ea34e9374638c33c71e9018d9f8bdd8a2
|
|
| MD5 |
6975e2f8b3613b22f80f04005d368f80
|
|
| BLAKE2b-256 |
40a3a13b482767d92438e5686741dd57a97c6cbcba023e3262cfb4548b7564c0
|