quantdb-sdk 0.1.0__py3-none-any.whl

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.
@@ -0,0 +1,93 @@
1
+ Metadata-Version: 2.4
2
+ Name: quantdb-sdk
3
+ Version: 0.1.0
4
+ Summary: QuantDB 量化数据平台官方 Python SDK
5
+ Author: QuantDB Team
6
+ License: MIT
7
+ Project-URL: Homepage, https://www.quantmindai.cn
8
+ Project-URL: Documentation, https://www.quantmindai.cn/docs/sdk.html
9
+ Project-URL: Repository, https://github.com/quantdb/quantdb
10
+ Keywords: quant,finance,data,a-share,parquet
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Financial and Insurance Industry
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.8
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Office/Business :: Financial
22
+ Requires-Python: >=3.8
23
+ Description-Content-Type: text/markdown
24
+ Requires-Dist: requests>=2.25.0
25
+ Requires-Dist: pandas>=1.3.0
26
+ Requires-Dist: httpx>=0.24.0
27
+ Requires-Dist: duckdb>=0.8.0
28
+ Provides-Extra: dev
29
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
30
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
31
+ Requires-Dist: responses>=0.23.0; extra == "dev"
32
+ Requires-Dist: respx>=0.20.0; extra == "dev"
33
+
34
+ # QuantDB Python SDK
35
+
36
+ QuantDB 量化数据平台官方 Python SDK,提供同步与异步两种客户端,封装了全部 API 端点。
37
+
38
+ ## 安装
39
+
40
+ ```bash
41
+ pip install quantdb-sdk
42
+ ```
43
+
44
+ 开发依赖:
45
+
46
+ ```bash
47
+ pip install -e ".[dev]"
48
+ ```
49
+
50
+ ## 快速开始
51
+
52
+ ### API Key 鉴权(推荐)
53
+
54
+ ```python
55
+ from quantdb_sdk import QuantDBClient
56
+
57
+ client = QuantDBClient(api_key="qdb_xxx...")
58
+
59
+ # 查询用量
60
+ usage = client.get_usage()
61
+ print(f"已用: {usage['used_gb']:.2f} GB, 剩余: {usage['remaining_gb']:.2f} GB")
62
+
63
+ # K 线查询(免费)
64
+ df = client.query_kline(
65
+ "600519.SH",
66
+ adj_type="forward",
67
+ start_date="2026-01-01",
68
+ end_date="2026-07-22",
69
+ )
70
+ print(df.head())
71
+ ```
72
+
73
+ ### 用户名密码鉴权
74
+
75
+ ```python
76
+ client = QuantDBClient(username="admin", password="admin123")
77
+ ```
78
+
79
+ ## 核心功能
80
+
81
+ - **数据查询**:K 线、Tick 通过下载 Parquet 切片后客户端解析(消耗流量);股票列表、交易日历、元数据走网关 JSON(不计流量)。
82
+ - **数据下载**:Parquet 文件下载或直读 DataFrame,计入订阅流量。
83
+ - **本地分析**:基于 DuckDB 对本地 Parquet 执行 SQL。
84
+ - **账户管理**:查询用户信息、用量、API Key、订阅与订单。
85
+ - **异步客户端**:基于 httpx,适用于 asyncio 量化框架。
86
+
87
+ ## 流量说明
88
+
89
+ 每月前 30 GB 下载流量免费,超出部分按 ¥1/GB 计费;账户余额不足时,下载会被限流,充值后即可恢复。
90
+
91
+ ## 文档
92
+
93
+ 完整文档请访问:https://www.quantmindai.cn/docs/sdk.html
@@ -0,0 +1,11 @@
1
+ quantdb_sdk/__init__.py,sha256=7Eo9DPsThv9s4mx1AfX17dl59nAEPGGwslFHL768oGY,789
2
+ quantdb_sdk/__main__.py,sha256=5dWkwW_zhUrKMO_aTtYJC8xUfctdMKVsT6jyzpd-LVY,2274
3
+ quantdb_sdk/_utils.py,sha256=52gmz6UMEHbf66PMPjTN_lewOXaHShB71nT-Vqknzws,1764
4
+ quantdb_sdk/async_client.py,sha256=JeyHVz_e0qmK5bUDodZ87TM10f7uomrecVPJHjHbP9c,17987
5
+ quantdb_sdk/client.py,sha256=qfrGrIrwX1_UgLEqfia7q_laFbhyRkxK9YWttbmhrTw,24059
6
+ quantdb_sdk/errors.py,sha256=6oDirsuyOBvSfyJRmLijhK3iT4n9SCbUKWZUbPCqLvk,691
7
+ quantdb_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
+ quantdb_sdk-0.1.0.dist-info/METADATA,sha256=MPrUoz281ThnLfs8Qu1s4Z9YK3caioayq8bFNxR00Vg,2929
9
+ quantdb_sdk-0.1.0.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
10
+ quantdb_sdk-0.1.0.dist-info/top_level.txt,sha256=_cE7xa3_JBdTL-IDKD6rqV02Mq2_F8YRZchNc6BiGBA,12
11
+ quantdb_sdk-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (83.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ quantdb_sdk