blockchain-compare-py
Compare blockchain networks (NEAR, Ethereum, Solana) with latency measurement and visualization tools.
Requirements
- Python 3.9+
Installation
pip install blockchain-compare-py
Optional Dependencies
pip install pandas matplotlib
Quick Start
from blockchain_compare_py import BlockchainComparePyClient
client = BlockchainComparePyClient(timeout=10)
Methods
| Method | Description |
|---|---|
get_block_height(chain) |
Get current block height for a chain |
measure_latency(chain, samples) |
Measure RPC latency for a chain |
compare_latency() |
Compare latency across all chains |
get_metrics(chain) |
Get combined metrics for a chain |
compare_all() |
Compare all metrics across all chains |
to_dataframe() |
Export results as a pandas DataFrame |
plot_latency() |
Plot latency comparison chart |
plot_block_heights() |
Plot block height comparison chart |
Supported Chains
- NEAR —
https://rpc.mainnet.near.org - Ethereum —
https://cloudflare-eth.com - Solana —
https://api.mainnet-beta.solana.com
Example
client = BlockchainComparePyClient()
Compare latency across chains
results = client.compare_latency()
Export to DataFrame (requires pandas)
df = client.to_dataframe()
Visualize (requires matplotlib)
client.plot_latency() client.plot_block_heights()
License
MIT
Metadata
Release files for blockchain-compare-py 1.0.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 | |
|---|---|---|---|
| blockchain_compare_py-1.0.0.tar.gz | 3.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| blockchain_compare_py-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.5 kB
Release files / blockchain_compare_py-1.0.0.tar.gz
| Download URL | blockchain_compare_py-1.0.0.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
df0fd210208a7f360dfa1c9464f78ae70c9d231d775fc63d76cadd9483f01a60
|
|
BLAKE2b-256 checksum How to use checksums |
abc855c7ad9facea94fc1bd719d9517507c1de584bc921b949406e93d2a77d00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / blockchain_compare_py-1.0.0-py3-none-any.whl
| Download URL | blockchain_compare_py-1.0.0-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
39c548c1e0cd73dcfcf9d8e80c042c62cc99a11ca0de71453cc2da5c1ba8b6a5
|
|
BLAKE2b-256 checksum How to use checksums |
c56304f27d2761ad31cf3a857203dc9facbf01974af200a4dfaba14ca2c6f212
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|