brk-client 0.1.3__tar.gz → 0.1.4__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.
- {brk_client-0.1.3 → brk_client-0.1.4}/PKG-INFO +1 -1
- {brk_client-0.1.3 → brk_client-0.1.4}/brk_client/__init__.py +59 -33
- {brk_client-0.1.3 → brk_client-0.1.4}/pyproject.toml +1 -1
- {brk_client-0.1.3 → brk_client-0.1.4}/uv.lock +1 -1
- {brk_client-0.1.3 → brk_client-0.1.4}/.gitignore +0 -0
- {brk_client-0.1.3 → brk_client-0.1.4}/.python-version +0 -0
- {brk_client-0.1.3 → brk_client-0.1.4}/README.md +0 -0
- {brk_client-0.1.3 → brk_client-0.1.4}/pydoc-markdown.yml +0 -0
- {brk_client-0.1.3 → brk_client-0.1.4}/tests/test_basic.py +0 -0
- {brk_client-0.1.3 → brk_client-0.1.4}/tests/test_metric_data.py +0 -0
- {brk_client-0.1.3 → brk_client-0.1.4}/tests/test_tree.py +0 -0
|
@@ -2413,20 +2413,35 @@ class AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2(Generic[T]):
|
|
|
2413
2413
|
self.pct90: MetricPattern11[T] = MetricPattern11(client, _m(acc, 'pct90'))
|
|
2414
2414
|
self.sum: MetricPattern1[T] = MetricPattern1(client, _m(acc, 'sum'))
|
|
2415
2415
|
|
|
2416
|
+
class ActivityAddrCostOutputsRealizedRelativeSupplyUnrealizedPattern:
|
|
2417
|
+
"""Pattern struct for repeated tree structure."""
|
|
2418
|
+
|
|
2419
|
+
def __init__(self, client: BrkClientBase, acc: str):
|
|
2420
|
+
"""Create pattern node with accumulated metric name."""
|
|
2421
|
+
self.activity: CoinblocksCoindaysSatblocksSatdaysSentPattern = CoinblocksCoindaysSatblocksSatdaysSentPattern(client, acc)
|
|
2422
|
+
self.addr_count: MetricPattern1[StoredU64] = MetricPattern1(client, _m(acc, 'addr_count'))
|
|
2423
|
+
self.addr_count_30d_change: MetricPattern4[StoredF64] = MetricPattern4(client, _m(acc, 'addr_count_30d_change'))
|
|
2424
|
+
self.cost_basis: MaxMinPattern = MaxMinPattern(client, acc)
|
|
2425
|
+
self.outputs: UtxoPattern = UtxoPattern(client, _m(acc, 'utxo_count'))
|
|
2426
|
+
self.realized: CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern = CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern(client, acc)
|
|
2427
|
+
self.relative: InvestedNegNetNuplSupplyUnrealizedPattern = InvestedNegNetNuplSupplyUnrealizedPattern(client, acc)
|
|
2428
|
+
self.supply: _30dHalvedTotalPattern = _30dHalvedTotalPattern(client, acc)
|
|
2429
|
+
self.unrealized: GreedInvestedInvestorNegNetPainSupplyTotalUnrealizedPattern = GreedInvestedInvestorNegNetPainSupplyTotalUnrealizedPattern(client, acc)
|
|
2430
|
+
|
|
2416
2431
|
class AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern:
|
|
2417
2432
|
"""Pattern struct for repeated tree structure."""
|
|
2418
2433
|
|
|
2419
2434
|
def __init__(self, client: BrkClientBase, acc: str):
|
|
2420
2435
|
"""Create pattern node with accumulated metric name."""
|
|
2421
|
-
self.all:
|
|
2422
|
-
self.p2a:
|
|
2423
|
-
self.p2pk33:
|
|
2424
|
-
self.p2pk65:
|
|
2425
|
-
self.p2pkh:
|
|
2426
|
-
self.p2sh:
|
|
2427
|
-
self.p2tr:
|
|
2428
|
-
self.p2wpkh:
|
|
2429
|
-
self.p2wsh:
|
|
2436
|
+
self.all: _30dCountPattern = _30dCountPattern(client, acc)
|
|
2437
|
+
self.p2a: _30dCountPattern = _30dCountPattern(client, _p('p2a', acc))
|
|
2438
|
+
self.p2pk33: _30dCountPattern = _30dCountPattern(client, _p('p2pk33', acc))
|
|
2439
|
+
self.p2pk65: _30dCountPattern = _30dCountPattern(client, _p('p2pk65', acc))
|
|
2440
|
+
self.p2pkh: _30dCountPattern = _30dCountPattern(client, _p('p2pkh', acc))
|
|
2441
|
+
self.p2sh: _30dCountPattern = _30dCountPattern(client, _p('p2sh', acc))
|
|
2442
|
+
self.p2tr: _30dCountPattern = _30dCountPattern(client, _p('p2tr', acc))
|
|
2443
|
+
self.p2wpkh: _30dCountPattern = _30dCountPattern(client, _p('p2wpkh', acc))
|
|
2444
|
+
self.p2wsh: _30dCountPattern = _30dCountPattern(client, _p('p2wsh', acc))
|
|
2430
2445
|
|
|
2431
2446
|
class AverageMaxMedianMinPct10Pct25Pct75Pct90TxindexPattern(Generic[T]):
|
|
2432
2447
|
"""Pattern struct for repeated tree structure."""
|
|
@@ -2458,20 +2473,6 @@ class AverageBaseMaxMedianMinPct10Pct25Pct75Pct90Pattern(Generic[T]):
|
|
|
2458
2473
|
self.pct75: MetricPattern6[T] = MetricPattern6(client, _m(acc, 'pct75'))
|
|
2459
2474
|
self.pct90: MetricPattern6[T] = MetricPattern6(client, _m(acc, 'pct90'))
|
|
2460
2475
|
|
|
2461
|
-
class ActivityAddrCostOutputsRealizedRelativeSupplyUnrealizedPattern:
|
|
2462
|
-
"""Pattern struct for repeated tree structure."""
|
|
2463
|
-
|
|
2464
|
-
def __init__(self, client: BrkClientBase, acc: str):
|
|
2465
|
-
"""Create pattern node with accumulated metric name."""
|
|
2466
|
-
self.activity: CoinblocksCoindaysSatblocksSatdaysSentPattern = CoinblocksCoindaysSatblocksSatdaysSentPattern(client, acc)
|
|
2467
|
-
self.addr_count: MetricPattern1[StoredU64] = MetricPattern1(client, _m(acc, 'addr_count'))
|
|
2468
|
-
self.cost_basis: MaxMinPattern = MaxMinPattern(client, acc)
|
|
2469
|
-
self.outputs: UtxoPattern = UtxoPattern(client, _m(acc, 'utxo_count'))
|
|
2470
|
-
self.realized: CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern = CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern(client, acc)
|
|
2471
|
-
self.relative: InvestedNegNetNuplSupplyUnrealizedPattern = InvestedNegNetNuplSupplyUnrealizedPattern(client, acc)
|
|
2472
|
-
self.supply: _30dHalvedTotalPattern = _30dHalvedTotalPattern(client, acc)
|
|
2473
|
-
self.unrealized: GreedInvestedInvestorNegNetPainSupplyTotalUnrealizedPattern = GreedInvestedInvestorNegNetPainSupplyTotalUnrealizedPattern(client, acc)
|
|
2474
|
-
|
|
2475
2476
|
class _10y2y3y4y5y6y8yPattern:
|
|
2476
2477
|
"""Pattern struct for repeated tree structure."""
|
|
2477
2478
|
|
|
@@ -2681,6 +2682,14 @@ class BitcoinDollarsSatsPattern3:
|
|
|
2681
2682
|
self.dollars: CumulativeSumPattern[Dollars] = CumulativeSumPattern(client, _m(acc, 'usd'))
|
|
2682
2683
|
self.sats: CumulativeSumPattern[Sats] = CumulativeSumPattern(client, acc)
|
|
2683
2684
|
|
|
2685
|
+
class _30dCountPattern:
|
|
2686
|
+
"""Pattern struct for repeated tree structure."""
|
|
2687
|
+
|
|
2688
|
+
def __init__(self, client: BrkClientBase, acc: str):
|
|
2689
|
+
"""Create pattern node with accumulated metric name."""
|
|
2690
|
+
self._30d_change: MetricPattern4[StoredF64] = MetricPattern4(client, _m(acc, '30d_change'))
|
|
2691
|
+
self.count: MetricPattern1[StoredU64] = MetricPattern1(client, acc)
|
|
2692
|
+
|
|
2684
2693
|
class DollarsSatsPattern:
|
|
2685
2694
|
"""Pattern struct for repeated tree structure."""
|
|
2686
2695
|
|
|
@@ -2713,6 +2722,14 @@ class SdSmaPattern:
|
|
|
2713
2722
|
self.sd: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'sd'))
|
|
2714
2723
|
self.sma: MetricPattern4[StoredF32] = MetricPattern4(client, _m(acc, 'sma'))
|
|
2715
2724
|
|
|
2725
|
+
class UtxoPattern:
|
|
2726
|
+
"""Pattern struct for repeated tree structure."""
|
|
2727
|
+
|
|
2728
|
+
def __init__(self, client: BrkClientBase, acc: str):
|
|
2729
|
+
"""Create pattern node with accumulated metric name."""
|
|
2730
|
+
self.utxo_count: MetricPattern1[StoredU64] = MetricPattern1(client, acc)
|
|
2731
|
+
self.utxo_count_30d_change: MetricPattern4[StoredF64] = MetricPattern4(client, _m(acc, '30d_change'))
|
|
2732
|
+
|
|
2716
2733
|
class CumulativeSumPattern(Generic[T]):
|
|
2717
2734
|
"""Pattern struct for repeated tree structure."""
|
|
2718
2735
|
|
|
@@ -2744,13 +2761,6 @@ class RatioPattern2:
|
|
|
2744
2761
|
"""Create pattern node with accumulated metric name."""
|
|
2745
2762
|
self.ratio: MetricPattern4[StoredF32] = MetricPattern4(client, acc)
|
|
2746
2763
|
|
|
2747
|
-
class UtxoPattern:
|
|
2748
|
-
"""Pattern struct for repeated tree structure."""
|
|
2749
|
-
|
|
2750
|
-
def __init__(self, client: BrkClientBase, acc: str):
|
|
2751
|
-
"""Create pattern node with accumulated metric name."""
|
|
2752
|
-
self.utxo_count: MetricPattern1[StoredU64] = MetricPattern1(client, acc)
|
|
2753
|
-
|
|
2754
2764
|
# Metrics tree classes
|
|
2755
2765
|
|
|
2756
2766
|
class MetricsTree_Blocks_Difficulty:
|
|
@@ -2796,6 +2806,8 @@ class MetricsTree_Blocks_Mining:
|
|
|
2796
2806
|
self.hash_rate_1m_sma: MetricPattern4[StoredF32] = MetricPattern4(client, 'hash_rate_1m_sma')
|
|
2797
2807
|
self.hash_rate_2m_sma: MetricPattern4[StoredF32] = MetricPattern4(client, 'hash_rate_2m_sma')
|
|
2798
2808
|
self.hash_rate_1y_sma: MetricPattern4[StoredF32] = MetricPattern4(client, 'hash_rate_1y_sma')
|
|
2809
|
+
self.hash_rate_ath: MetricPattern1[StoredF64] = MetricPattern1(client, 'hash_rate_ath')
|
|
2810
|
+
self.hash_rate_drawdown: MetricPattern1[StoredF32] = MetricPattern1(client, 'hash_rate_drawdown')
|
|
2799
2811
|
self.hash_price_ths: MetricPattern1[StoredF32] = MetricPattern1(client, 'hash_price_ths')
|
|
2800
2812
|
self.hash_price_ths_min: MetricPattern1[StoredF32] = MetricPattern1(client, 'hash_price_ths_min')
|
|
2801
2813
|
self.hash_price_phs: MetricPattern1[StoredF32] = MetricPattern1(client, 'hash_price_phs')
|
|
@@ -3113,7 +3125,7 @@ class MetricsTree_Cointime_ReserveRisk:
|
|
|
3113
3125
|
"""Metrics tree node."""
|
|
3114
3126
|
|
|
3115
3127
|
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
|
3116
|
-
self.
|
|
3128
|
+
self.vocdd_365d_median: MetricPattern6[StoredF64] = MetricPattern6(client, 'vocdd_365d_median')
|
|
3117
3129
|
self.hodl_bank: MetricPattern6[StoredF64] = MetricPattern6(client, 'hodl_bank')
|
|
3118
3130
|
self.reserve_risk: MetricPattern4[StoredF64] = MetricPattern4(client, 'reserve_risk')
|
|
3119
3131
|
|
|
@@ -4241,6 +4253,20 @@ class MetricsTree_Distribution_AddressActivity:
|
|
|
4241
4253
|
self.p2tr: BalanceBothReactivatedReceivingSendingPattern = BalanceBothReactivatedReceivingSendingPattern(client, 'p2tr_address_activity')
|
|
4242
4254
|
self.p2a: BalanceBothReactivatedReceivingSendingPattern = BalanceBothReactivatedReceivingSendingPattern(client, 'p2a_address_activity')
|
|
4243
4255
|
|
|
4256
|
+
class MetricsTree_Distribution_TotalAddrCount:
|
|
4257
|
+
"""Metrics tree node."""
|
|
4258
|
+
|
|
4259
|
+
def __init__(self, client: BrkClientBase, base_path: str = ''):
|
|
4260
|
+
self.all: MetricPattern1[StoredU64] = MetricPattern1(client, 'total_addr_count')
|
|
4261
|
+
self.p2pk65: MetricPattern1[StoredU64] = MetricPattern1(client, 'p2pk65_total_addr_count')
|
|
4262
|
+
self.p2pk33: MetricPattern1[StoredU64] = MetricPattern1(client, 'p2pk33_total_addr_count')
|
|
4263
|
+
self.p2pkh: MetricPattern1[StoredU64] = MetricPattern1(client, 'p2pkh_total_addr_count')
|
|
4264
|
+
self.p2sh: MetricPattern1[StoredU64] = MetricPattern1(client, 'p2sh_total_addr_count')
|
|
4265
|
+
self.p2wpkh: MetricPattern1[StoredU64] = MetricPattern1(client, 'p2wpkh_total_addr_count')
|
|
4266
|
+
self.p2wsh: MetricPattern1[StoredU64] = MetricPattern1(client, 'p2wsh_total_addr_count')
|
|
4267
|
+
self.p2tr: MetricPattern1[StoredU64] = MetricPattern1(client, 'p2tr_total_addr_count')
|
|
4268
|
+
self.p2a: MetricPattern1[StoredU64] = MetricPattern1(client, 'p2a_total_addr_count')
|
|
4269
|
+
|
|
4244
4270
|
class MetricsTree_Distribution_NewAddrCount:
|
|
4245
4271
|
"""Metrics tree node."""
|
|
4246
4272
|
|
|
@@ -4281,7 +4307,7 @@ class MetricsTree_Distribution:
|
|
|
4281
4307
|
self.addr_count: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern = AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern(client, 'addr_count')
|
|
4282
4308
|
self.empty_addr_count: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern = AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern(client, 'empty_addr_count')
|
|
4283
4309
|
self.address_activity: MetricsTree_Distribution_AddressActivity = MetricsTree_Distribution_AddressActivity(client)
|
|
4284
|
-
self.total_addr_count:
|
|
4310
|
+
self.total_addr_count: MetricsTree_Distribution_TotalAddrCount = MetricsTree_Distribution_TotalAddrCount(client)
|
|
4285
4311
|
self.new_addr_count: MetricsTree_Distribution_NewAddrCount = MetricsTree_Distribution_NewAddrCount(client)
|
|
4286
4312
|
self.growth_rate: MetricsTree_Distribution_GrowthRate = MetricsTree_Distribution_GrowthRate(client)
|
|
4287
4313
|
self.fundedaddressindex: MetricPattern31[FundedAddressIndex] = MetricPattern31(client, 'fundedaddressindex')
|
|
@@ -4342,7 +4368,7 @@ class MetricsTree:
|
|
|
4342
4368
|
class BrkClient(BrkClientBase):
|
|
4343
4369
|
"""Main BRK client with metrics tree and API methods."""
|
|
4344
4370
|
|
|
4345
|
-
VERSION = "v0.1.
|
|
4371
|
+
VERSION = "v0.1.4"
|
|
4346
4372
|
|
|
4347
4373
|
INDEXES = [
|
|
4348
4374
|
"dateindex",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|