datasinking 0.2.15__tar.gz → 0.2.17__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,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: datasinking
3
- Version: 0.2.15
4
- Summary: Python client for DataSinking — full-text financial reports (US, UK, China, Japan, Korea, Taiwan) as Markdown. Earn $7 per yearly referral: https://datasink.ing/affiliate
3
+ Version: 0.2.17
4
+ Summary: Python client for DataSinking — full-text financial reports (US, UK, China, Japan, Korea, Taiwan) as Markdown. Earn $7 per purchase per referral (recurring): https://datasink.ing/affiliate
5
5
  Author: DataSinking
6
6
  License: MIT
7
7
  Project-URL: Homepage, https://datasink.ing
@@ -232,7 +232,7 @@ Every document also carries a `source` field in the API response, so the attribu
232
232
 
233
233
  ## Affiliate
234
234
 
235
- Earn **$7** for every customer who buys the yearly plan — one-time, PayPal, $31 minimum withdrawal: [datasink.ing/affiliate](https://datasink.ing/affiliate)
235
+ Earn **$7 every purchase** for every customer you refer — recurring, PayPal, $31 minimum withdrawal: [datasink.ing/affiliate](https://datasink.ing/affiliate)
236
236
 
237
237
  ## License
238
238
 
@@ -209,7 +209,7 @@ Every document also carries a `source` field in the API response, so the attribu
209
209
 
210
210
  ## Affiliate
211
211
 
212
- Earn **$7** for every customer who buys the yearly plan — one-time, PayPal, $31 minimum withdrawal: [datasink.ing/affiliate](https://datasink.ing/affiliate)
212
+ Earn **$7 every purchase** for every customer you refer — recurring, PayPal, $31 minimum withdrawal: [datasink.ing/affiliate](https://datasink.ing/affiliate)
213
213
 
214
214
  ## License
215
215
 
@@ -8,4 +8,4 @@ pyproject.toml 用 `dynamic = ["version"]` 从这里读,`client.py` 的 User-A
8
8
  写着旧版本)。现在只有这一处需要改。
9
9
  """
10
10
 
11
- __version__ = "0.2.15"
11
+ __version__ = "0.2.17"
@@ -115,9 +115,9 @@ def _get(path: str, params: Optional[dict] = None) -> dict:
115
115
  def list_exchanges() -> list:
116
116
  """List the exchanges DataSinking covers.
117
117
 
118
- Returns exchange codes (nyse / nasdaq / cboe / sse / szse / bj / jpx / ksc / koe / knx / twse / tpex / lse) with
118
+ Returns exchange codes (bj / br / by / jpx / koe / ksc / lk / lse / nasdaq / np / nyse / otc / sse / szse / tpex / twse) with
119
119
  the number of reports available per exchange. Call this first to discover coverage.
120
- Sources: US = SEC EDGAR, A-shares = cninfo.com.cn, Japan = EDINET, Korea = DART, Taiwan = MOPS, UK = FCA NSM.
120
+ Sources: US = SEC EDGAR, A-shares = cninfo.com.cn, Japan = EDINET, Korea = DART, Taiwan = MOPS, UK = FCA NSM, Nepal = NEPSE, Brazil = CVM, Belarus = ЕПФР, Sri Lanka = CSE.
121
121
  """
122
122
  return _get("/exchanges").get("exchanges", [])
123
123
 
@@ -125,7 +125,7 @@ def list_exchanges() -> list:
125
125
  @mcp.tool()
126
126
  def list_stocks(
127
127
  exchange: Annotated[
128
- str, Field(description="Exchange code, e.g. nyse / nasdaq / cboe / sse / szse / bj / jpx / ksc / koe / knx / twse / tpex / lse")
128
+ str, Field(description="Exchange code, e.g. bj / br / by / jpx / koe / ksc / lk / lse / nasdaq / np / nyse / otc / sse / szse / tpex / twse")
129
129
  ],
130
130
  limit: Annotated[
131
131
  int, Field(description="Return only the first N companies (default 20) to keep the response short.")
@@ -139,8 +139,14 @@ def list_stocks(
139
139
  @mcp.tool()
140
140
  def list_reports(
141
141
  symbol: Annotated[
142
- str, Field(description="FMP-style symbol, e.g. AAPL / 600519.SS / 7203.T / 005930.KS / 2330.TW")
143
- ],
142
+ str, Field(description="FMP-style symbol, e.g. AAPL / 600519.SS / 7203.T / 005930.KS / 2330.TW / NABIL.NP")
143
+ ] = "",
144
+ exchange: Annotated[
145
+ str, Field(description="Exchange code (from list_exchanges). Use with stock_code when the code isn't ticker-shaped.")
146
+ ] = "",
147
+ stock_code: Annotated[
148
+ str, Field(description="Exact stock_code from list_stocks. Use with exchange.")
149
+ ] = "",
144
150
  doc_type: Annotated[
145
151
  str, Field(description="Report type to filter on. Defaults to annual.")
146
152
  ] = "annual",
@@ -150,8 +156,17 @@ def list_reports(
150
156
 
151
157
  Each item carries a `source` field naming the official disclosure platform;
152
158
  keep that attribution when you cite it.
159
+ Look up by `symbol` (FMP-style, e.g. AAPL / 600519.SS / NABIL.NP) or by
160
+ `exchange` + `stock_code` (from list_stocks) for markets whose codes aren't
161
+ ticker-shaped (e.g. Brazil CNPJ, Sri Lanka 'AAA.N0000').
153
162
  """
154
- return _get("/documents", {"symbol": symbol, "doc_type": doc_type, "size": size})
163
+ params = {"doc_type": doc_type, "size": size}
164
+ if symbol:
165
+ params["symbol"] = symbol
166
+ elif exchange and stock_code:
167
+ params["exchange"] = exchange
168
+ params["stock_code"] = stock_code
169
+ return _get("/documents", params)
155
170
 
156
171
 
157
172
  @mcp.tool()
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: datasinking
3
- Version: 0.2.15
4
- Summary: Python client for DataSinking — full-text financial reports (US, UK, China, Japan, Korea, Taiwan) as Markdown. Earn $7 per yearly referral: https://datasink.ing/affiliate
3
+ Version: 0.2.17
4
+ Summary: Python client for DataSinking — full-text financial reports (US, UK, China, Japan, Korea, Taiwan) as Markdown. Earn $7 per purchase per referral (recurring): https://datasink.ing/affiliate
5
5
  Author: DataSinking
6
6
  License: MIT
7
7
  Project-URL: Homepage, https://datasink.ing
@@ -232,7 +232,7 @@ Every document also carries a `source` field in the API response, so the attribu
232
232
 
233
233
  ## Affiliate
234
234
 
235
- Earn **$7** for every customer who buys the yearly plan — one-time, PayPal, $31 minimum withdrawal: [datasink.ing/affiliate](https://datasink.ing/affiliate)
235
+ Earn **$7 every purchase** for every customer you refer — recurring, PayPal, $31 minimum withdrawal: [datasink.ing/affiliate](https://datasink.ing/affiliate)
236
236
 
237
237
  ## License
238
238
 
@@ -7,7 +7,7 @@ name = "datasinking"
7
7
  # 版本号唯一来源 = datasinking/_version.py(client.py 的 User-Agent 也读它)。
8
8
  # 以前这里和包内 __version__ 各写各的,结果漂了半年(发 0.2.4 时才发现 __init__ 还停在 0.1.0)。
9
9
  dynamic = ["version"]
10
- description = "Python client for DataSinking — full-text financial reports (US, UK, China, Japan, Korea, Taiwan) as Markdown. Earn $7 per yearly referral: https://datasink.ing/affiliate"
10
+ description = "Python client for DataSinking — full-text financial reports (US, UK, China, Japan, Korea, Taiwan) as Markdown. Earn $7 per purchase per referral (recurring): https://datasink.ing/affiliate"
11
11
  readme = "README.md"
12
12
  requires-python = ">=3.8"
13
13
  license = { text = "MIT" }
File without changes
File without changes