ffdata 0.2.8__tar.gz → 0.2.9__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.
- {ffdata-0.2.8 → ffdata-0.2.9}/PKG-INFO +1 -1
- {ffdata-0.2.8 → ffdata-0.2.9}/pyproject.toml +1 -1
- {ffdata-0.2.8 → ffdata-0.2.9}/src/ffdata/__init__.py +12 -0
- {ffdata-0.2.8 → ffdata-0.2.9}/src/ffdata/client.py +63 -1
- {ffdata-0.2.8 → ffdata-0.2.9}/src/ffdata.egg-info/PKG-INFO +1 -1
- {ffdata-0.2.8 → ffdata-0.2.9}/README.md +0 -0
- {ffdata-0.2.8 → ffdata-0.2.9}/scripts/configure_ffdata.sh +0 -0
- {ffdata-0.2.8 → ffdata-0.2.9}/setup.cfg +0 -0
- {ffdata-0.2.8 → ffdata-0.2.9}/src/ffdata/cli.py +0 -0
- {ffdata-0.2.8 → ffdata-0.2.9}/src/ffdata/datasets/__init__.py +0 -0
- {ffdata-0.2.8 → ffdata-0.2.9}/src/ffdata/datasets/manager.py +0 -0
- {ffdata-0.2.8 → ffdata-0.2.9}/src/ffdata/local/__init__.py +0 -0
- {ffdata-0.2.8 → ffdata-0.2.9}/src/ffdata/local/store.py +0 -0
- {ffdata-0.2.8 → ffdata-0.2.9}/src/ffdata/transport/__init__.py +0 -0
- {ffdata-0.2.8 → ffdata-0.2.9}/src/ffdata/transport/http.py +0 -0
- {ffdata-0.2.8 → ffdata-0.2.9}/src/ffdata.egg-info/SOURCES.txt +0 -0
- {ffdata-0.2.8 → ffdata-0.2.9}/src/ffdata.egg-info/dependency_links.txt +0 -0
- {ffdata-0.2.8 → ffdata-0.2.9}/src/ffdata.egg-info/entry_points.txt +0 -0
- {ffdata-0.2.8 → ffdata-0.2.9}/src/ffdata.egg-info/requires.txt +0 -0
- {ffdata-0.2.8 → ffdata-0.2.9}/src/ffdata.egg-info/top_level.txt +0 -0
- {ffdata-0.2.8 → ffdata-0.2.9}/src/ffdata_common/__init__.py +0 -0
- {ffdata-0.2.8 → ffdata-0.2.9}/src/ffdata_common/codecs/__init__.py +0 -0
- {ffdata-0.2.8 → ffdata-0.2.9}/src/ffdata_common/codecs/arrow.py +0 -0
- {ffdata-0.2.8 → ffdata-0.2.9}/src/ffdata_common/errors.py +0 -0
- {ffdata-0.2.8 → ffdata-0.2.9}/src/ffdata_common/protocol.py +0 -0
- {ffdata-0.2.8 → ffdata-0.2.9}/src/ffdata_common/schemas/__init__.py +0 -0
- {ffdata-0.2.8 → ffdata-0.2.9}/src/ffdata_common/schemas/manifest.py +0 -0
|
@@ -165,6 +165,16 @@ def macro_indicator_data(*args: Any, **kwargs: Any):
|
|
|
165
165
|
return _client().macro_indicator_data(*args, **kwargs)
|
|
166
166
|
|
|
167
167
|
|
|
168
|
+
def intl_macro_indicator_basic(*args: Any, **kwargs: Any):
|
|
169
|
+
"""通过默认客户端查询国际宏观指标基本信息(国家/口径/频率/单位随行返回)。"""
|
|
170
|
+
return _client().intl_macro_indicator_basic(*args, **kwargs)
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
def intl_macro_indicator_data(*args: Any, **kwargs: Any):
|
|
174
|
+
"""通过默认客户端查询国际宏观指标时间序列(含预测值标识)。"""
|
|
175
|
+
return _client().intl_macro_indicator_data(*args, **kwargs)
|
|
176
|
+
|
|
177
|
+
|
|
168
178
|
def trade_cal(*args: Any, **kwargs: Any):
|
|
169
179
|
"""通过默认客户端查询交易日历(8 列,支持沪深/北交所/港股/美股/银行间)。"""
|
|
170
180
|
return _client().trade_cal(*args, **kwargs)
|
|
@@ -196,6 +206,8 @@ __all__ = [
|
|
|
196
206
|
"index_valuation",
|
|
197
207
|
"index_weight",
|
|
198
208
|
"index_industry",
|
|
209
|
+
"intl_macro_indicator_basic",
|
|
210
|
+
"intl_macro_indicator_data",
|
|
199
211
|
"macro_indicator_basic",
|
|
200
212
|
"macro_indicator_data",
|
|
201
213
|
"query",
|
|
@@ -358,10 +358,23 @@ class Client:
|
|
|
358
358
|
*,
|
|
359
359
|
indicator_code: int | list[int] | None = None,
|
|
360
360
|
name: str | None = None,
|
|
361
|
+
state: str = "active",
|
|
362
|
+
limit: int = 20,
|
|
361
363
|
fields: list[str] | None = None,
|
|
362
364
|
) -> pd.DataFrame:
|
|
365
|
+
"""查询宏观指标基本信息(名称 → 指标代码)。
|
|
366
|
+
|
|
367
|
+
``name`` 走全库名称检索(支持空格分词),``state`` 默认 ``active`` 只返回有效
|
|
368
|
+
指标(``all`` 含已终止指标),``limit`` 默认 20、最大 200。返回的
|
|
369
|
+
``indicator_code`` 可直接用于 :meth:`macro_indicator_data`。
|
|
370
|
+
"""
|
|
363
371
|
return self.query(
|
|
364
|
-
"macro_indicator_basic",
|
|
372
|
+
"macro_indicator_basic",
|
|
373
|
+
indicator_code=indicator_code,
|
|
374
|
+
name=name,
|
|
375
|
+
state=state,
|
|
376
|
+
limit=limit,
|
|
377
|
+
fields=fields,
|
|
365
378
|
)
|
|
366
379
|
|
|
367
380
|
def macro_indicator_data(
|
|
@@ -380,6 +393,55 @@ class Client:
|
|
|
380
393
|
fields=fields,
|
|
381
394
|
)
|
|
382
395
|
|
|
396
|
+
def intl_macro_indicator_basic(
|
|
397
|
+
self,
|
|
398
|
+
*,
|
|
399
|
+
name: str | None = None,
|
|
400
|
+
indicator_code: int | list[int] | None = None,
|
|
401
|
+
region: str | list[str] | None = None,
|
|
402
|
+
state: str = "active",
|
|
403
|
+
limit: int = 20,
|
|
404
|
+
fields: list[str] | None = None,
|
|
405
|
+
) -> pd.DataFrame:
|
|
406
|
+
"""查询国际宏观指标基本信息(名称/地区 → 指标代码)。
|
|
407
|
+
|
|
408
|
+
``name`` 同时匹配中文名与英文名(支持空格分词),``region`` 按国家/地区名称
|
|
409
|
+
精确筛选;``state`` 默认 ``active`` 只返回有效指标(``all`` 含已终止指标),
|
|
410
|
+
``limit`` 默认 20、最大 200。返回的 ``indicator_code`` 可直接用于
|
|
411
|
+
:meth:`intl_macro_indicator_data`。
|
|
412
|
+
"""
|
|
413
|
+
return self.query(
|
|
414
|
+
"intl_macro_indicator_basic",
|
|
415
|
+
indicator_code=indicator_code,
|
|
416
|
+
name=name,
|
|
417
|
+
region=region,
|
|
418
|
+
state=state,
|
|
419
|
+
limit=limit,
|
|
420
|
+
fields=fields,
|
|
421
|
+
)
|
|
422
|
+
|
|
423
|
+
def intl_macro_indicator_data(
|
|
424
|
+
self,
|
|
425
|
+
indicator_code: int | list[int],
|
|
426
|
+
*,
|
|
427
|
+
start_date: Any = None,
|
|
428
|
+
end_date: Any = None,
|
|
429
|
+
fields: list[str] | None = None,
|
|
430
|
+
) -> pd.DataFrame:
|
|
431
|
+
"""查询国际宏观指标时间序列(指标代码 → 指标数据)。
|
|
432
|
+
|
|
433
|
+
``indicator_code`` 取自 :meth:`intl_macro_indicator_basic`;``start_date`` /
|
|
434
|
+
``end_date`` 可只给一端,都不给表示返回全部可用数据。返回行含单位/频率与
|
|
435
|
+
``data_disclosure_type``(``2401`` 表示预测值,空表示实际值),数值不做换算。
|
|
436
|
+
"""
|
|
437
|
+
return self.query(
|
|
438
|
+
"intl_macro_indicator_data",
|
|
439
|
+
indicator_code=indicator_code,
|
|
440
|
+
start_date=start_date,
|
|
441
|
+
end_date=end_date,
|
|
442
|
+
fields=fields,
|
|
443
|
+
)
|
|
444
|
+
|
|
383
445
|
def stock_basic(
|
|
384
446
|
self,
|
|
385
447
|
*,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|