finctx 0.3.2__tar.gz → 0.3.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.
- {finctx-0.3.2 → finctx-0.3.3}/PKG-INFO +10 -7
- {finctx-0.3.2 → finctx-0.3.3}/README.md +9 -6
- {finctx-0.3.2 → finctx-0.3.3}/src/finctx/_version.py +1 -1
- {finctx-0.3.2 → finctx-0.3.3}/src/finctx/data/endpoints.json +1 -1
- {finctx-0.3.2 → finctx-0.3.3}/src/finctx/generated/api.py +10 -1
- {finctx-0.3.2 → finctx-0.3.3}/tests/test_discovery.py +5 -5
- {finctx-0.3.2 → finctx-0.3.3}/tests/test_generated_api.py +1 -1
- finctx-0.3.3/tests/test_tracer_public_topics.py +108 -0
- {finctx-0.3.2 → finctx-0.3.3}/.gitignore +0 -0
- {finctx-0.3.2 → finctx-0.3.3}/LICENSE +0 -0
- {finctx-0.3.2 → finctx-0.3.3}/demo.py +0 -0
- {finctx-0.3.2 → finctx-0.3.3}/pyproject.toml +0 -0
- {finctx-0.3.2 → finctx-0.3.3}/src/finctx/__init__.py +0 -0
- {finctx-0.3.2 → finctx-0.3.3}/src/finctx/client.py +0 -0
- {finctx-0.3.2 → finctx-0.3.3}/src/finctx/credentials.py +0 -0
- {finctx-0.3.2 → finctx-0.3.3}/src/finctx/data/marketdb-datasets.json +0 -0
- {finctx-0.3.2 → finctx-0.3.3}/src/finctx/discovery.py +0 -0
- {finctx-0.3.2 → finctx-0.3.3}/src/finctx/exceptions.py +0 -0
- {finctx-0.3.2 → finctx-0.3.3}/src/finctx/generated/__init__.py +0 -0
- {finctx-0.3.2 → finctx-0.3.3}/src/finctx/marketdb.py +0 -0
- {finctx-0.3.2 → finctx-0.3.3}/src/finctx/py.typed +0 -0
- {finctx-0.3.2 → finctx-0.3.3}/src/finctx/results.py +0 -0
- {finctx-0.3.2 → finctx-0.3.3}/src/finctx/signing.py +0 -0
- {finctx-0.3.2 → finctx-0.3.3}/tests/test_api_distribution_generation.py +0 -0
- {finctx-0.3.2 → finctx-0.3.3}/tests/test_api_names.py +0 -0
- {finctx-0.3.2 → finctx-0.3.3}/tests/test_build_python_release.py +0 -0
- {finctx-0.3.2 → finctx-0.3.3}/tests/test_build_skill_release.py +0 -0
- {finctx-0.3.2 → finctx-0.3.3}/tests/test_client.py +0 -0
- {finctx-0.3.2 → finctx-0.3.3}/tests/test_convenience.py +0 -0
- {finctx-0.3.2 → finctx-0.3.3}/tests/test_import_api_catalog.py +0 -0
- {finctx-0.3.2 → finctx-0.3.3}/tests/test_marketdb.py +0 -0
- {finctx-0.3.2 → finctx-0.3.3}/tests/test_python39_compatibility.py +0 -0
- {finctx-0.3.2 → finctx-0.3.3}/tests/test_signing.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: finctx
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
4
4
|
Summary: Finctx SDK for the Finctx Data API
|
|
5
5
|
Project-URL: Homepage, https://www.ultrastiching.com
|
|
6
6
|
Author: Finctx
|
|
@@ -33,20 +33,20 @@ Description-Content-Type: text/markdown
|
|
|
33
33
|
需要 Python 3.9 或更高版本。安装下载的 SDK 包:
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
python -m pip install ./finctx-0.3.
|
|
36
|
+
python -m pip install ./finctx-0.3.3-py3-none-any.whl
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
也可以直接安装源码包:
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
|
-
python -m pip install ./finctx-0.3.
|
|
42
|
+
python -m pip install ./finctx-0.3.3.tar.gz
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
需要处理 Arrow 数据或使用本地数据库时,再安装相应扩展:
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
-
python -m pip install "finctx[arrow]==0.3.
|
|
49
|
-
python -m pip install "finctx[marketdb]==0.3.
|
|
48
|
+
python -m pip install "finctx[arrow]==0.3.3" # Arrow 数据转换
|
|
49
|
+
python -m pip install "finctx[marketdb]==0.3.3" # 本地数据库
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
## 2. 配置 API Key
|
|
@@ -120,16 +120,19 @@ with FinctxClient() as client:
|
|
|
120
120
|
feed = client.get_tracer_feed(limit=20)
|
|
121
121
|
print(feed["items"])
|
|
122
122
|
|
|
123
|
-
page = client.search_tracer_content(q="美债", scope="
|
|
123
|
+
page = client.search_tracer_content(q="美债", scope="global", limit=20)
|
|
124
124
|
print(page["items"])
|
|
125
125
|
|
|
126
|
+
public_topics = client.list_tracer_public_topics()
|
|
127
|
+
print(public_topics["items"]) # id、名称、描述、关注状态和主题状态
|
|
128
|
+
|
|
126
129
|
topics = client.list_tracer_topics()
|
|
127
130
|
print(topics)
|
|
128
131
|
```
|
|
129
132
|
|
|
130
133
|
资讯结果使用 `items`,直接读取,不调用 `rows()`。新闻搜索返回 `has_more=True` 时,下一页传入 `next_cursor`,并保留相同筛选条件及返回的时间范围;Python 参数 `from_`、`to` 分别使用 `window["from"]`、`window["to"]`。
|
|
131
134
|
|
|
132
|
-
主题创建使用 `create_tracer_topic(query=...)`;关注和取消关注使用 `follow_tracer_topic(id=...)`、`unfollow_tracer_topic(id=...)`,主题 ID
|
|
135
|
+
主题创建使用 `create_tracer_topic(query=...)`;关注和取消关注使用 `follow_tracer_topic(id=...)`、`unfollow_tracer_topic(id=...)`,主题 ID 从 `list_tracer_public_topics()` 返回的真实 `id` 取得;该列表无需先关注。普通关键词搜索使用 `scope="global"`,无需关注;`scope="following"` 只搜索自己的关注范围。创建回执表示任务已受理,不代表内容已生成完成。
|
|
133
136
|
|
|
134
137
|
## 订阅实时快讯
|
|
135
138
|
|
|
@@ -7,20 +7,20 @@
|
|
|
7
7
|
需要 Python 3.9 或更高版本。安装下载的 SDK 包:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
python -m pip install ./finctx-0.3.
|
|
10
|
+
python -m pip install ./finctx-0.3.3-py3-none-any.whl
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
也可以直接安装源码包:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
python -m pip install ./finctx-0.3.
|
|
16
|
+
python -m pip install ./finctx-0.3.3.tar.gz
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
需要处理 Arrow 数据或使用本地数据库时,再安装相应扩展:
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
python -m pip install "finctx[arrow]==0.3.
|
|
23
|
-
python -m pip install "finctx[marketdb]==0.3.
|
|
22
|
+
python -m pip install "finctx[arrow]==0.3.3" # Arrow 数据转换
|
|
23
|
+
python -m pip install "finctx[marketdb]==0.3.3" # 本地数据库
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
## 2. 配置 API Key
|
|
@@ -94,16 +94,19 @@ with FinctxClient() as client:
|
|
|
94
94
|
feed = client.get_tracer_feed(limit=20)
|
|
95
95
|
print(feed["items"])
|
|
96
96
|
|
|
97
|
-
page = client.search_tracer_content(q="美债", scope="
|
|
97
|
+
page = client.search_tracer_content(q="美债", scope="global", limit=20)
|
|
98
98
|
print(page["items"])
|
|
99
99
|
|
|
100
|
+
public_topics = client.list_tracer_public_topics()
|
|
101
|
+
print(public_topics["items"]) # id、名称、描述、关注状态和主题状态
|
|
102
|
+
|
|
100
103
|
topics = client.list_tracer_topics()
|
|
101
104
|
print(topics)
|
|
102
105
|
```
|
|
103
106
|
|
|
104
107
|
资讯结果使用 `items`,直接读取,不调用 `rows()`。新闻搜索返回 `has_more=True` 时,下一页传入 `next_cursor`,并保留相同筛选条件及返回的时间范围;Python 参数 `from_`、`to` 分别使用 `window["from"]`、`window["to"]`。
|
|
105
108
|
|
|
106
|
-
主题创建使用 `create_tracer_topic(query=...)`;关注和取消关注使用 `follow_tracer_topic(id=...)`、`unfollow_tracer_topic(id=...)`,主题 ID
|
|
109
|
+
主题创建使用 `create_tracer_topic(query=...)`;关注和取消关注使用 `follow_tracer_topic(id=...)`、`unfollow_tracer_topic(id=...)`,主题 ID 从 `list_tracer_public_topics()` 返回的真实 `id` 取得;该列表无需先关注。普通关键词搜索使用 `scope="global"`,无需关注;`scope="following"` 只搜索自己的关注范围。创建回执表示任务已受理,不代表内容已生成完成。
|
|
107
110
|
|
|
108
111
|
## 订阅实时快讯
|
|
109
112
|
|