ffdata 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.
Files changed (27) hide show
  1. {ffdata-0.2.10 → ffdata-0.2.11}/PKG-INFO +1 -1
  2. {ffdata-0.2.10 → ffdata-0.2.11}/pyproject.toml +1 -1
  3. {ffdata-0.2.10 → ffdata-0.2.11}/src/ffdata/__init__.py +6 -0
  4. {ffdata-0.2.10 → ffdata-0.2.11}/src/ffdata/client.py +26 -0
  5. {ffdata-0.2.10 → ffdata-0.2.11}/src/ffdata.egg-info/PKG-INFO +1 -1
  6. {ffdata-0.2.10 → ffdata-0.2.11}/README.md +0 -0
  7. {ffdata-0.2.10 → ffdata-0.2.11}/scripts/configure_ffdata.sh +0 -0
  8. {ffdata-0.2.10 → ffdata-0.2.11}/setup.cfg +0 -0
  9. {ffdata-0.2.10 → ffdata-0.2.11}/src/ffdata/cli.py +0 -0
  10. {ffdata-0.2.10 → ffdata-0.2.11}/src/ffdata/datasets/__init__.py +0 -0
  11. {ffdata-0.2.10 → ffdata-0.2.11}/src/ffdata/datasets/manager.py +0 -0
  12. {ffdata-0.2.10 → ffdata-0.2.11}/src/ffdata/local/__init__.py +0 -0
  13. {ffdata-0.2.10 → ffdata-0.2.11}/src/ffdata/local/store.py +0 -0
  14. {ffdata-0.2.10 → ffdata-0.2.11}/src/ffdata/transport/__init__.py +0 -0
  15. {ffdata-0.2.10 → ffdata-0.2.11}/src/ffdata/transport/http.py +0 -0
  16. {ffdata-0.2.10 → ffdata-0.2.11}/src/ffdata.egg-info/SOURCES.txt +0 -0
  17. {ffdata-0.2.10 → ffdata-0.2.11}/src/ffdata.egg-info/dependency_links.txt +0 -0
  18. {ffdata-0.2.10 → ffdata-0.2.11}/src/ffdata.egg-info/entry_points.txt +0 -0
  19. {ffdata-0.2.10 → ffdata-0.2.11}/src/ffdata.egg-info/requires.txt +0 -0
  20. {ffdata-0.2.10 → ffdata-0.2.11}/src/ffdata.egg-info/top_level.txt +0 -0
  21. {ffdata-0.2.10 → ffdata-0.2.11}/src/ffdata_common/__init__.py +0 -0
  22. {ffdata-0.2.10 → ffdata-0.2.11}/src/ffdata_common/codecs/__init__.py +0 -0
  23. {ffdata-0.2.10 → ffdata-0.2.11}/src/ffdata_common/codecs/arrow.py +0 -0
  24. {ffdata-0.2.10 → ffdata-0.2.11}/src/ffdata_common/errors.py +0 -0
  25. {ffdata-0.2.10 → ffdata-0.2.11}/src/ffdata_common/protocol.py +0 -0
  26. {ffdata-0.2.10 → ffdata-0.2.11}/src/ffdata_common/schemas/__init__.py +0 -0
  27. {ffdata-0.2.10 → ffdata-0.2.11}/src/ffdata_common/schemas/manifest.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ffdata
3
- Version: 0.2.10
3
+ Version: 0.2.11
4
4
  Summary: ffdata lightweight Python client for governed financial-data APIs
5
5
  Requires-Python: >=3.12
6
6
  Description-Content-Type: text/markdown
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "ffdata"
3
- version = "0.2.10"
3
+ version = "0.2.11"
4
4
  description = "ffdata lightweight Python client for governed financial-data APIs"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -97,6 +97,11 @@ def index_industry(*args: Any, **kwargs: Any):
97
97
  return _client().index_industry(*args, **kwargs)
98
98
 
99
99
 
100
+ def index_relation(*args: Any, **kwargs: Any):
101
+ """通过默认客户端查询指数代码的关联指数(如全收益/净收益指数)。"""
102
+ return _client().index_relation(*args, **kwargs)
103
+
104
+
100
105
  def index_performance(*args: Any, **kwargs: Any):
101
106
  """通过默认客户端查询指数区间行情表现(12 个区间,120 列)。"""
102
107
  return _client().index_performance(*args, **kwargs)
@@ -221,6 +226,7 @@ __all__ = [
221
226
  "index_valuation",
222
227
  "index_weight",
223
228
  "index_industry",
229
+ "index_relation",
224
230
  "intl_macro_indicator_basic",
225
231
  "intl_macro_indicator_data",
226
232
  "macro_indicator_basic",
@@ -334,6 +334,32 @@ class Client:
334
334
  fields=fields,
335
335
  )
336
336
 
337
+ def index_relation(
338
+ self,
339
+ index_code: str | list[str],
340
+ *,
341
+ direction: str = "both",
342
+ code_define: int | list[int] | None = None,
343
+ if_effected: int | None = None,
344
+ fields: list[str] | None = None,
345
+ ) -> pd.DataFrame:
346
+ """查询一个指数代码的关联指数(如价格指数与全收益指数)。
347
+
348
+ ``index_code`` 必填,可带发布机构后缀或裸代码(港股用 ``HSI.HI``/``HSI``),
349
+ 支持列表与逗号分隔。``direction`` 取 ``both``(默认)/``primary``/``related``,
350
+ 决定查询代码落在源表哪一侧;``code_define`` 为关联方式码值(如 ``2``
351
+ = 分红规则不同,全收益通常在此);``if_effected`` 为 ``1`` 有效 / ``2`` 失效。
352
+ 返回 13 列;本接口仅支持远程查询。
353
+ """
354
+ return self.query(
355
+ "index_relation",
356
+ index_code=index_code,
357
+ direction=direction,
358
+ code_define=code_define,
359
+ if_effected=if_effected,
360
+ fields=fields,
361
+ )
362
+
337
363
  def index_performance(
338
364
  self,
339
365
  ts_code: str | list[str] | None = None,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ffdata
3
- Version: 0.2.10
3
+ Version: 0.2.11
4
4
  Summary: ffdata lightweight Python client for governed financial-data APIs
5
5
  Requires-Python: >=3.12
6
6
  Description-Content-Type: text/markdown
File without changes
File without changes
File without changes