sparkdata 0.0.1__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.
@@ -0,0 +1,80 @@
1
+ Metadata-Version: 2.5
2
+ Name: sparkdata
3
+ Version: 0.0.1
4
+ Summary: Python client for SparkData (A-share market data API) — placeholder release
5
+ Project-URL: Homepage, https://www.spark-data.cn
6
+ Project-URL: Documentation, https://www.spark-data.cn/api-reference
7
+ Project-URL: Repository, https://www.spark-data.cn
8
+ Author-email: "Hangzhou Zhiyuan Xinghuo Technology Co., Ltd." <service@spark-data.cn>
9
+ License: Proprietary
10
+ Keywords: a-share,api,finance,market-data,quant
11
+ Classifier: Intended Audience :: Financial and Insurance Industry
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Requires-Python: >=3.9
15
+ Description-Content-Type: text/markdown
16
+
17
+ # sparkdata
18
+
19
+ Python client for **SparkData**(智元星火数据平台)— A-share market data API.
20
+
21
+ > **Status: placeholder release (`0.0.1`).** The Python client is under development.
22
+ > The package name is reserved; the first working release will be `0.1.0`.
23
+
24
+ ---
25
+
26
+ ## Meanwhile, use the HTTP API directly
27
+
28
+ Public endpoint (no API key required):
29
+
30
+ ```bash
31
+ curl "https://www.spark-data.cn/v1/public/klines/daily?symbol=XSHG:000001"
32
+ ```
33
+
34
+ Python (standard library only):
35
+
36
+ ```python
37
+ import json, urllib.request
38
+
39
+ url = "https://www.spark-data.cn/v1/public/klines/daily?symbol=XSHG:000001"
40
+ with urllib.request.urlopen(url, timeout=15) as r:
41
+ data = json.load(r)["data"]["snapshot"]["bars"]
42
+
43
+ print(len(data), data[-1]["trading_date"], data[-1]["close"])
44
+ ```
45
+
46
+ Full documentation: <https://www.spark-data.cn/api-reference>
47
+
48
+ ---
49
+
50
+ ## Planned API (draft)
51
+
52
+ ```python
53
+ from sparkdata import Client
54
+
55
+ c = Client(api_key="spk_...") # or SPARKDATA_API_KEY env var
56
+ bars = c.klines_daily("XSHG:000001") # list[dict]
57
+ df = c.klines_daily("XSHG:000001").to_dataframe() # optional, needs pandas
58
+ ```
59
+
60
+ Planned scope for `0.1.0`:
61
+
62
+ - `Client(api_key=...)`, reads `SPARKDATA_API_KEY`
63
+ - `public_klines_daily()` — no key needed
64
+ - `klines_daily()` — authenticated
65
+ - typed errors: `AuthError` / `RateLimitError` / `InvalidParameterError` / `ServerError`
66
+ - automatic retry on `429` / `5xx` with backoff
67
+ - no hard dependency on pandas
68
+
69
+ ---
70
+
71
+ ## Links
72
+
73
+ - Website: <https://www.spark-data.cn>
74
+ - API reference: <https://www.spark-data.cn/api-reference>
75
+ - Terms: <https://www.spark-data.cn/legal/terms>
76
+ - Contact: service@spark-data.cn
77
+
78
+ ---
79
+
80
+ © 2026 杭州智元星火科技有限公司 · SparkData数据平台
@@ -0,0 +1,64 @@
1
+ # sparkdata
2
+
3
+ Python client for **SparkData**(智元星火数据平台)— A-share market data API.
4
+
5
+ > **Status: placeholder release (`0.0.1`).** The Python client is under development.
6
+ > The package name is reserved; the first working release will be `0.1.0`.
7
+
8
+ ---
9
+
10
+ ## Meanwhile, use the HTTP API directly
11
+
12
+ Public endpoint (no API key required):
13
+
14
+ ```bash
15
+ curl "https://www.spark-data.cn/v1/public/klines/daily?symbol=XSHG:000001"
16
+ ```
17
+
18
+ Python (standard library only):
19
+
20
+ ```python
21
+ import json, urllib.request
22
+
23
+ url = "https://www.spark-data.cn/v1/public/klines/daily?symbol=XSHG:000001"
24
+ with urllib.request.urlopen(url, timeout=15) as r:
25
+ data = json.load(r)["data"]["snapshot"]["bars"]
26
+
27
+ print(len(data), data[-1]["trading_date"], data[-1]["close"])
28
+ ```
29
+
30
+ Full documentation: <https://www.spark-data.cn/api-reference>
31
+
32
+ ---
33
+
34
+ ## Planned API (draft)
35
+
36
+ ```python
37
+ from sparkdata import Client
38
+
39
+ c = Client(api_key="spk_...") # or SPARKDATA_API_KEY env var
40
+ bars = c.klines_daily("XSHG:000001") # list[dict]
41
+ df = c.klines_daily("XSHG:000001").to_dataframe() # optional, needs pandas
42
+ ```
43
+
44
+ Planned scope for `0.1.0`:
45
+
46
+ - `Client(api_key=...)`, reads `SPARKDATA_API_KEY`
47
+ - `public_klines_daily()` — no key needed
48
+ - `klines_daily()` — authenticated
49
+ - typed errors: `AuthError` / `RateLimitError` / `InvalidParameterError` / `ServerError`
50
+ - automatic retry on `429` / `5xx` with backoff
51
+ - no hard dependency on pandas
52
+
53
+ ---
54
+
55
+ ## Links
56
+
57
+ - Website: <https://www.spark-data.cn>
58
+ - API reference: <https://www.spark-data.cn/api-reference>
59
+ - Terms: <https://www.spark-data.cn/legal/terms>
60
+ - Contact: service@spark-data.cn
61
+
62
+ ---
63
+
64
+ © 2026 杭州智元星火科技有限公司 · SparkData数据平台
@@ -0,0 +1,26 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "sparkdata"
7
+ version = "0.0.1"
8
+ description = "Python client for SparkData (A-share market data API) — placeholder release"
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = { text = "Proprietary" }
12
+ authors = [{ name = "Hangzhou Zhiyuan Xinghuo Technology Co., Ltd.", email = "service@spark-data.cn" }]
13
+ keywords = ["finance", "market-data", "a-share", "quant", "api"]
14
+ classifiers = [
15
+ "Programming Language :: Python :: 3",
16
+ "Operating System :: OS Independent",
17
+ "Intended Audience :: Financial and Insurance Industry",
18
+ ]
19
+
20
+ [project.urls]
21
+ Homepage = "https://www.spark-data.cn"
22
+ Documentation = "https://www.spark-data.cn/api-reference"
23
+ Repository = "https://www.spark-data.cn"
24
+
25
+ [tool.hatch.build.targets.wheel]
26
+ packages = ["sparkdata"]
@@ -0,0 +1,16 @@
1
+ """SparkData — Python client for A-share market data API.
2
+
3
+ Status: **placeholder release (0.0.1)** — the client is under development.
4
+
5
+ Until the Python client ships, use the HTTP API directly:
6
+
7
+ https://www.spark-data.cn/api-reference
8
+
9
+ Public endpoints (no API key required):
10
+
11
+ GET https://www.spark-data.cn/v1/public/klines/daily?symbol=XSHG:000001
12
+
13
+ """
14
+
15
+ __version__ = "0.0.1"
16
+ __all__ = ["__version__"]