brk-client 0.1.0a2__tar.gz → 0.1.0a3__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.
@@ -17,6 +17,7 @@ _*
17
17
  /*.py
18
18
  /api.json
19
19
  /*.json
20
+ /*.html
20
21
 
21
22
  # Logs
22
23
  *.log*
@@ -0,0 +1,70 @@
1
+ Metadata-Version: 2.4
2
+ Name: brk-client
3
+ Version: 0.1.0a3
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
+ client = BrkClient("https://bitview.space")
41
+
42
+ # Blockchain data (mempool.space compatible)
43
+ block = client.get_block_by_height(800000)
44
+ tx = client.get_tx("abc123...")
45
+ address = client.get_address("bc1q...")
46
+
47
+ # Metrics API - typed, chainable
48
+ prices = client.metrics.price.usd.split.close \
49
+ .by.dateindex() \
50
+ .tail(30) \
51
+ .fetch() # Last 30 items
52
+
53
+ # Generic metric fetching
54
+ data = client.get_metric("price_close", "dateindex", -30)
55
+ ```
56
+
57
+ ## API
58
+
59
+ ```python
60
+ # Range methods
61
+ .head(n) # First n items
62
+ .tail(n) # Last n items
63
+ .fetch() # Execute the request
64
+ ```
65
+
66
+ ## Configuration
67
+
68
+ ```python
69
+ client = BrkClient("https://bitview.space", timeout=60.0)
70
+ ```
@@ -0,0 +1,51 @@
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
+ client = BrkClient("https://bitview.space")
22
+
23
+ # Blockchain data (mempool.space compatible)
24
+ block = client.get_block_by_height(800000)
25
+ tx = client.get_tx("abc123...")
26
+ address = client.get_address("bc1q...")
27
+
28
+ # Metrics API - typed, chainable
29
+ prices = client.metrics.price.usd.split.close \
30
+ .by.dateindex() \
31
+ .tail(30) \
32
+ .fetch() # Last 30 items
33
+
34
+ # Generic metric fetching
35
+ data = client.get_metric("price_close", "dateindex", -30)
36
+ ```
37
+
38
+ ## API
39
+
40
+ ```python
41
+ # Range methods
42
+ .head(n) # First n items
43
+ .tail(n) # Last n items
44
+ .fetch() # Execute the request
45
+ ```
46
+
47
+ ## Configuration
48
+
49
+ ```python
50
+ client = BrkClient("https://bitview.space", timeout=60.0)
51
+ ```