datasinking 0.2.10__tar.gz → 0.2.11__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.10 → datasinking-0.2.11}/PKG-INFO +20 -3
- {datasinking-0.2.10 → datasinking-0.2.11}/README.md +19 -2
- {datasinking-0.2.10 → datasinking-0.2.11}/datasinking/_version.py +1 -1
- {datasinking-0.2.10 → datasinking-0.2.11}/datasinking/mcp_server.py +25 -2
- {datasinking-0.2.10 → datasinking-0.2.11}/datasinking.egg-info/PKG-INFO +20 -3
- {datasinking-0.2.10 → datasinking-0.2.11}/LICENSE +0 -0
- {datasinking-0.2.10 → datasinking-0.2.11}/datasinking/__init__.py +0 -0
- {datasinking-0.2.10 → datasinking-0.2.11}/datasinking/client.py +0 -0
- {datasinking-0.2.10 → datasinking-0.2.11}/datasinking.egg-info/SOURCES.txt +0 -0
- {datasinking-0.2.10 → datasinking-0.2.11}/datasinking.egg-info/dependency_links.txt +0 -0
- {datasinking-0.2.10 → datasinking-0.2.11}/datasinking.egg-info/entry_points.txt +0 -0
- {datasinking-0.2.10 → datasinking-0.2.11}/datasinking.egg-info/requires.txt +0 -0
- {datasinking-0.2.10 → datasinking-0.2.11}/datasinking.egg-info/top_level.txt +0 -0
- {datasinking-0.2.10 → datasinking-0.2.11}/pyproject.toml +0 -0
- {datasinking-0.2.10 → datasinking-0.2.11}/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.11
|
|
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
|
|
@@ -102,7 +102,10 @@ Then use `command: datasinking-mcp` in your client.
|
|
|
102
102
|
Both run the same six tools with the same schemas — `npm/` and `datasinking/mcp_server.py` are
|
|
103
103
|
kept in lockstep by [`check_mcp_parity.py`](check_mcp_parity.py).
|
|
104
104
|
|
|
105
|
-
Full per-client setup: [`mcp-server.md`](mcp-server.md)
|
|
105
|
+
Full per-client setup: [`mcp-server.md`](mcp-server.md) (overview) ·
|
|
106
|
+
[`docs/mcp/`](docs/mcp/) (one guide per client).
|
|
107
|
+
Hosted endpoint is **POST-only and stateless** — `GET /mcp` returns 405, no session id, and every
|
|
108
|
+
client needs a restart after a config change. That trips up most first connections.
|
|
106
109
|
|
|
107
110
|

|
|
108
111
|
|
|
@@ -116,12 +119,26 @@ datasinking/
|
|
|
116
119
|
├── research/ # Research notes / blog posts (reproducing paper-style presentation)
|
|
117
120
|
├── datasinking/ # Python client + MCP server — pip install "datasinking[mcp]"
|
|
118
121
|
├── npm/ # The same MCP server on npm — npx -y datasinking-mcp (Node 18+)
|
|
119
|
-
├── mcp
|
|
122
|
+
├── docs/mcp/ # Per-client MCP setup: Claude Code, Claude Desktop, Cursor, Codex, WorkBuddy
|
|
123
|
+
├── mcp-server.md # MCP server overview — the two config shapes, tools, endpoint limits
|
|
120
124
|
├── llm-examples.md # Ask an LLM — no code needed (8 end-to-end examples)
|
|
121
125
|
├── api-examples.md # 7 examples × 3 interfaces (curl / Python / LLM)
|
|
122
126
|
└── README.md
|
|
123
127
|
```
|
|
124
128
|
|
|
129
|
+
Per-client MCP guides — one file each, with the exact config path, both scopes, verification and the
|
|
130
|
+
errors that client actually produces:
|
|
131
|
+
|
|
132
|
+
| Client | Guide |
|
|
133
|
+
|---|---|
|
|
134
|
+
| Claude Code | [`docs/mcp/claude-code.md`](docs/mcp/claude-code.md) |
|
|
135
|
+
| Claude Desktop | [`docs/mcp/claude-desktop.md`](docs/mcp/claude-desktop.md) |
|
|
136
|
+
| OpenAI Codex CLI | [`docs/mcp/codex.md`](docs/mcp/codex.md) |
|
|
137
|
+
| WorkBuddy / CodeBuddy | [`docs/mcp/workbuddy.md`](docs/mcp/workbuddy.md) |
|
|
138
|
+
| Cursor | [`docs/mcp/cursor.md`](docs/mcp/cursor.md) |
|
|
139
|
+
| DeepSeek | [`docs/mcp/deepseek.md`](docs/mcp/deepseek.md) |
|
|
140
|
+
| Windsurf | [`docs/mcp/windsurf.md`](docs/mcp/windsurf.md) |
|
|
141
|
+
|
|
125
142
|
## Quick start
|
|
126
143
|
|
|
127
144
|
1. Get an API key at [datasink.ing](https://datasink.ing)
|
|
@@ -79,7 +79,10 @@ Then use `command: datasinking-mcp` in your client.
|
|
|
79
79
|
Both run the same six tools with the same schemas — `npm/` and `datasinking/mcp_server.py` are
|
|
80
80
|
kept in lockstep by [`check_mcp_parity.py`](check_mcp_parity.py).
|
|
81
81
|
|
|
82
|
-
Full per-client setup: [`mcp-server.md`](mcp-server.md)
|
|
82
|
+
Full per-client setup: [`mcp-server.md`](mcp-server.md) (overview) ·
|
|
83
|
+
[`docs/mcp/`](docs/mcp/) (one guide per client).
|
|
84
|
+
Hosted endpoint is **POST-only and stateless** — `GET /mcp` returns 405, no session id, and every
|
|
85
|
+
client needs a restart after a config change. That trips up most first connections.
|
|
83
86
|
|
|
84
87
|

|
|
85
88
|
|
|
@@ -93,12 +96,26 @@ datasinking/
|
|
|
93
96
|
├── research/ # Research notes / blog posts (reproducing paper-style presentation)
|
|
94
97
|
├── datasinking/ # Python client + MCP server — pip install "datasinking[mcp]"
|
|
95
98
|
├── npm/ # The same MCP server on npm — npx -y datasinking-mcp (Node 18+)
|
|
96
|
-
├── mcp
|
|
99
|
+
├── docs/mcp/ # Per-client MCP setup: Claude Code, Claude Desktop, Cursor, Codex, WorkBuddy
|
|
100
|
+
├── mcp-server.md # MCP server overview — the two config shapes, tools, endpoint limits
|
|
97
101
|
├── llm-examples.md # Ask an LLM — no code needed (8 end-to-end examples)
|
|
98
102
|
├── api-examples.md # 7 examples × 3 interfaces (curl / Python / LLM)
|
|
99
103
|
└── README.md
|
|
100
104
|
```
|
|
101
105
|
|
|
106
|
+
Per-client MCP guides — one file each, with the exact config path, both scopes, verification and the
|
|
107
|
+
errors that client actually produces:
|
|
108
|
+
|
|
109
|
+
| Client | Guide |
|
|
110
|
+
|---|---|
|
|
111
|
+
| Claude Code | [`docs/mcp/claude-code.md`](docs/mcp/claude-code.md) |
|
|
112
|
+
| Claude Desktop | [`docs/mcp/claude-desktop.md`](docs/mcp/claude-desktop.md) |
|
|
113
|
+
| OpenAI Codex CLI | [`docs/mcp/codex.md`](docs/mcp/codex.md) |
|
|
114
|
+
| WorkBuddy / CodeBuddy | [`docs/mcp/workbuddy.md`](docs/mcp/workbuddy.md) |
|
|
115
|
+
| Cursor | [`docs/mcp/cursor.md`](docs/mcp/cursor.md) |
|
|
116
|
+
| DeepSeek | [`docs/mcp/deepseek.md`](docs/mcp/deepseek.md) |
|
|
117
|
+
| Windsurf | [`docs/mcp/windsurf.md`](docs/mcp/windsurf.md) |
|
|
118
|
+
|
|
102
119
|
## Quick start
|
|
103
120
|
|
|
104
121
|
1. Get an API key at [datasink.ing](https://datasink.ing)
|
|
@@ -18,6 +18,7 @@ the environment variable ``DATASINK_API_KEY`` (get a free key at
|
|
|
18
18
|
https://datasink.ing).
|
|
19
19
|
"""
|
|
20
20
|
|
|
21
|
+
import json
|
|
21
22
|
import os
|
|
22
23
|
from typing import Annotated, Optional
|
|
23
24
|
|
|
@@ -56,7 +57,18 @@ mcp = FastMCP(
|
|
|
56
57
|
|
|
57
58
|
|
|
58
59
|
def _get(path: str, params: Optional[dict] = None) -> dict:
|
|
59
|
-
"""Call the DataSinking API, carrying the API key automatically.
|
|
60
|
+
"""Call the DataSinking API, carrying the API key automatically.
|
|
61
|
+
|
|
62
|
+
出错时**把服务端 body 原文带出去**。它写的不是「失败了」,而是「该怎么办」:
|
|
63
|
+
|
|
64
|
+
``detail`` 一句人话(「未找到章节「X」」)
|
|
65
|
+
``available`` 那份报告的**全部真实标题**
|
|
66
|
+
|
|
67
|
+
``get_section`` 的工具描述明确让模型「retry with one of those」,所以这个列表
|
|
68
|
+
必须跟着异常走。原来这里是一句 ``r.raise_for_status()``,body 整个丢掉 ——
|
|
69
|
+
模型只看到裸的 ``404 Client Error: Not Found for url: ...``,既不知道错在哪,
|
|
70
|
+
也没有可重试的标题(2026-09-22 用真 key 实测,三份实现里这份丢得最干净)。
|
|
71
|
+
"""
|
|
60
72
|
if not API_KEY:
|
|
61
73
|
raise RuntimeError(
|
|
62
74
|
"Missing DATASINK_API_KEY environment variable (get a free key at https://datasink.ing)"
|
|
@@ -64,7 +76,18 @@ def _get(path: str, params: Optional[dict] = None) -> dict:
|
|
|
64
76
|
p = dict(params or {})
|
|
65
77
|
p["apikey"] = API_KEY
|
|
66
78
|
r = requests.get(f"{BASE_URL}{path}", params=p, timeout=90)
|
|
67
|
-
r.
|
|
79
|
+
if not r.ok:
|
|
80
|
+
try:
|
|
81
|
+
body = r.json()
|
|
82
|
+
except ValueError:
|
|
83
|
+
body = None
|
|
84
|
+
if not isinstance(body, dict):
|
|
85
|
+
body = {}
|
|
86
|
+
msg = f"HTTP {r.status_code}: {body.get('detail') or r.text[:2000]}"
|
|
87
|
+
available = body.get("available")
|
|
88
|
+
if isinstance(available, list):
|
|
89
|
+
msg += "\nAvailable sections: " + json.dumps(available, ensure_ascii=False)
|
|
90
|
+
raise RuntimeError(msg)
|
|
68
91
|
return r.json()
|
|
69
92
|
|
|
70
93
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: datasinking
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.11
|
|
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
|
|
@@ -102,7 +102,10 @@ Then use `command: datasinking-mcp` in your client.
|
|
|
102
102
|
Both run the same six tools with the same schemas — `npm/` and `datasinking/mcp_server.py` are
|
|
103
103
|
kept in lockstep by [`check_mcp_parity.py`](check_mcp_parity.py).
|
|
104
104
|
|
|
105
|
-
Full per-client setup: [`mcp-server.md`](mcp-server.md)
|
|
105
|
+
Full per-client setup: [`mcp-server.md`](mcp-server.md) (overview) ·
|
|
106
|
+
[`docs/mcp/`](docs/mcp/) (one guide per client).
|
|
107
|
+
Hosted endpoint is **POST-only and stateless** — `GET /mcp` returns 405, no session id, and every
|
|
108
|
+
client needs a restart after a config change. That trips up most first connections.
|
|
106
109
|
|
|
107
110
|

|
|
108
111
|
|
|
@@ -116,12 +119,26 @@ datasinking/
|
|
|
116
119
|
├── research/ # Research notes / blog posts (reproducing paper-style presentation)
|
|
117
120
|
├── datasinking/ # Python client + MCP server — pip install "datasinking[mcp]"
|
|
118
121
|
├── npm/ # The same MCP server on npm — npx -y datasinking-mcp (Node 18+)
|
|
119
|
-
├── mcp
|
|
122
|
+
├── docs/mcp/ # Per-client MCP setup: Claude Code, Claude Desktop, Cursor, Codex, WorkBuddy
|
|
123
|
+
├── mcp-server.md # MCP server overview — the two config shapes, tools, endpoint limits
|
|
120
124
|
├── llm-examples.md # Ask an LLM — no code needed (8 end-to-end examples)
|
|
121
125
|
├── api-examples.md # 7 examples × 3 interfaces (curl / Python / LLM)
|
|
122
126
|
└── README.md
|
|
123
127
|
```
|
|
124
128
|
|
|
129
|
+
Per-client MCP guides — one file each, with the exact config path, both scopes, verification and the
|
|
130
|
+
errors that client actually produces:
|
|
131
|
+
|
|
132
|
+
| Client | Guide |
|
|
133
|
+
|---|---|
|
|
134
|
+
| Claude Code | [`docs/mcp/claude-code.md`](docs/mcp/claude-code.md) |
|
|
135
|
+
| Claude Desktop | [`docs/mcp/claude-desktop.md`](docs/mcp/claude-desktop.md) |
|
|
136
|
+
| OpenAI Codex CLI | [`docs/mcp/codex.md`](docs/mcp/codex.md) |
|
|
137
|
+
| WorkBuddy / CodeBuddy | [`docs/mcp/workbuddy.md`](docs/mcp/workbuddy.md) |
|
|
138
|
+
| Cursor | [`docs/mcp/cursor.md`](docs/mcp/cursor.md) |
|
|
139
|
+
| DeepSeek | [`docs/mcp/deepseek.md`](docs/mcp/deepseek.md) |
|
|
140
|
+
| Windsurf | [`docs/mcp/windsurf.md`](docs/mcp/windsurf.md) |
|
|
141
|
+
|
|
125
142
|
## Quick start
|
|
126
143
|
|
|
127
144
|
1. Get an API key at [datasink.ing](https://datasink.ing)
|
|
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
|