datasinking 0.2.9__tar.gz → 0.2.10__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.
- {datasinking-0.2.9 → datasinking-0.2.10}/PKG-INFO +23 -2
- {datasinking-0.2.9 → datasinking-0.2.10}/README.md +22 -1
- {datasinking-0.2.9 → datasinking-0.2.10}/datasinking/_version.py +1 -1
- {datasinking-0.2.9 → datasinking-0.2.10}/datasinking/mcp_server.py +13 -13
- {datasinking-0.2.9 → datasinking-0.2.10}/datasinking.egg-info/PKG-INFO +23 -2
- {datasinking-0.2.9 → datasinking-0.2.10}/LICENSE +0 -0
- {datasinking-0.2.9 → datasinking-0.2.10}/datasinking/__init__.py +0 -0
- {datasinking-0.2.9 → datasinking-0.2.10}/datasinking/client.py +0 -0
- {datasinking-0.2.9 → datasinking-0.2.10}/datasinking.egg-info/SOURCES.txt +0 -0
- {datasinking-0.2.9 → datasinking-0.2.10}/datasinking.egg-info/dependency_links.txt +0 -0
- {datasinking-0.2.9 → datasinking-0.2.10}/datasinking.egg-info/entry_points.txt +0 -0
- {datasinking-0.2.9 → datasinking-0.2.10}/datasinking.egg-info/requires.txt +0 -0
- {datasinking-0.2.9 → datasinking-0.2.10}/datasinking.egg-info/top_level.txt +0 -0
- {datasinking-0.2.9 → datasinking-0.2.10}/pyproject.toml +0 -0
- {datasinking-0.2.9 → datasinking-0.2.10}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: datasinking
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.10
|
|
4
4
|
Summary: Python client for DataSinking — full-text Asian financial reports (China, Korea, Japan, Taiwan) as Markdown.
|
|
5
5
|
Author: DataSinking
|
|
6
6
|
License: MIT
|
|
@@ -73,7 +73,24 @@ output but can't redact a URL.
|
|
|
73
73
|
|
|
74
74
|
### Local — run it yourself
|
|
75
75
|
|
|
76
|
-
If you'd rather keep everything on your own machine
|
|
76
|
+
If you'd rather keep everything on your own machine, there are two identical builds — pick
|
|
77
|
+
whichever runtime you already have:
|
|
78
|
+
|
|
79
|
+
**Node 18+ (no Python needed):**
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
{
|
|
83
|
+
"mcpServers": {
|
|
84
|
+
"datasinking": {
|
|
85
|
+
"command": "npx",
|
|
86
|
+
"args": ["-y", "datasinking-mcp"],
|
|
87
|
+
"env": { "DATASINK_API_KEY": "YOUR_KEY" }
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**Python 3.8+:**
|
|
77
94
|
|
|
78
95
|
```bash
|
|
79
96
|
pip install "datasinking[mcp]"
|
|
@@ -82,6 +99,9 @@ datasinking-mcp # requires DATASINK_API_KEY (free at https://datasink.i
|
|
|
82
99
|
|
|
83
100
|
Then use `command: datasinking-mcp` in your client.
|
|
84
101
|
|
|
102
|
+
Both run the same six tools with the same schemas — `npm/` and `datasinking/mcp_server.py` are
|
|
103
|
+
kept in lockstep by [`check_mcp_parity.py`](check_mcp_parity.py).
|
|
104
|
+
|
|
85
105
|
Full per-client setup: [`mcp-server.md`](mcp-server.md).
|
|
86
106
|
|
|
87
107
|

|
|
@@ -95,6 +115,7 @@ datasinking/
|
|
|
95
115
|
├── examples/ # Example scripts: pull data from the API and analyze it
|
|
96
116
|
├── research/ # Research notes / blog posts (reproducing paper-style presentation)
|
|
97
117
|
├── datasinking/ # Python client + MCP server — pip install "datasinking[mcp]"
|
|
118
|
+
├── npm/ # The same MCP server on npm — npx -y datasinking-mcp (Node 18+)
|
|
98
119
|
├── mcp-server.md # How to configure the MCP server (for AI agents: Claude / Cursor / Codex / DeepSeek)
|
|
99
120
|
├── llm-examples.md # Ask an LLM — no code needed (8 end-to-end examples)
|
|
100
121
|
├── api-examples.md # 7 examples × 3 interfaces (curl / Python / LLM)
|
|
@@ -50,7 +50,24 @@ output but can't redact a URL.
|
|
|
50
50
|
|
|
51
51
|
### Local — run it yourself
|
|
52
52
|
|
|
53
|
-
If you'd rather keep everything on your own machine
|
|
53
|
+
If you'd rather keep everything on your own machine, there are two identical builds — pick
|
|
54
|
+
whichever runtime you already have:
|
|
55
|
+
|
|
56
|
+
**Node 18+ (no Python needed):**
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"mcpServers": {
|
|
61
|
+
"datasinking": {
|
|
62
|
+
"command": "npx",
|
|
63
|
+
"args": ["-y", "datasinking-mcp"],
|
|
64
|
+
"env": { "DATASINK_API_KEY": "YOUR_KEY" }
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Python 3.8+:**
|
|
54
71
|
|
|
55
72
|
```bash
|
|
56
73
|
pip install "datasinking[mcp]"
|
|
@@ -59,6 +76,9 @@ datasinking-mcp # requires DATASINK_API_KEY (free at https://datasink.i
|
|
|
59
76
|
|
|
60
77
|
Then use `command: datasinking-mcp` in your client.
|
|
61
78
|
|
|
79
|
+
Both run the same six tools with the same schemas — `npm/` and `datasinking/mcp_server.py` are
|
|
80
|
+
kept in lockstep by [`check_mcp_parity.py`](check_mcp_parity.py).
|
|
81
|
+
|
|
62
82
|
Full per-client setup: [`mcp-server.md`](mcp-server.md).
|
|
63
83
|
|
|
64
84
|

|
|
@@ -72,6 +92,7 @@ datasinking/
|
|
|
72
92
|
├── examples/ # Example scripts: pull data from the API and analyze it
|
|
73
93
|
├── research/ # Research notes / blog posts (reproducing paper-style presentation)
|
|
74
94
|
├── datasinking/ # Python client + MCP server — pip install "datasinking[mcp]"
|
|
95
|
+
├── npm/ # The same MCP server on npm — npx -y datasinking-mcp (Node 18+)
|
|
75
96
|
├── mcp-server.md # How to configure the MCP server (for AI agents: Claude / Cursor / Codex / DeepSeek)
|
|
76
97
|
├── llm-examples.md # Ask an LLM — no code needed (8 end-to-end examples)
|
|
77
98
|
├── api-examples.md # 7 examples × 3 interfaces (curl / Python / LLM)
|
|
@@ -70,7 +70,7 @@ def _get(path: str, params: Optional[dict] = None) -> dict:
|
|
|
70
70
|
|
|
71
71
|
@mcp.tool()
|
|
72
72
|
def list_exchanges() -> list:
|
|
73
|
-
"""List the exchanges DataSinking covers
|
|
73
|
+
"""List the exchanges DataSinking covers.
|
|
74
74
|
|
|
75
75
|
Returns exchange codes (sse / szse / bj / ksc / koe / knx / jpx / twse / tpex) with
|
|
76
76
|
the number of reports available per exchange. Call this first to discover coverage.
|
|
@@ -82,13 +82,13 @@ def list_exchanges() -> list:
|
|
|
82
82
|
@mcp.tool()
|
|
83
83
|
def list_stocks(
|
|
84
84
|
exchange: Annotated[
|
|
85
|
-
str, Field(description="Exchange code
|
|
85
|
+
str, Field(description="Exchange code, e.g. sse / szse / bj / ksc / koe / knx / jpx / twse / tpex")
|
|
86
86
|
],
|
|
87
87
|
limit: Annotated[
|
|
88
88
|
int, Field(description="Return only the first N companies (default 20) to keep the response short.")
|
|
89
89
|
] = 20,
|
|
90
90
|
) -> dict:
|
|
91
|
-
"""List stocks on
|
|
91
|
+
"""List the stocks on one exchange, including the report count per company."""
|
|
92
92
|
data = _get("/stocks", {"exchange": exchange})
|
|
93
93
|
return {"exchange": exchange, "total": data.get("total", 0), "items": data.get("items", [])[:limit]}
|
|
94
94
|
|
|
@@ -99,13 +99,13 @@ def list_reports(
|
|
|
99
99
|
str, Field(description="FMP-style symbol, e.g. 600519.SS / 005930.KS / 7203.T / 2330.TW")
|
|
100
100
|
],
|
|
101
101
|
doc_type: Annotated[
|
|
102
|
-
str, Field(description="
|
|
102
|
+
str, Field(description="Report type to filter on. Defaults to annual.")
|
|
103
103
|
] = "annual",
|
|
104
104
|
size: Annotated[int, Field(description="Number of reports to return (default 10).")] = 10,
|
|
105
105
|
) -> dict:
|
|
106
106
|
"""List a company's reports — metadata only (id, title, period), no body text.
|
|
107
107
|
|
|
108
|
-
Each item carries a
|
|
108
|
+
Each item carries a `source` field naming the official disclosure platform;
|
|
109
109
|
keep that attribution when you cite it.
|
|
110
110
|
"""
|
|
111
111
|
return _get("/documents", {"symbol": symbol, "doc_type": doc_type, "size": size})
|
|
@@ -115,9 +115,9 @@ def list_reports(
|
|
|
115
115
|
def get_report(
|
|
116
116
|
document_id: Annotated[int, Field(description="Report id, from list_reports items[].id")],
|
|
117
117
|
) -> dict:
|
|
118
|
-
"""Fetch
|
|
118
|
+
"""Fetch one report's full text (metadata + Markdown body).
|
|
119
119
|
|
|
120
|
-
The
|
|
120
|
+
The `source` field names the official disclosure platform; keep that attribution
|
|
121
121
|
when you cite it. Expensive in tokens — prefer get_section when you only need one chapter.
|
|
122
122
|
"""
|
|
123
123
|
return _get(f"/documents/{document_id}")
|
|
@@ -127,13 +127,13 @@ def get_report(
|
|
|
127
127
|
def list_sections(
|
|
128
128
|
document_id: Annotated[int, Field(description="Report id, from list_reports items[].id")],
|
|
129
129
|
) -> dict:
|
|
130
|
-
"""List every section of a report with its size
|
|
130
|
+
"""List every section of a report with its size, before you decide what to pull.
|
|
131
131
|
|
|
132
|
-
Returns
|
|
133
|
-
|
|
132
|
+
Returns `sections` (titles, in order) plus `section_details` — same order, one entry
|
|
133
|
+
per section with `title`, `has_tables`, `chars` and `estimated_tokens`.
|
|
134
134
|
|
|
135
|
-
Use
|
|
136
|
-
and
|
|
135
|
+
Use `estimated_tokens` to avoid pulling a chapter that would blow your context,
|
|
136
|
+
and `has_tables` to know whether the chapter needs special handling (tables are the
|
|
137
137
|
part RAG pipelines usually get wrong). Then call get_section with a heading keyword —
|
|
138
138
|
the headings are in the report's own language.
|
|
139
139
|
"""
|
|
@@ -157,7 +157,7 @@ def get_section(
|
|
|
157
157
|
),
|
|
158
158
|
],
|
|
159
159
|
) -> dict:
|
|
160
|
-
"""Fetch only one section of a report by keyword — cheaper than get_report for RAG."""
|
|
160
|
+
"""Fetch only one section of a report by keyword — much cheaper than get_report, best for RAG."""
|
|
161
161
|
return _get(f"/documents/{document_id}", {"section": section})
|
|
162
162
|
|
|
163
163
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: datasinking
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.10
|
|
4
4
|
Summary: Python client for DataSinking — full-text Asian financial reports (China, Korea, Japan, Taiwan) as Markdown.
|
|
5
5
|
Author: DataSinking
|
|
6
6
|
License: MIT
|
|
@@ -73,7 +73,24 @@ output but can't redact a URL.
|
|
|
73
73
|
|
|
74
74
|
### Local — run it yourself
|
|
75
75
|
|
|
76
|
-
If you'd rather keep everything on your own machine
|
|
76
|
+
If you'd rather keep everything on your own machine, there are two identical builds — pick
|
|
77
|
+
whichever runtime you already have:
|
|
78
|
+
|
|
79
|
+
**Node 18+ (no Python needed):**
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
{
|
|
83
|
+
"mcpServers": {
|
|
84
|
+
"datasinking": {
|
|
85
|
+
"command": "npx",
|
|
86
|
+
"args": ["-y", "datasinking-mcp"],
|
|
87
|
+
"env": { "DATASINK_API_KEY": "YOUR_KEY" }
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**Python 3.8+:**
|
|
77
94
|
|
|
78
95
|
```bash
|
|
79
96
|
pip install "datasinking[mcp]"
|
|
@@ -82,6 +99,9 @@ datasinking-mcp # requires DATASINK_API_KEY (free at https://datasink.i
|
|
|
82
99
|
|
|
83
100
|
Then use `command: datasinking-mcp` in your client.
|
|
84
101
|
|
|
102
|
+
Both run the same six tools with the same schemas — `npm/` and `datasinking/mcp_server.py` are
|
|
103
|
+
kept in lockstep by [`check_mcp_parity.py`](check_mcp_parity.py).
|
|
104
|
+
|
|
85
105
|
Full per-client setup: [`mcp-server.md`](mcp-server.md).
|
|
86
106
|
|
|
87
107
|

|
|
@@ -95,6 +115,7 @@ datasinking/
|
|
|
95
115
|
├── examples/ # Example scripts: pull data from the API and analyze it
|
|
96
116
|
├── research/ # Research notes / blog posts (reproducing paper-style presentation)
|
|
97
117
|
├── datasinking/ # Python client + MCP server — pip install "datasinking[mcp]"
|
|
118
|
+
├── npm/ # The same MCP server on npm — npx -y datasinking-mcp (Node 18+)
|
|
98
119
|
├── mcp-server.md # How to configure the MCP server (for AI agents: Claude / Cursor / Codex / DeepSeek)
|
|
99
120
|
├── llm-examples.md # Ask an LLM — no code needed (8 end-to-end examples)
|
|
100
121
|
├── api-examples.md # 7 examples × 3 interfaces (curl / Python / LLM)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|