quantdb-sdk 0.4.1__tar.gz → 0.4.2__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 (38) hide show
  1. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/CHANGELOG.md +10 -0
  2. {quantdb_sdk-0.4.1/quantdb_sdk.egg-info → quantdb_sdk-0.4.2}/PKG-INFO +1 -1
  3. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/pyproject.toml +1 -1
  4. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/quantdb_sdk/__init__.py +1 -1
  5. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/quantdb_sdk/_utils.py +1 -1
  6. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/quantdb_sdk/async_client.py +1 -1
  7. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/quantdb_sdk/client.py +1 -1
  8. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/quantdb_sdk/hub.py +2 -0
  9. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2/quantdb_sdk.egg-info}/PKG-INFO +1 -1
  10. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/tests/test_data_hub.py +10 -2
  11. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/LICENSE +0 -0
  12. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/MANIFEST.in +0 -0
  13. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/README.md +0 -0
  14. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/quantdb_sdk/__main__.py +0 -0
  15. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/quantdb_sdk/errors.py +0 -0
  16. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/quantdb_sdk/examples/__init__.py +0 -0
  17. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/quantdb_sdk/examples/demo_01_connect_basics.py +0 -0
  18. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/quantdb_sdk/examples/demo_02_kline_v2_daily.py +0 -0
  19. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/quantdb_sdk/examples/demo_03_sync_full_market.py +0 -0
  20. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/quantdb_sdk/examples/demo_04_duckdb_warehouse.py +0 -0
  21. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/quantdb_sdk/examples/demo_05_read_local_data.py +0 -0
  22. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/quantdb_sdk/examples/demo_06_tick_and_factors.py +0 -0
  23. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/quantdb_sdk/examples/demo_07_data_hub.py +0 -0
  24. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/quantdb_sdk/layout.py +0 -0
  25. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/quantdb_sdk/py.typed +0 -0
  26. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/quantdb_sdk.egg-info/SOURCES.txt +0 -0
  27. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/quantdb_sdk.egg-info/dependency_links.txt +0 -0
  28. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/quantdb_sdk.egg-info/entry_points.txt +0 -0
  29. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/quantdb_sdk.egg-info/requires.txt +0 -0
  30. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/quantdb_sdk.egg-info/top_level.txt +0 -0
  31. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/setup.cfg +0 -0
  32. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/tests/test_async_client.py +0 -0
  33. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/tests/test_client.py +0 -0
  34. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/tests/test_hub_models.py +0 -0
  35. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/tests/test_layout.py +0 -0
  36. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/tests/test_technical_indicators.py +0 -0
  37. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/tests/test_update_pipeline.py +0 -0
  38. {quantdb_sdk-0.4.1 → quantdb_sdk-0.4.2}/tests/test_utils.py +0 -0
@@ -3,6 +3,16 @@
3
3
  所有 notable 变更都会记录在此文件。格式基于 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),
4
4
  版本号遵循 [Semantic Versioning](https://semver.org/lang/zh-CN/)。
5
5
 
6
+ ## \[0.4.2] - 2026-10-05
7
+
8
+ ### Added
9
+
10
+ - **新增数据集 `per_share`(每股指标补充表,分类 3)**:补登记为第 30 个数据集。
11
+
12
+ - `SYNC_DATASET_CATEGORIES` 与 `DATASET_REGISTRY` 由 29 项增至 30 项;`client.data.datasets()` / `info()` / `local_files()` / `read_local()` / `sync_dataset()` / `mount()` 均可直接按 `per_share` 使用。
13
+ - 物理形态为 V1 逐股票文件 `3_financial_data/per_share/{Symbol}.parquet`(由 `03_financial.py` 采集,部分股票为空);`layout=v1_symbol`,读取/查询需提供 `symbol`。
14
+ - 与 MCP catalog、后端 `subCategoryMapping`、前端分类表同步对齐(均为 30 项)。
15
+
6
16
  ## \[0.4.1] - 2026-10-05
7
17
 
8
18
  ### Changed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: quantdb-sdk
3
- Version: 0.4.1
3
+ Version: 0.4.2
4
4
  Summary: QuantDB 量化数据平台官方 Python SDK
5
5
  Author: QuantDB Team
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "quantdb-sdk"
7
- version = "0.4.1"
7
+ version = "0.4.2"
8
8
  description = "QuantDB 量化数据平台官方 Python SDK"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
@@ -5,7 +5,7 @@ try:
5
5
  # 注意:此处用 PyPI 包名(连字符)查找版本号,不是模块名(下划线)
6
6
  __version__ = version("quantdb-sdk")
7
7
  except ImportError:
8
- __version__ = "0.4.1"
8
+ __version__ = "0.4.2"
9
9
 
10
10
  from . import layout
11
11
  from ._utils import scan_local_directory
@@ -19,7 +19,7 @@ SYNC_DATASET_CATEGORIES: Dict[str, str] = {
19
19
  "instrument_detail": "2", "sector_concept": "2", "index_weights": "2",
20
20
  "trading_calendar": "2", "margin_trading": "2",
21
21
  "balance": "3", "income": "3", "cashflow": "3", "capital": "3",
22
- "holder_num": "3", "pershare_index": "3", "dividend_factors": "3",
22
+ "holder_num": "3", "pershare_index": "3", "per_share": "3", "dividend_factors": "3",
23
23
  "etf_pcf": "4", "convertible_bond": "4", "etf_kline": "4",
24
24
  "valuation": "5", "technical_indicators": "5", "market_sentiment": "5",
25
25
  "features_daily": "6", "l1_factors": "6", "l1_l2_factors": "6", "l2_factors": "6",
@@ -28,7 +28,7 @@ from .errors import (
28
28
  )
29
29
 
30
30
  # 维护提示:每次发版必须与 pyproject.toml 版本号同步
31
- _USER_AGENT = "QuantDB-Python-SDK/0.4.1"
31
+ _USER_AGENT = "QuantDB-Python-SDK/0.4.2"
32
32
 
33
33
 
34
34
  def _etag_hex(value: Optional[str]) -> Optional[str]:
@@ -32,7 +32,7 @@ from .errors import (
32
32
  )
33
33
 
34
34
  # 维护提示:每次发版必须与 pyproject.toml 版本号同步
35
- _USER_AGENT = "QuantDB-Python-SDK/0.4.1"
35
+ _USER_AGENT = "QuantDB-Python-SDK/0.4.2"
36
36
 
37
37
 
38
38
  def _etag_hex(value: Optional[str]) -> Optional[str]:
@@ -133,6 +133,8 @@ _ENTRIES: Tuple[Tuple[str, str, str, str, Tuple[str, ...], str, Tuple[str, ...]]
133
133
  ("股东", "户数", "holder"), "v1_symbol", ("symbol",)),
134
134
  ("pershare_index", "每股指标", "每股收益、净资产等指标。", "free",
135
135
  ("每股", "eps", "财务"), "v1_symbol", ("symbol",)),
136
+ ("per_share", "每股指标(补充)", "每股指标补充表;部分股票为空。", "free",
137
+ ("每股", "eps", "补充", "per_share"), "v1_symbol", ("symbol",)),
136
138
  ("dividend_factors", "除权复权因子", "分红送配及复权因子。", "free",
137
139
  ("分红", "除权", "复权", "dividend"), "v1_symbol", ("symbol",)),
138
140
  ("etf_kline", "ETF 日线", "ETF 日线 OHLCV。", "free",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: quantdb-sdk
3
- Version: 0.4.1
3
+ Version: 0.4.2
4
4
  Summary: QuantDB 量化数据平台官方 Python SDK
5
5
  Author: QuantDB Team
6
6
  License: MIT
@@ -55,7 +55,7 @@ def _write_tick(root, symbol, yyyymmdd, flat=True, extra_symbol=False):
55
55
  # ---------------------------------------------------------------------------
56
56
 
57
57
  def test_registry_completeness():
58
- assert len(DATASET_REGISTRY) == 29
58
+ assert len(DATASET_REGISTRY) == 30
59
59
  assert set(DATASET_REGISTRY) == set(SYNC_DATASET_CATEGORIES)
60
60
  for dataset, info in DATASET_REGISTRY.items():
61
61
  assert info.dataset == dataset
@@ -79,13 +79,21 @@ def test_data_property_is_lazy_and_cached(client):
79
79
  def test_datasets_filters(client):
80
80
  hub = client.data
81
81
  all_df = hub.datasets()
82
- assert len(all_df) == 29
82
+ assert len(all_df) == 30
83
83
  assert list(all_df.columns) == ["dataset", "category_id", "category_dir", "name", "access", "layout"]
84
84
 
85
85
  cat6 = hub.datasets(category="6")
86
86
  assert set(cat6["dataset"]) == {"features_daily", "l1_factors", "l2_factors", "l1_l2_factors"}
87
87
  assert (cat6["access"] == "subscription").all()
88
88
 
89
+ cat3 = hub.datasets(category="3")
90
+ assert set(cat3["dataset"]) == {
91
+ "balance", "income", "cashflow", "capital", "holder_num",
92
+ "pershare_index", "per_share", "dividend_factors",
93
+ }
94
+ # per_share 为 V1 逐股票补充表,需能按 symbol 读取
95
+ assert hub.datasets(keyword="per_share").iloc[0]["dataset"] == "per_share"
96
+
89
97
  assert len(hub.datasets(access="subscription")) == 4
90
98
  assert "daily_forward" in set(hub.datasets(keyword="复权")["dataset"])
91
99
 
File without changes
File without changes
File without changes
File without changes