Files
brk/packages/brk_client
2026-03-07 18:36:53 +01:00
..
2026-03-07 18:36:53 +01:00
2026-03-01 12:46:07 +01:00
2026-01-24 19:22:03 +01:00
2026-02-23 17:22:12 +01:00
2026-01-02 19:08:20 +01:00
2026-01-11 17:19:00 +01:00
2026-03-02 13:34:45 +01:00
2026-01-24 19:22:03 +01:00
2026-02-23 17:22:12 +01:00

brk-client

Python client for the Bitcoin Research Kit API.

Requires Python 3.9+. Zero dependencies.

PyPI | API Reference

Installation

pip install brk-client
# or
uv add brk-client

Or just copy brk_client/__init__.py into your project - it's a single file with no dependencies.

Quick Start

from brk_client import BrkClient

# Use the free public API or your own instance
# Has optional `, timeout=60.0` argument
client = BrkClient("https://bitview.space")

# Blockchain data (mempool.space compatible)
block = client.get_block_by_height(800000)
tx = client.get_tx("abc123...")
address = client.get_address("bc1q...")

# Metrics API - typed, chainable
prices = client.metrics.price.usd.split.close \
    .by.dateindex() \
    .tail(30) \
    .fetch()  # Last 30 items

# Generic metric fetching
data = client.get_metric("price_close", "dateindex", -30)