Skip to main content

Bitcoin on-chain analytics client — thousands of metrics, block explorer, and address index

Project description

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

brk_client-0.3.0a4.tar.gz (138.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

brk_client-0.3.0a4-py3-none-any.whl (50.2 kB view details)

Uploaded Python 3

File details

Details for the file brk_client-0.3.0a4.tar.gz.

File metadata

  • Download URL: brk_client-0.3.0a4.tar.gz
  • Upload date:
  • Size: 138.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for brk_client-0.3.0a4.tar.gz
Algorithm Hash digest
SHA256 72733deea5c6ffa43a553fa7f4207e02ba83fe57167fe96d469cff99a263f101
MD5 8243c55bb3b39a7fd3edf3d6526cb018
BLAKE2b-256 4c38e7036cc81af38f8ecd1e22129e589edc411142245db59ee5e1dedd3ab20c

See more details on using hashes here.

File details

Details for the file brk_client-0.3.0a4-py3-none-any.whl.

File metadata

  • Download URL: brk_client-0.3.0a4-py3-none-any.whl
  • Upload date:
  • Size: 50.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for brk_client-0.3.0a4-py3-none-any.whl
Algorithm Hash digest
SHA256 848e48f3631400bc631c34a732277d79e40445b2a53688384ea2eefe867ba436
MD5 1058af080a4aed48b0b34ab1f96266f0
BLAKE2b-256 578c290dfa28163bb3f8f8ef19055b269bd5102e5453d1c90c719b0dfa90db65

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page