quantdb-sdk 0.4.2__tar.gz → 0.4.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.
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/CHANGELOG.md +24 -0
- {quantdb_sdk-0.4.2/quantdb_sdk.egg-info → quantdb_sdk-0.4.4}/PKG-INFO +1 -1
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/pyproject.toml +1 -1
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/quantdb_sdk/__init__.py +1 -1
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/quantdb_sdk/__main__.py +6 -3
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/quantdb_sdk/async_client.py +990 -955
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/quantdb_sdk/client.py +54 -4
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/quantdb_sdk/examples/demo_01_connect_basics.py +6 -1
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/quantdb_sdk/hub.py +2 -2
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4/quantdb_sdk.egg-info}/PKG-INFO +1 -1
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/LICENSE +0 -0
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/MANIFEST.in +0 -0
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/README.md +0 -0
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/quantdb_sdk/_utils.py +0 -0
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/quantdb_sdk/errors.py +0 -0
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/quantdb_sdk/examples/__init__.py +0 -0
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/quantdb_sdk/examples/demo_02_kline_v2_daily.py +0 -0
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/quantdb_sdk/examples/demo_03_sync_full_market.py +0 -0
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/quantdb_sdk/examples/demo_04_duckdb_warehouse.py +0 -0
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/quantdb_sdk/examples/demo_05_read_local_data.py +0 -0
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/quantdb_sdk/examples/demo_06_tick_and_factors.py +0 -0
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/quantdb_sdk/examples/demo_07_data_hub.py +0 -0
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/quantdb_sdk/layout.py +0 -0
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/quantdb_sdk/py.typed +0 -0
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/quantdb_sdk.egg-info/SOURCES.txt +0 -0
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/quantdb_sdk.egg-info/dependency_links.txt +0 -0
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/quantdb_sdk.egg-info/entry_points.txt +0 -0
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/quantdb_sdk.egg-info/requires.txt +0 -0
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/quantdb_sdk.egg-info/top_level.txt +0 -0
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/setup.cfg +0 -0
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/tests/test_async_client.py +0 -0
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/tests/test_client.py +0 -0
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/tests/test_data_hub.py +0 -0
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/tests/test_hub_models.py +0 -0
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/tests/test_layout.py +0 -0
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/tests/test_technical_indicators.py +0 -0
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/tests/test_update_pipeline.py +0 -0
- {quantdb_sdk-0.4.2 → quantdb_sdk-0.4.4}/tests/test_utils.py +0 -0
|
@@ -3,6 +3,30 @@
|
|
|
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.4] - 2026-10-11
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
|
|
10
|
+
- **`get_usage()` / `a_get_usage()` 漏算流量包额度**:旧实现用 `remaining = traffic_limit + credit_limit + purchased_traffic - used_traffic`,**完全没算流量包**,导致持有流量包的用户剩余流量被低估(少报的量正好等于流量包余额),`is_active` 也会在仍有流量包可用时被误判为 `False`。
|
|
11
|
+
|
|
12
|
+
修正后的口径与后端下载预扣一致:可用总额度 = 套餐额度(`traffic_limit + credit_limit + purchased_traffic`)+ 流量包总额;可用剩余 = (套餐额度 − 已用) + 流量包剩余。因用量接口返回的 `package_traffic` 是流量包**剩余量**,总额从 `GET /api/v1/subscription/traffic-packages` 台账累加;台账接口不可用时退化为「总额 = 剩余」,保证 `get_usage()` 在旧版服务端上依然可用。
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- **`get_usage()` / `a_get_usage()` 新增额度明细字段**(原有字段全部保留,取值已修正):
|
|
17
|
+
- 合计:`total_gb` / `used_gb` / `remaining_gb`
|
|
18
|
+
- 套餐额度:`plan_total_gb` / `plan_used_gb` / `plan_remaining_gb`
|
|
19
|
+
- 流量包额度:`package_total_gb` / `package_used_gb` / `package_remaining_gb`
|
|
20
|
+
- **`quantdb usage` CLI** 改为分行展示套餐 / 流量包 / 合计的已用、总额与剩余,不再只显示一个总额。
|
|
21
|
+
|
|
22
|
+
## \[0.4.3] - 2026-10-05
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- **`per_share` 数据集更名**:中文名由「每股指标(补充)」改为「**财务指标(TTM)**」,描述与关键词同步更新(`每股/eps` → `财务/ttm`)。
|
|
27
|
+
|
|
28
|
+
该表实际为 **TTM 口径财务指标补充表**(营收 / 归母净利 / 扣非净利 / 经营现金流等),原名既与 `pershare_index`「每股指标」混淆,也不符合数据口径。与后端 MCP catalog、桌面端分类表保持一致;`per_share` 标识符不变,`client.data` 用法不受影响。
|
|
29
|
+
|
|
6
30
|
## \[0.4.2] - 2026-10-05
|
|
7
31
|
|
|
8
32
|
### Added
|
|
@@ -135,9 +135,12 @@ def main() -> int:
|
|
|
135
135
|
if args.command == "usage":
|
|
136
136
|
usage = client.get_usage()
|
|
137
137
|
print(f"账户用量:")
|
|
138
|
-
print(f"
|
|
139
|
-
|
|
140
|
-
print(f"
|
|
138
|
+
print(f" 套餐: 已用 {usage['plan_used_gb']:.2f} GB / {usage['plan_total_gb']:.2f} GB"
|
|
139
|
+
f"(剩余 {usage['plan_remaining_gb']:.2f} GB)")
|
|
140
|
+
print(f" 流量包: 已用 {usage['package_used_gb']:.2f} GB / {usage['package_total_gb']:.2f} GB"
|
|
141
|
+
f"(剩余 {usage['package_remaining_gb']:.2f} GB)")
|
|
142
|
+
print(f" 合计: 已用 {usage['used_gb']:.2f} GB / {usage['total_gb']:.2f} GB"
|
|
143
|
+
f"(剩余 {usage['remaining_gb']:.2f} GB)")
|
|
141
144
|
print(f" 余额: ¥{usage['balance_yuan']:.2f}")
|
|
142
145
|
sub = usage.get("subscription", {})
|
|
143
146
|
print(f" 订阅: {sub.get('status', 'none')}")
|