brk-client 0.1.0a6__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,46 @@
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
+
24
+ # Logs
25
+ *.log*
26
+
27
+ # Environment variables/configs
28
+ .env
29
+
30
+ # Profiling
31
+ profile.json.gz
32
+ flamegraph.svg
33
+ *.trace
34
+
35
+ # AI
36
+ .claude/settings*
37
+
38
+ # Expand
39
+ expand.rs
40
+
41
+ # Benchmarks
42
+ [0-9]/
43
+ /benches
44
+
45
+ # AI
46
+ .claude
@@ -0,0 +1 @@
1
+ 3.12
@@ -0,0 +1,56 @@
1
+ Metadata-Version: 2.4
2
+ Name: brk-client
3
+ Version: 0.1.0a6
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 :: 3 - Alpha
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Typing :: Typed
17
+ Requires-Python: >=3.11
18
+ Description-Content-Type: text/markdown
19
+
20
+ # brk-client
21
+
22
+ Python client for the [Bitcoin Research Kit](https://github.com/bitcoinresearchkit/brk) API.
23
+
24
+ [PyPI](https://pypi.org/project/brk-client/) | [API Reference](https://github.com/bitcoinresearchkit/brk/blob/main/packages/brk_client/DOCS.md)
25
+
26
+ ## Installation
27
+
28
+ ```bash
29
+ pip install brk-client
30
+ # or
31
+ uv add brk-client
32
+ ```
33
+
34
+ ## Quick Start
35
+
36
+ ```python
37
+ from brk_client import BrkClient
38
+
39
+ # Use the free public API or your own instance
40
+ # Has optional `, timeout=60.0` argument
41
+ client = BrkClient("https://bitview.space")
42
+
43
+ # Blockchain data (mempool.space compatible)
44
+ block = client.get_block_by_height(800000)
45
+ tx = client.get_tx("abc123...")
46
+ address = client.get_address("bc1q...")
47
+
48
+ # Metrics API - typed, chainable
49
+ prices = client.metrics.price.usd.split.close \
50
+ .by.dateindex() \
51
+ .tail(30) \
52
+ .fetch() # Last 30 items
53
+
54
+ # Generic metric fetching
55
+ data = client.get_metric("price_close", "dateindex", -30)
56
+ ```
@@ -0,0 +1,37 @@
1
+ # brk-client
2
+
3
+ Python client for the [Bitcoin Research Kit](https://github.com/bitcoinresearchkit/brk) API.
4
+
5
+ [PyPI](https://pypi.org/project/brk-client/) | [API Reference](https://github.com/bitcoinresearchkit/brk/blob/main/packages/brk_client/DOCS.md)
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ pip install brk-client
11
+ # or
12
+ uv add brk-client
13
+ ```
14
+
15
+ ## Quick Start
16
+
17
+ ```python
18
+ from brk_client import BrkClient
19
+
20
+ # Use the free public API or your own instance
21
+ # Has optional `, timeout=60.0` argument
22
+ client = BrkClient("https://bitview.space")
23
+
24
+ # Blockchain data (mempool.space compatible)
25
+ block = client.get_block_by_height(800000)
26
+ tx = client.get_tx("abc123...")
27
+ address = client.get_address("bc1q...")
28
+
29
+ # Metrics API - typed, chainable
30
+ prices = client.metrics.price.usd.split.close \
31
+ .by.dateindex() \
32
+ .tail(30) \
33
+ .fetch() # Last 30 items
34
+
35
+ # Generic metric fetching
36
+ data = client.get_metric("price_close", "dateindex", -30)
37
+ ```