reportify-sdk 0.2.2__py3-none-any.whl → 0.2.4__py3-none-any.whl

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.
reportify_sdk/stock.py CHANGED
@@ -353,7 +353,7 @@ class StockModule:
353
353
  def earnings_calendar(
354
354
  self,
355
355
  *,
356
- area: Literal["us", "hk", "cn"] = "us",
356
+ market: Literal["us", "hk", "cn"] = "us",
357
357
  start_date: str | None = None,
358
358
  end_date: str | None = None,
359
359
  symbol: str | None = None,
@@ -362,7 +362,7 @@ class StockModule:
362
362
  Get earnings announcement calendar
363
363
 
364
364
  Args:
365
- area: Market area ("us", "hk", "cn")
365
+ market: Stock market ("us", "hk", "cn")
366
366
  start_date: Start date (YYYY-MM-DD)
367
367
  end_date: End date (YYYY-MM-DD)
368
368
  symbol: Filter by specific symbol
@@ -370,7 +370,7 @@ class StockModule:
370
370
  Returns:
371
371
  DataFrame with earnings calendar data
372
372
  """
373
- data: dict[str, Any] = {"area": area}
373
+ data: dict[str, Any] = {"market": market}
374
374
  if start_date:
375
375
  data["start_date"] = start_date
376
376
  if end_date:
@@ -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.4
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,10 +4,10 @@ reportify_sdk/docs.py,sha256=O30I1J4qTC8zpkVP_qu1cgT8nv6ysXNClqvaiRb0lhY,4957
4
4
  reportify_sdk/exceptions.py,sha256=r2_C_kTh6tCrQnfA3UozSqMMA-2OBnoP3pGpgYeqcdU,1049
5
5
  reportify_sdk/kb.py,sha256=-4UHWtudFncGRBB42B4YEoMPsEHr4QOtY55_8hKyogE,2240
6
6
  reportify_sdk/quant.py,sha256=9rWKWo2UlG3GfsQC-jpEgXUl25ojEabpvOGISyGMamM,15110
7
- reportify_sdk/stock.py,sha256=NcEhV9JfIQm2BsfYM1k-JVcxHhnnil32dp-bedGG4BU,13513
7
+ reportify_sdk/stock.py,sha256=1H8TEHilcsPHYrp990JXdfSYFCct-3-nrgAtHEz4WYE,14756
8
8
  reportify_sdk/timeline.py,sha256=b5Zj5SjXT4gP0dvEl8gXCWDZJHemyU7NSYahet2nHhc,4075
9
- reportify_sdk-0.2.2.dist-info/licenses/LICENSE,sha256=zBUq4DL4lE-fZU_PMkr0gnxkYS1LhdRHFw8_LmCb-ek,1066
10
- reportify_sdk-0.2.2.dist-info/METADATA,sha256=mKL0oZbmcTLi0pGVLPZDYiULHI5g_qZ_-PDjnNOinz0,4311
11
- reportify_sdk-0.2.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
12
- reportify_sdk-0.2.2.dist-info/top_level.txt,sha256=tc_dzCSWIDsNbHSi-FlyEEX8xwinhN9gl-CwyLRE4B0,14
13
- reportify_sdk-0.2.2.dist-info/RECORD,,
9
+ reportify_sdk-0.2.4.dist-info/licenses/LICENSE,sha256=zBUq4DL4lE-fZU_PMkr0gnxkYS1LhdRHFw8_LmCb-ek,1066
10
+ reportify_sdk-0.2.4.dist-info/METADATA,sha256=NtwValJo0OYkby0HDzK1VbbhvjAFw_da5v2L1LCY8Ag,4311
11
+ reportify_sdk-0.2.4.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
12
+ reportify_sdk-0.2.4.dist-info/top_level.txt,sha256=tc_dzCSWIDsNbHSi-FlyEEX8xwinhN9gl-CwyLRE4B0,14
13
+ reportify_sdk-0.2.4.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5