Metadata-Version: 2.4
Name: blockchain-compare-py
Version: 1.0.0
Summary: PyPI Package - blockchain-compare-py v4
License: MIT
Project-URL: Homepage, https://github.com/worksOnMyFridge/blockchain-compare-py
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: matplotlib>=3.7
Requires-Dist: pandas>=2.0
Requires-Dist: aiohttp>=3.9
Requires-Dist: requests>=2.31

# 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
