reportify-sdk 0.2.2__tar.gz → 0.2.3__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: reportify-sdk
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Python SDK for Reportify API - Financial data and document search
5
5
  Author-email: Reportify <support@reportify.cn>
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "reportify-sdk"
7
- version = "0.2.2"
7
+ version = "0.2.3"
8
8
  description = "Python SDK for Reportify API - Financial data and document search"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -397,6 +397,42 @@ class StockModule:
397
397
  response = self._post("/v1/stock/ipo-calendar-hk", json={"status": status})
398
398
  return self._to_dataframe(response)
399
399
 
400
+ def industry_constituent(
401
+ self,
402
+ market: Literal["cn", "hk", "us"],
403
+ name: str,
404
+ *,
405
+ type: str | None = None,
406
+ ) -> pd.DataFrame:
407
+ """
408
+ Get constituent stocks of an industry
409
+
410
+ Args:
411
+ market: Stock market ("cn", "hk", "us")
412
+ name: Industry name (e.g., "军工", "Technology")
413
+ type: Industry classification type (optional)
414
+ - cn: "sw" (申万2021, default), "wind", "hs"
415
+ - hk: "hs" (恒生, default)
416
+ - us: "GICS" (default)
417
+
418
+ Returns:
419
+ DataFrame with industry constituent stocks
420
+
421
+ Example:
422
+ >>> # Get CN defense industry stocks
423
+ >>> stocks = client.stock.industry_constituent("cn", "军工")
424
+ >>> print(stocks[["symbol", "name", "industry_one_level_name"]])
425
+
426
+ >>> # Get US technology stocks using GICS
427
+ >>> stocks = client.stock.industry_constituent("us", "Technology")
428
+ """
429
+ data = {"market": market, "name": name}
430
+ if type:
431
+ data["type"] = type
432
+
433
+ response = self._post("/v1/stock/industry-constituent", json=data)
434
+ return self._to_dataframe(response)
435
+
400
436
  # -------------------------------------------------------------------------
401
437
  # Helper Methods
402
438
  # -------------------------------------------------------------------------
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reportify-sdk
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Python SDK for Reportify API - Financial data and document search
5
5
  Author-email: Reportify <support@reportify.cn>
6
6
  License-Expression: MIT
File without changes
File without changes
File without changes