bitview-client 0.12.2__tar.gz → 0.14.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.
Files changed (80) hide show
  1. {bitview_client-0.12.2 → bitview_client-0.14.0}/.gitignore +12 -1
  2. {bitview_client-0.12.2 → bitview_client-0.14.0}/PKG-INFO +15 -8
  3. {bitview_client-0.12.2 → bitview_client-0.14.0}/README.md +11 -4
  4. bitview_client-0.14.0/bitview_client/__init__.py +7527 -0
  5. bitview_client-0.14.0/bitview_client/py.typed +0 -0
  6. {bitview_client-0.12.2 → bitview_client-0.14.0}/pyproject.toml +3 -16
  7. bitview_client-0.12.2/.python-version +0 -1
  8. bitview_client-0.12.2/bitview_client/__init__.py +0 -16491
  9. bitview_client-0.12.2/tests/mempool_compat/.gitignore +0 -1
  10. bitview_client-0.12.2/tests/mempool_compat/AUDIT.md +0 -120
  11. bitview_client-0.12.2/tests/mempool_compat/addresses/test_address_info.py +0 -131
  12. bitview_client-0.12.2/tests/mempool_compat/addresses/test_address_txs.py +0 -99
  13. bitview_client-0.12.2/tests/mempool_compat/addresses/test_address_txs_chain.py +0 -132
  14. bitview_client-0.12.2/tests/mempool_compat/addresses/test_address_txs_mempool.py +0 -55
  15. bitview_client-0.12.2/tests/mempool_compat/addresses/test_address_utxo.py +0 -71
  16. bitview_client-0.12.2/tests/mempool_compat/addresses/test_validate_address.py +0 -83
  17. bitview_client-0.12.2/tests/mempool_compat/audit_prompt.md +0 -106
  18. bitview_client-0.12.2/tests/mempool_compat/blocks/test_block.py +0 -52
  19. bitview_client-0.12.2/tests/mempool_compat/blocks/test_block_header.py +0 -52
  20. bitview_client-0.12.2/tests/mempool_compat/blocks/test_block_height.py +0 -62
  21. bitview_client-0.12.2/tests/mempool_compat/blocks/test_block_raw.py +0 -49
  22. bitview_client-0.12.2/tests/mempool_compat/blocks/test_block_status.py +0 -61
  23. bitview_client-0.12.2/tests/mempool_compat/blocks/test_block_txid_index.py +0 -71
  24. bitview_client-0.12.2/tests/mempool_compat/blocks/test_block_txids.py +0 -55
  25. bitview_client-0.12.2/tests/mempool_compat/blocks/test_block_txs.py +0 -73
  26. bitview_client-0.12.2/tests/mempool_compat/blocks/test_block_txs_start.py +0 -98
  27. bitview_client-0.12.2/tests/mempool_compat/blocks/test_block_v1.py +0 -80
  28. bitview_client-0.12.2/tests/mempool_compat/blocks/test_blocks_height.py +0 -75
  29. bitview_client-0.12.2/tests/mempool_compat/blocks/test_blocks_recent.py +0 -60
  30. bitview_client-0.12.2/tests/mempool_compat/blocks/test_blocks_tip_hash.py +0 -48
  31. bitview_client-0.12.2/tests/mempool_compat/blocks/test_blocks_tip_height.py +0 -47
  32. bitview_client-0.12.2/tests/mempool_compat/blocks/test_blocks_v1_height.py +0 -87
  33. bitview_client-0.12.2/tests/mempool_compat/blocks/test_blocks_v1_recent.py +0 -63
  34. bitview_client-0.12.2/tests/mempool_compat/check_endpoints.py +0 -158
  35. bitview_client-0.12.2/tests/mempool_compat/conftest.py +0 -227
  36. bitview_client-0.12.2/tests/mempool_compat/fees/test_mempool_blocks.py +0 -45
  37. bitview_client-0.12.2/tests/mempool_compat/fees/test_precise.py +0 -39
  38. bitview_client-0.12.2/tests/mempool_compat/fees/test_recommended.py +0 -39
  39. bitview_client-0.12.2/tests/mempool_compat/general/test_difficulty_adjustment.py +0 -103
  40. bitview_client-0.12.2/tests/mempool_compat/general/test_historical_price.py +0 -106
  41. bitview_client-0.12.2/tests/mempool_compat/general/test_prices.py +0 -43
  42. bitview_client-0.12.2/tests/mempool_compat/mempool/test_fullrbf_replacements.py +0 -55
  43. bitview_client-0.12.2/tests/mempool_compat/mempool/test_mempool.py +0 -44
  44. bitview_client-0.12.2/tests/mempool_compat/mempool/test_recent.py +0 -36
  45. bitview_client-0.12.2/tests/mempool_compat/mempool/test_replacements.py +0 -53
  46. bitview_client-0.12.2/tests/mempool_compat/mempool/test_txids.py +0 -50
  47. bitview_client-0.12.2/tests/mempool_compat/mining/conftest.py +0 -17
  48. bitview_client-0.12.2/tests/mempool_compat/mining/test_blocks_fee_rates.py +0 -58
  49. bitview_client-0.12.2/tests/mempool_compat/mining/test_blocks_fees.py +0 -74
  50. bitview_client-0.12.2/tests/mempool_compat/mining/test_blocks_rewards.py +0 -73
  51. bitview_client-0.12.2/tests/mempool_compat/mining/test_blocks_sizes_weights.py +0 -92
  52. bitview_client-0.12.2/tests/mempool_compat/mining/test_blocks_timestamp.py +0 -52
  53. bitview_client-0.12.2/tests/mempool_compat/mining/test_difficulty_adjustments.py +0 -81
  54. bitview_client-0.12.2/tests/mempool_compat/mining/test_hashrate.py +0 -53
  55. bitview_client-0.12.2/tests/mempool_compat/mining/test_hashrate_pools.py +0 -49
  56. bitview_client-0.12.2/tests/mempool_compat/mining/test_pool.py +0 -73
  57. bitview_client-0.12.2/tests/mempool_compat/mining/test_pool_blocks.py +0 -47
  58. bitview_client-0.12.2/tests/mempool_compat/mining/test_pool_blocks_height.py +0 -61
  59. bitview_client-0.12.2/tests/mempool_compat/mining/test_pool_hashrate.py +0 -43
  60. bitview_client-0.12.2/tests/mempool_compat/mining/test_pools.py +0 -80
  61. bitview_client-0.12.2/tests/mempool_compat/mining/test_pools_period.py +0 -54
  62. bitview_client-0.12.2/tests/mempool_compat/mining/test_reward_stats.py +0 -58
  63. bitview_client-0.12.2/tests/mempool_compat/transactions/test_cpfp.py +0 -80
  64. bitview_client-0.12.2/tests/mempool_compat/transactions/test_post_tx.py +0 -55
  65. bitview_client-0.12.2/tests/mempool_compat/transactions/test_transaction_times.py +0 -105
  66. bitview_client-0.12.2/tests/mempool_compat/transactions/test_tx.py +0 -71
  67. bitview_client-0.12.2/tests/mempool_compat/transactions/test_tx_hex.py +0 -53
  68. bitview_client-0.12.2/tests/mempool_compat/transactions/test_tx_merkle_proof.py +0 -70
  69. bitview_client-0.12.2/tests/mempool_compat/transactions/test_tx_merkleblock_proof.py +0 -58
  70. bitview_client-0.12.2/tests/mempool_compat/transactions/test_tx_outspend.py +0 -79
  71. bitview_client-0.12.2/tests/mempool_compat/transactions/test_tx_outspends.py +0 -59
  72. bitview_client-0.12.2/tests/mempool_compat/transactions/test_tx_raw.py +0 -50
  73. bitview_client-0.12.2/tests/mempool_compat/transactions/test_tx_rbf.py +0 -82
  74. bitview_client-0.12.2/tests/mempool_compat/transactions/test_tx_status.py +0 -77
  75. bitview_client-0.12.2/tests/test_basic.py +0 -73
  76. bitview_client-0.12.2/tests/test_hash_prefix.py +0 -63
  77. bitview_client-0.12.2/tests/test_metric_data.py +0 -496
  78. bitview_client-0.12.2/tests/test_tree.py +0 -89
  79. bitview_client-0.12.2/uv.lock +0 -1471
  80. {bitview_client-0.12.2 → bitview_client-0.14.0}/pydoc-markdown.yml +0 -0
@@ -3,7 +3,6 @@
3
3
 
4
4
  # Builds
5
5
  target
6
- websites/dist
7
6
  bridge/
8
7
  /ids.txt
9
8
  rust_out
@@ -13,8 +12,10 @@ rust_out
13
12
 
14
13
  # Ignored
15
14
  _*
15
+ !website/_*
16
16
  !__*.py
17
17
  /*.md
18
+ !/TODO.md
18
19
  /*.py
19
20
  /*.json
20
21
  /*.html
@@ -34,6 +35,7 @@ _*
34
35
 
35
36
  # Environment variables/configs
36
37
  .env
38
+ docker/rpc-credentials
37
39
 
38
40
  # Profiling
39
41
  profile.json.gz
@@ -49,3 +51,12 @@ expand.rs
49
51
 
50
52
  # AI
51
53
  .claude
54
+
55
+ # Cloudflare CLI (cf) account cache, written wherever it runs
56
+ .cloudflare
57
+ # Generated at publish (scripts/js-publish.sh) from the JSDoc.
58
+ modules/bitview-client/*.d.ts
59
+
60
+ # Generated by `cargo api` and `cargo surface`, kept outside crates/ so rewriting them
61
+ # never changes the source tag bitviewd hashes.
62
+ /snapshots/
@@ -1,9 +1,9 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: bitview-client
3
- Version: 0.12.2
4
- Summary: Bitcoin on-chain analytics client — thousands of metrics, block explorer, and address index
3
+ Version: 0.14.0
4
+ Summary: Python client for Bitview. Bitview is a free, open-source Bitcoin data server: on-chain metrics, blocks, mempool and mining data, with charts and an API, at bitview.space or beside your own Bitcoin Core node.
5
5
  Project-URL: Homepage, https://bitcoinresearchkit.org
6
- Project-URL: Repository, https://github.com/bitcoinresearchkit/brk
6
+ Project-URL: Repository, https://github.com/bitcoinresearchkit/mono
7
7
  License-Expression: MIT
8
8
  Keywords: analytics,api,bitcoin,blockchain,brk,cryptocurrency,data,metrics,on-chain
9
9
  Classifier: Development Status :: 5 - Production/Stable
@@ -23,12 +23,14 @@ Description-Content-Type: text/markdown
23
23
 
24
24
  Zero-dependency Python client for the [Bitview](https://bitview.space) Bitcoin analytics API.
25
25
 
26
+ Bitview is a free, open-source Bitcoin data server: on-chain metrics, blocks, mempool and mining data, with charts and an API, at [bitview.space](https://bitview.space) or beside your own Bitcoin Core node.
27
+
26
28
  Requires Python 3.9+.
27
29
 
28
- [PyPI](https://pypi.org/project/bitview-client/) | [API Reference](https://github.com/bitcoinresearchkit/brk/blob/main/packages/bitview_client/DOCS.md) | [Source](https://github.com/bitcoinresearchkit/brk/tree/main/packages/bitview_client)
30
+ [PyPI](https://pypi.org/project/bitview-client/) | [API Reference](https://github.com/bitcoinresearchkit/mono/blob/main/packages/bitview_client/DOCS.md) | [Source](https://github.com/bitcoinresearchkit/mono/tree/main/packages/bitview_client)
29
31
 
30
32
  AI clients can use the same API through the official stateless, read-only MCP
31
- endpoint at [mcp.bitview.space](https://mcp.bitview.space/). No authentication
33
+ endpoint at [bitview.space/mcp](https://bitview.space/mcp). No authentication
32
34
  is required.
33
35
 
34
36
  ## Installation
@@ -52,14 +54,14 @@ from bitview_client import BitviewClient
52
54
  client = BitviewClient("https://bitview.space")
53
55
 
54
56
  # Mempool.space-compatible blockchain endpoints.
55
- block_hash = client.get_block_by_height(800000)
57
+ block_hash = client.get_block_hash_by_height(800000)
56
58
  tx = client.get_tx(
57
59
  "a1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"
58
60
  )
59
61
 
60
62
  # Typed, chainable series access.
61
63
  prices = (
62
- client.series.price.split.close.usd.by.day1()
64
+ client.series.price.close.by.day1()
63
65
  .tail(30)
64
66
  .fetch()
65
67
  )
@@ -70,3 +72,8 @@ same_prices = client.series_endpoint("price_close", "day1").tail(30).fetch()
70
72
 
71
73
  Series endpoints support integer and date slices, `head(n)`, `tail(n)`,
72
74
  `skip(n).take(m)`, `fetch_csv()`, `len()`, and `version()`.
75
+
76
+ A value is `None` where it is missing (mostly a date period without blocks) or
77
+ undefined (a NaN, or a ratio over zero). The type hints say exactly where:
78
+ `Optional` at the indexes where a value can be missing, and everywhere for value
79
+ types that can be undefined (floats, `Cents`, ratios, parts per million).
@@ -2,12 +2,14 @@
2
2
 
3
3
  Zero-dependency Python client for the [Bitview](https://bitview.space) Bitcoin analytics API.
4
4
 
5
+ Bitview is a free, open-source Bitcoin data server: on-chain metrics, blocks, mempool and mining data, with charts and an API, at [bitview.space](https://bitview.space) or beside your own Bitcoin Core node.
6
+
5
7
  Requires Python 3.9+.
6
8
 
7
- [PyPI](https://pypi.org/project/bitview-client/) | [API Reference](https://github.com/bitcoinresearchkit/brk/blob/main/packages/bitview_client/DOCS.md) | [Source](https://github.com/bitcoinresearchkit/brk/tree/main/packages/bitview_client)
9
+ [PyPI](https://pypi.org/project/bitview-client/) | [API Reference](https://github.com/bitcoinresearchkit/mono/blob/main/packages/bitview_client/DOCS.md) | [Source](https://github.com/bitcoinresearchkit/mono/tree/main/packages/bitview_client)
8
10
 
9
11
  AI clients can use the same API through the official stateless, read-only MCP
10
- endpoint at [mcp.bitview.space](https://mcp.bitview.space/). No authentication
12
+ endpoint at [bitview.space/mcp](https://bitview.space/mcp). No authentication
11
13
  is required.
12
14
 
13
15
  ## Installation
@@ -31,14 +33,14 @@ from bitview_client import BitviewClient
31
33
  client = BitviewClient("https://bitview.space")
32
34
 
33
35
  # Mempool.space-compatible blockchain endpoints.
34
- block_hash = client.get_block_by_height(800000)
36
+ block_hash = client.get_block_hash_by_height(800000)
35
37
  tx = client.get_tx(
36
38
  "a1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"
37
39
  )
38
40
 
39
41
  # Typed, chainable series access.
40
42
  prices = (
41
- client.series.price.split.close.usd.by.day1()
43
+ client.series.price.close.by.day1()
42
44
  .tail(30)
43
45
  .fetch()
44
46
  )
@@ -49,3 +51,8 @@ same_prices = client.series_endpoint("price_close", "day1").tail(30).fetch()
49
51
 
50
52
  Series endpoints support integer and date slices, `head(n)`, `tail(n)`,
51
53
  `skip(n).take(m)`, `fetch_csv()`, `len()`, and `version()`.
54
+
55
+ A value is `None` where it is missing (mostly a date period without blocks) or
56
+ undefined (a NaN, or a ratio over zero). The type hints say exactly where:
57
+ `Optional` at the indexes where a value can be missing, and everywhere for value
58
+ types that can be undefined (floats, `Cents`, ratios, parts per million).