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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: datasinking
3
- Version: 0.2.9
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
  ![DataSinking MCP in Claude](docs/images/mcp-demo.png)
@@ -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
  ![DataSinking MCP in Claude](docs/images/mcp-demo.png)
@@ -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)
@@ -8,4 +8,4 @@ pyproject.toml 用 `dynamic = ["version"]` 从这里读,`client.py` 的 User-A
8
8
  写着旧版本)。现在只有这一处需要改。
9
9
  """
10
10
 
11
- __version__ = "0.2.9"
11
+ __version__ = "0.2.10"
@@ -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 and their report counts.
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: sse / szse / bj / ksc / koe / knx / jpx / twse / tpex")
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 an exchange, including the report count per company."""
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="annual / semiannual / q1 / q3")
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 ``source`` field naming the official disclosure platform;
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 a single report's full text (metadata + Markdown body).
118
+ """Fetch one report's full text (metadata + Markdown body).
119
119
 
120
- The ``source`` field names the official disclosure platform; keep that attribution
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 call this before pulling anything.
130
+ """List every section of a report with its size, before you decide what to pull.
131
131
 
132
- Returns ``sections`` (titles, in order) plus ``section_details``: the same list as
133
- objects with ``title``, ``has_tables``, ``chars`` and ``estimated_tokens``.
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 ``estimated_tokens`` to avoid pulling a chapter that would blow your context,
136
- and ``has_tables`` to know whether a chapter needs special handling (tables are the
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.9
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
  ![DataSinking MCP in Claude](docs/images/mcp-demo.png)
@@ -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