brk-client 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,50 @@
1
+ # Mac OS
2
+ .DS_Store
3
+
4
+ # Builds
5
+ target
6
+ websites/dist
7
+ bridge/
8
+ /ids.txt
9
+ rust_out
10
+
11
+ # Copies
12
+ *\ copy*
13
+
14
+ # Ignored
15
+ _*
16
+ !__*.py
17
+ /*.md
18
+ /*.py
19
+ /*.json
20
+ /*.html
21
+ /research
22
+ /filter_*
23
+ /heatmaps*
24
+ /oracle*
25
+ /playground
26
+ /*.txt
27
+
28
+ # Logs
29
+ *.log*
30
+
31
+ # Environment variables/configs
32
+ .env
33
+
34
+ # Profiling
35
+ profile.json.gz
36
+ flamegraph.svg
37
+ *.trace
38
+
39
+ # AI
40
+ .claude/settings*
41
+
42
+ # Expand
43
+ expand.rs
44
+
45
+ # Benchmarks
46
+ [0-9]/
47
+ /benches
48
+
49
+ # AI
50
+ .claude
@@ -0,0 +1 @@
1
+ 3.9
@@ -0,0 +1,62 @@
1
+ Metadata-Version: 2.4
2
+ Name: brk-client
3
+ Version: 0.1.0
4
+ Summary: Python client for the Bitcoin Research Kit
5
+ Project-URL: Homepage, https://bitcoinresearchkit.org
6
+ Project-URL: Repository, https://github.com/bitcoinresearchkit/brk
7
+ License-Expression: MIT
8
+ Keywords: analytics,bitcoin,blockchain,on-chain
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Typing :: Typed
19
+ Requires-Python: >=3.9
20
+ Description-Content-Type: text/markdown
21
+
22
+ # brk-client
23
+
24
+ Python client for the [Bitcoin Research Kit](https://github.com/bitcoinresearchkit/brk) API.
25
+
26
+ Requires Python 3.9+. Zero dependencies.
27
+
28
+ [PyPI](https://pypi.org/project/brk-client/) | [API Reference](https://github.com/bitcoinresearchkit/brk/blob/main/packages/brk_client/DOCS.md)
29
+
30
+ ## Installation
31
+
32
+ ```bash
33
+ pip install brk-client
34
+ # or
35
+ uv add brk-client
36
+ ```
37
+
38
+ Or just copy [`brk_client/__init__.py`](./brk_client/__init__.py) into your project - it's a single file with no dependencies.
39
+
40
+ ## Quick Start
41
+
42
+ ```python
43
+ from brk_client import BrkClient
44
+
45
+ # Use the free public API or your own instance
46
+ # Has optional `, timeout=60.0` argument
47
+ client = BrkClient("https://bitview.space")
48
+
49
+ # Blockchain data (mempool.space compatible)
50
+ block = client.get_block_by_height(800000)
51
+ tx = client.get_tx("abc123...")
52
+ address = client.get_address("bc1q...")
53
+
54
+ # Metrics API - typed, chainable
55
+ prices = client.metrics.price.usd.split.close \
56
+ .by.dateindex() \
57
+ .tail(30) \
58
+ .fetch() # Last 30 items
59
+
60
+ # Generic metric fetching
61
+ data = client.get_metric("price_close", "dateindex", -30)
62
+ ```
@@ -0,0 +1,41 @@
1
+ # brk-client
2
+
3
+ Python client for the [Bitcoin Research Kit](https://github.com/bitcoinresearchkit/brk) API.
4
+
5
+ Requires Python 3.9+. Zero dependencies.
6
+
7
+ [PyPI](https://pypi.org/project/brk-client/) | [API Reference](https://github.com/bitcoinresearchkit/brk/blob/main/packages/brk_client/DOCS.md)
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ pip install brk-client
13
+ # or
14
+ uv add brk-client
15
+ ```
16
+
17
+ Or just copy [`brk_client/__init__.py`](./brk_client/__init__.py) into your project - it's a single file with no dependencies.
18
+
19
+ ## Quick Start
20
+
21
+ ```python
22
+ from brk_client import BrkClient
23
+
24
+ # Use the free public API or your own instance
25
+ # Has optional `, timeout=60.0` argument
26
+ client = BrkClient("https://bitview.space")
27
+
28
+ # Blockchain data (mempool.space compatible)
29
+ block = client.get_block_by_height(800000)
30
+ tx = client.get_tx("abc123...")
31
+ address = client.get_address("bc1q...")
32
+
33
+ # Metrics API - typed, chainable
34
+ prices = client.metrics.price.usd.split.close \
35
+ .by.dateindex() \
36
+ .tail(30) \
37
+ .fetch() # Last 30 items
38
+
39
+ # Generic metric fetching
40
+ data = client.get_metric("price_close", "dateindex", -30)
41
+ ```