dataify-sdk 0.1.0__tar.gz → 1.0.0__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 (131) hide show
  1. {dataify_sdk-0.1.0 → dataify_sdk-1.0.0}/.gitignore +33 -32
  2. {dataify_sdk-0.1.0 → dataify_sdk-1.0.0}/LICENSE +21 -21
  3. dataify_sdk-1.0.0/PKG-INFO +107 -0
  4. dataify_sdk-1.0.0/README.md +82 -0
  5. {dataify_sdk-0.1.0 → dataify_sdk-1.0.0}/pyproject.toml +48 -66
  6. dataify_sdk-1.0.0/scripts/codegen.py +25 -0
  7. dataify_sdk-1.0.0/src/dataify_sdk/__init__.py +37 -0
  8. dataify_sdk-1.0.0/src/dataify_sdk/_codegen/__init__.py +5 -0
  9. dataify_sdk-1.0.0/src/dataify_sdk/_codegen/generate.py +779 -0
  10. dataify_sdk-1.0.0/src/dataify_sdk/client.py +178 -0
  11. dataify_sdk-1.0.0/src/dataify_sdk/errors.py +39 -0
  12. dataify_sdk-1.0.0/src/dataify_sdk/tools/__init__.py +190 -0
  13. dataify_sdk-1.0.0/src/dataify_sdk/tools/airbnbproduct.py +43 -0
  14. dataify_sdk-1.0.0/src/dataify_sdk/tools/amazoncomment.py +41 -0
  15. dataify_sdk-1.0.0/src/dataify_sdk/tools/amazonglobalproduct.py +134 -0
  16. dataify_sdk-1.0.0/src/dataify_sdk/tools/amazonproduct.py +157 -0
  17. dataify_sdk-1.0.0/src/dataify_sdk/tools/amazonproductlist.py +45 -0
  18. dataify_sdk-1.0.0/src/dataify_sdk/tools/amazonseller.py +41 -0
  19. dataify_sdk-1.0.0/src/dataify_sdk/tools/bingimages.py +59 -0
  20. dataify_sdk-1.0.0/src/dataify_sdk/tools/bingmaps.py +47 -0
  21. dataify_sdk-1.0.0/src/dataify_sdk/tools/bingnews.py +49 -0
  22. dataify_sdk-1.0.0/src/dataify_sdk/tools/bingsearch.py +53 -0
  23. dataify_sdk-1.0.0/src/dataify_sdk/tools/bingshopping.py +45 -0
  24. dataify_sdk-1.0.0/src/dataify_sdk/tools/bingvideos.py +55 -0
  25. dataify_sdk-1.0.0/src/dataify_sdk/tools/bookinghotellist.py +41 -0
  26. dataify_sdk-1.0.0/src/dataify_sdk/tools/crunchbasecompany.py +66 -0
  27. dataify_sdk-1.0.0/src/dataify_sdk/tools/duckduckgosearch.py +49 -0
  28. dataify_sdk-1.0.0/src/dataify_sdk/tools/ebayinfo.py +122 -0
  29. dataify_sdk-1.0.0/src/dataify_sdk/tools/facebookcomment.py +47 -0
  30. dataify_sdk-1.0.0/src/dataify_sdk/tools/facebookevent.py +66 -0
  31. dataify_sdk-1.0.0/src/dataify_sdk/tools/facebookpost.py +41 -0
  32. dataify_sdk-1.0.0/src/dataify_sdk/tools/facebookprofile.py +41 -0
  33. dataify_sdk-1.0.0/src/dataify_sdk/tools/githubrepository.py +95 -0
  34. dataify_sdk-1.0.0/src/dataify_sdk/tools/glassdoorcompany.py +124 -0
  35. dataify_sdk-1.0.0/src/dataify_sdk/tools/glassdoorjoblistings.py +95 -0
  36. dataify_sdk-1.0.0/src/dataify_sdk/tools/googleaimode.py +45 -0
  37. dataify_sdk-1.0.0/src/dataify_sdk/tools/googlefinance.py +41 -0
  38. dataify_sdk-1.0.0/src/dataify_sdk/tools/googleflights.py +95 -0
  39. dataify_sdk-1.0.0/src/dataify_sdk/tools/googlehotels.py +85 -0
  40. dataify_sdk-1.0.0/src/dataify_sdk/tools/googleimages.py +87 -0
  41. dataify_sdk-1.0.0/src/dataify_sdk/tools/googlejobs.py +57 -0
  42. dataify_sdk-1.0.0/src/dataify_sdk/tools/googlelens.py +47 -0
  43. dataify_sdk-1.0.0/src/dataify_sdk/tools/googlelocal.py +53 -0
  44. dataify_sdk-1.0.0/src/dataify_sdk/tools/googlemapcomment.py +43 -0
  45. dataify_sdk-1.0.0/src/dataify_sdk/tools/googlemapdetails.py +124 -0
  46. dataify_sdk-1.0.0/src/dataify_sdk/tools/googlemaps.py +67 -0
  47. dataify_sdk-1.0.0/src/dataify_sdk/tools/googlenews.py +53 -0
  48. dataify_sdk-1.0.0/src/dataify_sdk/tools/googlepatents.py +69 -0
  49. dataify_sdk-1.0.0/src/dataify_sdk/tools/googleplay.py +55 -0
  50. dataify_sdk-1.0.0/src/dataify_sdk/tools/googleplaystoreinformation.py +41 -0
  51. dataify_sdk-1.0.0/src/dataify_sdk/tools/googleplaystorereviews.py +41 -0
  52. dataify_sdk-1.0.0/src/dataify_sdk/tools/googlescholar.py +65 -0
  53. dataify_sdk-1.0.0/src/dataify_sdk/tools/googlesearch.py +67 -0
  54. dataify_sdk-1.0.0/src/dataify_sdk/tools/googleshopping.py +63 -0
  55. dataify_sdk-1.0.0/src/dataify_sdk/tools/googleshoppinginfo.py +41 -0
  56. dataify_sdk-1.0.0/src/dataify_sdk/tools/googletrends.py +57 -0
  57. dataify_sdk-1.0.0/src/dataify_sdk/tools/googlevideos.py +59 -0
  58. dataify_sdk-1.0.0/src/dataify_sdk/tools/indeedcompaniesinfo.py +118 -0
  59. dataify_sdk-1.0.0/src/dataify_sdk/tools/indeedjoblistings.py +41 -0
  60. dataify_sdk-1.0.0/src/dataify_sdk/tools/instagramcomment.py +41 -0
  61. dataify_sdk-1.0.0/src/dataify_sdk/tools/instagramprofiles.py +66 -0
  62. dataify_sdk-1.0.0/src/dataify_sdk/tools/instagramreel.py +87 -0
  63. dataify_sdk-1.0.0/src/dataify_sdk/tools/linkedincompanyinformation.py +41 -0
  64. dataify_sdk-1.0.0/src/dataify_sdk/tools/linkedinjoblistingsinformation.py +93 -0
  65. dataify_sdk-1.0.0/src/dataify_sdk/tools/redditcomment.py +45 -0
  66. dataify_sdk-1.0.0/src/dataify_sdk/tools/redditposts.py +99 -0
  67. dataify_sdk-1.0.0/src/dataify_sdk/tools/tiktokcomment.py +43 -0
  68. dataify_sdk-1.0.0/src/dataify_sdk/tools/tiktokposts.py +41 -0
  69. dataify_sdk-1.0.0/src/dataify_sdk/tools/tiktokprofiles.py +72 -0
  70. dataify_sdk-1.0.0/src/dataify_sdk/tools/tiktokshop.py +41 -0
  71. dataify_sdk-1.0.0/src/dataify_sdk/tools/twitterpost.py +41 -0
  72. dataify_sdk-1.0.0/src/dataify_sdk/tools/twitterprofile.py +66 -0
  73. dataify_sdk-1.0.0/src/dataify_sdk/tools/walmartproduct.py +130 -0
  74. dataify_sdk-1.0.0/src/dataify_sdk/tools/yandexsearch.py +51 -0
  75. dataify_sdk-1.0.0/src/dataify_sdk/tools/youtubeaudio.py +41 -0
  76. dataify_sdk-1.0.0/src/dataify_sdk/tools/youtubecomment.py +47 -0
  77. dataify_sdk-1.0.0/src/dataify_sdk/tools/youtubeproduct.py +41 -0
  78. dataify_sdk-1.0.0/src/dataify_sdk/tools/youtubeprofiles.py +68 -0
  79. dataify_sdk-1.0.0/src/dataify_sdk/tools/youtubetranscript.py +41 -0
  80. dataify_sdk-1.0.0/src/dataify_sdk/tools/youtubevideo.py +41 -0
  81. dataify_sdk-1.0.0/src/dataify_sdk/tools/youtubevideopost.py +190 -0
  82. dataify_sdk-1.0.0/src/dataify_sdk/tools/zillowproduct.py +49 -0
  83. dataify_sdk-1.0.0/tests/conftest.py +59 -0
  84. dataify_sdk-1.0.0/tests/test_client/test_http_client.py +64 -0
  85. dataify_sdk-1.0.0/tests/test_tools/test_codegen.py +44 -0
  86. dataify_sdk-1.0.0/tests/test_tools/test_tool_modules.py +70 -0
  87. dataify_sdk-0.1.0/PKG-INFO +0 -154
  88. dataify_sdk-0.1.0/README.md +0 -121
  89. dataify_sdk-0.1.0/docs/examples/basic_usage.py +0 -97
  90. dataify_sdk-0.1.0/scripts/codegen.py +0 -121
  91. dataify_sdk-0.1.0/src/dataify_mcp/__init__.py +0 -37
  92. dataify_sdk-0.1.0/src/dataify_mcp/_codegen/__init__.py +0 -14
  93. dataify_sdk-0.1.0/src/dataify_mcp/_codegen/_generate.py +0 -353
  94. dataify_sdk-0.1.0/src/dataify_mcp/_codegen/_introspect.py +0 -112
  95. dataify_sdk-0.1.0/src/dataify_mcp/_version.py +0 -3
  96. dataify_sdk-0.1.0/src/dataify_mcp/client/__init__.py +0 -7
  97. dataify_sdk-0.1.0/src/dataify_mcp/client/_base.py +0 -223
  98. dataify_sdk-0.1.0/src/dataify_mcp/client/_http.py +0 -205
  99. dataify_sdk-0.1.0/src/dataify_mcp/client/_protocol.py +0 -204
  100. dataify_sdk-0.1.0/src/dataify_mcp/client/_sse.py +0 -319
  101. dataify_sdk-0.1.0/src/dataify_mcp/tools/__init__.py +0 -90
  102. dataify_sdk-0.1.0/src/dataify_mcp/tools/amazon.py +0 -137
  103. dataify_sdk-0.1.0/src/dataify_mcp/tools/bing.py +0 -141
  104. dataify_sdk-0.1.0/src/dataify_mcp/tools/facebook.py +0 -63
  105. dataify_sdk-0.1.0/src/dataify_mcp/tools/glassdoor.py +0 -41
  106. dataify_sdk-0.1.0/src/dataify_mcp/tools/google_scraper.py +0 -121
  107. dataify_sdk-0.1.0/src/dataify_mcp/tools/google_serp.py +0 -320
  108. dataify_sdk-0.1.0/src/dataify_mcp/tools/indeed.py +0 -41
  109. dataify_sdk-0.1.0/src/dataify_mcp/tools/instagram.py +0 -52
  110. dataify_sdk-0.1.0/src/dataify_mcp/tools/linkedin.py +0 -41
  111. dataify_sdk-0.1.0/src/dataify_mcp/tools/other_scrapers.py +0 -137
  112. dataify_sdk-0.1.0/src/dataify_mcp/tools/other_search.py +0 -90
  113. dataify_sdk-0.1.0/src/dataify_mcp/tools/reddit.py +0 -41
  114. dataify_sdk-0.1.0/src/dataify_mcp/tools/task_status.py +0 -188
  115. dataify_sdk-0.1.0/src/dataify_mcp/tools/tiktok.py +0 -81
  116. dataify_sdk-0.1.0/src/dataify_mcp/tools/twitter.py +0 -41
  117. dataify_sdk-0.1.0/src/dataify_mcp/tools/user.py +0 -79
  118. dataify_sdk-0.1.0/src/dataify_mcp/tools/web_unlocker.py +0 -53
  119. dataify_sdk-0.1.0/src/dataify_mcp/tools/youtube.py +0 -163
  120. dataify_sdk-0.1.0/src/dataify_mcp/types/__init__.py +0 -39
  121. dataify_sdk-0.1.0/src/dataify_mcp/types/_enums.py +0 -220
  122. dataify_sdk-0.1.0/src/dataify_mcp/types/_errors.py +0 -73
  123. dataify_sdk-0.1.0/src/dataify_mcp/types/_mcp.py +0 -89
  124. dataify_sdk-0.1.0/tests/conftest.py +0 -123
  125. dataify_sdk-0.1.0/tests/test_client/test_http_client.py +0 -136
  126. dataify_sdk-0.1.0/tests/test_tools/__init__.py +0 -0
  127. dataify_sdk-0.1.0/tests/test_tools/test_codegen.py +0 -174
  128. dataify_sdk-0.1.0/tests/test_tools/test_tool_modules.py +0 -203
  129. {dataify_sdk-0.1.0/src/dataify_mcp/_codegen/_templates → dataify_sdk-1.0.0/tests}/__init__.py +0 -0
  130. {dataify_sdk-0.1.0/tests → dataify_sdk-1.0.0/tests/test_client}/__init__.py +0 -0
  131. {dataify_sdk-0.1.0/tests/test_client → dataify_sdk-1.0.0/tests/test_tools}/__init__.py +0 -0
@@ -1,32 +1,33 @@
1
- # Python
2
- __pycache__/
3
- *.py[cod]
4
- *.egg-info/
5
- dist/
6
- build/
7
- *.egg
8
-
9
- # Virtual environments
10
- .venv/
11
- venv/
12
-
13
- # IDE
14
- .idea/
15
- .vscode/
16
- *.swp
17
- *.swo
18
-
19
- # Testing
20
- .pytest_cache/
21
- .coverage
22
- htmlcov/
23
-
24
- # Mypy
25
- .mypy_cache/
26
-
27
- # OS
28
- .DS_Store
29
- Thumbs.db
30
-
31
- # Code generation artifacts
32
- tool_manifest.json
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ dist/
6
+ build/
7
+ *.egg
8
+
9
+ # Virtual environments
10
+ .venv/
11
+ venv/
12
+
13
+ # IDE
14
+ .idea/
15
+ .vscode/
16
+ *.swp
17
+ *.swo
18
+
19
+ # Testing
20
+ .pytest_cache/
21
+ .coverage
22
+ htmlcov/
23
+
24
+ # Mypy
25
+ .mypy_cache/
26
+ .workbuddy/
27
+ docs/
28
+ # OS
29
+ .DS_Store
30
+ Thumbs.db
31
+
32
+ # Code generation artifacts
33
+ tool_manifest.json
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 dataify-server
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Dataify
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,107 @@
1
+ Metadata-Version: 2.4
2
+ Name: dataify-sdk
3
+ Version: 1.0.0
4
+ Summary: Python SDK that calls the Dataify upstream REST API directly (no MCP layer) — web scrapers and search engines.
5
+ Project-URL: Homepage, https://dashboard.dataify.com
6
+ Project-URL: Repository, https://github.com/dataify/dataify-sdk
7
+ Author-email: Dataify <support@dataify.com>
8
+ License: MIT
9
+ License-File: LICENSE
10
+ Keywords: amazon,dataify,google-search,scraper,serp,tiktok,web-scraper
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Internet :: WWW/HTTP
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Requires-Python: >=3.10
22
+ Provides-Extra: dev
23
+ Requires-Dist: pytest>=8.0.0; extra == 'dev'
24
+ Description-Content-Type: text/markdown
25
+
26
+ # Dataify Python SDK
27
+
28
+ Python 客户端库,**直接调用** [Dataify](https://dashboard.dataify.com) 上游 REST 接口(**不走 MCP 协议**),用于网页采集与搜索引擎抓取。
29
+
30
+
31
+ ## 功能
32
+
33
+ - 🔍 **搜索引擎** — Google(17 种)、Bing(6 种)、Yandex、DuckDuckGo,走 `POST /request`
34
+ - 🛒 **平台抓取器** — Amazon、YouTube、TikTok、Facebook、Instagram、Reddit、Twitter/X、LinkedIn、Glassdoor、Indeed、Walmart、Zillow、Airbnb、Booking、Crunchbase、eBay、GitHub 等 45 个采集器,走 `POST /builder?platform=1`
35
+ - 📖 **参数全暴露** — 每个工具函数把上游请求参数、类型、是否必填、中文描述都写在签名与 docstring 里;另见 `docs/api_reference.md`
36
+ - 🐍 **零依赖** — 仅用标准库 `urllib`,同步 API
37
+
38
+ ## 安装
39
+
40
+ ```bash
41
+ pip install dataify-sdk
42
+ ```
43
+
44
+ 要求 Python >= 3.10。
45
+
46
+ ## 快速开始
47
+
48
+ ```python
49
+ from dataify_sdk import DataifyClient
50
+ from dataify_sdk.tools.amazonproduct import amazon_product_by_asin
51
+ from dataify_sdk.tools.googlesearch import google_search
52
+
53
+ # token 也可通过环境变量 DATAIFY_TOKEN 提供
54
+ client = DataifyClient(token="YOUR_TOKEN")
55
+
56
+ # 采集类:直接提交 Builder 任务
57
+ result = amazon_product_by_asin(asin="B0BZYCJK89", client=client)
58
+
59
+ # 搜索类:直接打搜索引擎接口
60
+ result = google_search(q="pizza", client=client)
61
+ ```
62
+
63
+ 也可以不传 `client`,使用默认 client(读取 `DATAIFY_TOKEN` 环境变量):
64
+
65
+ ```python
66
+ from dataify_sdk.tools.googlesearch import google_search
67
+
68
+ result = google_search(q="pizza")
69
+ ```
70
+
71
+ ## API 设计
72
+
73
+ - **每个 `spider_id` = 一个独立函数**(采集类),例如 `amazon_product_by_asin()`、`amazon_product_by_url()`、`amazon_product_by_keywords()`。
74
+ - **搜索类每个引擎一个函数**,例如 `google_search()`、`bing_search()`、`yandex_search()`。
75
+ - 所有函数签名与 docstring 完整暴露上游参数及其描述;`docs/api_reference.md` 为离线参数手册。
76
+ - 函数返回解析后的 JSON `dict`(即上游原始响应)。
77
+
78
+ ## 错误处理
79
+
80
+ ```python
81
+ from dataify_sdk import DataifyClient, DataifyAPIError, DataifyConnectionError
82
+
83
+ client = DataifyClient(token="YOUR_TOKEN")
84
+ try:
85
+ result = google_search(q="pizza", client=client)
86
+ except DataifyAPIError as e:
87
+ print(f"上游返回错误 HTTP {e.status_code}: {e.body}")
88
+ except DataifyConnectionError:
89
+ print("无法连接 Dataify 上游")
90
+ ```
91
+
92
+ ## 开发
93
+
94
+ ```bash
95
+ # 安装开发依赖
96
+ pip install -e ".[dev]"
97
+
98
+ # 运行测试
99
+ pytest
100
+
101
+ # 从 Go 参考项目重新生成工具函数与参数手册
102
+ python scripts/codegen.py
103
+ ```
104
+
105
+ ## 许可
106
+
107
+ MIT License
@@ -0,0 +1,82 @@
1
+ # Dataify Python SDK
2
+
3
+ Python 客户端库,**直接调用** [Dataify](https://dashboard.dataify.com) 上游 REST 接口(**不走 MCP 协议**),用于网页采集与搜索引擎抓取。
4
+
5
+
6
+ ## 功能
7
+
8
+ - 🔍 **搜索引擎** — Google(17 种)、Bing(6 种)、Yandex、DuckDuckGo,走 `POST /request`
9
+ - 🛒 **平台抓取器** — Amazon、YouTube、TikTok、Facebook、Instagram、Reddit、Twitter/X、LinkedIn、Glassdoor、Indeed、Walmart、Zillow、Airbnb、Booking、Crunchbase、eBay、GitHub 等 45 个采集器,走 `POST /builder?platform=1`
10
+ - 📖 **参数全暴露** — 每个工具函数把上游请求参数、类型、是否必填、中文描述都写在签名与 docstring 里;另见 `docs/api_reference.md`
11
+ - 🐍 **零依赖** — 仅用标准库 `urllib`,同步 API
12
+
13
+ ## 安装
14
+
15
+ ```bash
16
+ pip install dataify-sdk
17
+ ```
18
+
19
+ 要求 Python >= 3.10。
20
+
21
+ ## 快速开始
22
+
23
+ ```python
24
+ from dataify_sdk import DataifyClient
25
+ from dataify_sdk.tools.amazonproduct import amazon_product_by_asin
26
+ from dataify_sdk.tools.googlesearch import google_search
27
+
28
+ # token 也可通过环境变量 DATAIFY_TOKEN 提供
29
+ client = DataifyClient(token="YOUR_TOKEN")
30
+
31
+ # 采集类:直接提交 Builder 任务
32
+ result = amazon_product_by_asin(asin="B0BZYCJK89", client=client)
33
+
34
+ # 搜索类:直接打搜索引擎接口
35
+ result = google_search(q="pizza", client=client)
36
+ ```
37
+
38
+ 也可以不传 `client`,使用默认 client(读取 `DATAIFY_TOKEN` 环境变量):
39
+
40
+ ```python
41
+ from dataify_sdk.tools.googlesearch import google_search
42
+
43
+ result = google_search(q="pizza")
44
+ ```
45
+
46
+ ## API 设计
47
+
48
+ - **每个 `spider_id` = 一个独立函数**(采集类),例如 `amazon_product_by_asin()`、`amazon_product_by_url()`、`amazon_product_by_keywords()`。
49
+ - **搜索类每个引擎一个函数**,例如 `google_search()`、`bing_search()`、`yandex_search()`。
50
+ - 所有函数签名与 docstring 完整暴露上游参数及其描述;`docs/api_reference.md` 为离线参数手册。
51
+ - 函数返回解析后的 JSON `dict`(即上游原始响应)。
52
+
53
+ ## 错误处理
54
+
55
+ ```python
56
+ from dataify_sdk import DataifyClient, DataifyAPIError, DataifyConnectionError
57
+
58
+ client = DataifyClient(token="YOUR_TOKEN")
59
+ try:
60
+ result = google_search(q="pizza", client=client)
61
+ except DataifyAPIError as e:
62
+ print(f"上游返回错误 HTTP {e.status_code}: {e.body}")
63
+ except DataifyConnectionError:
64
+ print("无法连接 Dataify 上游")
65
+ ```
66
+
67
+ ## 开发
68
+
69
+ ```bash
70
+ # 安装开发依赖
71
+ pip install -e ".[dev]"
72
+
73
+ # 运行测试
74
+ pytest
75
+
76
+ # 从 Go 参考项目重新生成工具函数与参数手册
77
+ python scripts/codegen.py
78
+ ```
79
+
80
+ ## 许可
81
+
82
+ MIT License
@@ -1,66 +1,48 @@
1
- [build-system]
2
- requires = ["hatchling"]
3
- build-backend = "hatchling.build"
4
-
5
- [project]
6
- name = "dataify-sdk"
7
- version = "0.1.0"
8
- description = "Python SDK for the Dataify MCP API — access web unlocker, search engines, and platform scrapers."
9
- readme = "README.md"
10
- license = {text = "MIT"}
11
- requires-python = ">=3.10"
12
- authors = [{name = "Dataify", email = "support@dataify.com"}]
13
- keywords = ["mcp", "dataify", "serp", "scraper", "google-search", "web-unlocker"]
14
- classifiers = [
15
- "Development Status :: 4 - Beta",
16
- "Intended Audience :: Developers",
17
- "License :: OSI Approved :: MIT License",
18
- "Programming Language :: Python :: 3",
19
- "Programming Language :: Python :: 3.10",
20
- "Programming Language :: Python :: 3.11",
21
- "Programming Language :: Python :: 3.12",
22
- "Programming Language :: Python :: 3.13",
23
- "Topic :: Internet :: WWW/HTTP",
24
- "Topic :: Software Development :: Libraries :: Python Modules",
25
- ]
26
- dependencies = [
27
- "httpx>=0.28.0",
28
- "pydantic>=2.0.0",
29
- "typing-extensions>=4.0.0",
30
- ]
31
-
32
- [project.optional-dependencies]
33
- dev = [
34
- "pytest>=8.0.0",
35
- "pytest-asyncio>=0.24.0",
36
- "pytest-httpx>=0.30.0",
37
- "mypy>=1.0.0",
38
- "ruff>=0.6.0",
39
- "jinja2>=3.0.0",
40
- ]
41
-
42
- [project.urls]
43
- Homepage = "https://dashboard.dataify.com"
44
- Repository = "https://github.com/dataify/dataify-mcp-sdk"
45
-
46
- [tool.hatch.build.targets.wheel]
47
- packages = ["src/dataify_mcp"]
48
- exclude = ["src/dataify_mcp/_codegen"]
49
-
50
- [tool.ruff]
51
- line-length = 100
52
- target-version = "py310"
53
-
54
- [tool.ruff.lint]
55
- select = ["E", "F", "I", "N", "W", "UP"]
56
-
57
- [tool.mypy]
58
- strict = true
59
- python_version = "3.10"
60
-
61
- [tool.pytest.ini_options]
62
- asyncio_mode = "auto"
63
- testpaths = ["tests"]
64
- filterwarnings = [
65
- "ignore:Field name.*shadows an attribute in parent.*BaseModel:UserWarning",
66
- ]
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "dataify-sdk"
7
+ version = "1.0.0"
8
+ description = "Python SDK that calls the Dataify upstream REST API directly (no MCP layer) — web scrapers and search engines."
9
+ readme = "README.md"
10
+ license = {text = "MIT"}
11
+ requires-python = ">=3.10"
12
+ authors = [{name = "Dataify", email = "support@dataify.com"}]
13
+ keywords = ["dataify", "serp", "scraper", "google-search", "web-scraper", "amazon", "tiktok"]
14
+ classifiers = [
15
+ "Development Status :: 4 - Beta",
16
+ "Intended Audience :: Developers",
17
+ "License :: OSI Approved :: MIT License",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3.10",
20
+ "Programming Language :: Python :: 3.11",
21
+ "Programming Language :: Python :: 3.12",
22
+ "Programming Language :: Python :: 3.13",
23
+ "Topic :: Internet :: WWW/HTTP",
24
+ "Topic :: Software Development :: Libraries :: Python Modules",
25
+ ]
26
+ dependencies = []
27
+
28
+ [project.optional-dependencies]
29
+ dev = [
30
+ "pytest>=8.0.0",
31
+ ]
32
+
33
+ [project.urls]
34
+ Homepage = "https://dashboard.dataify.com"
35
+ Repository = "https://github.com/dataify/dataify-sdk"
36
+
37
+ [tool.hatch.build.targets.wheel]
38
+ packages = ["src/dataify_sdk"]
39
+
40
+ [tool.ruff]
41
+ line-length = 100
42
+ target-version = "py310"
43
+
44
+ [tool.ruff.lint]
45
+ select = ["E", "F", "I", "N", "W", "UP"]
46
+
47
+ [tool.pytest.ini_options]
48
+ testpaths = ["tests"]
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env python3
2
+ """Regenerate the Dataify SDK tool layer from the Go reference project.
3
+
4
+ The Go project at ``C:\\dataify\\dataify_mcp_api`` is the source of truth. This
5
+ script invokes the generator, which writes ``src/dataify_sdk/tools/*.py`` and
6
+ ``docs/api_reference.md``.
7
+
8
+ Usage::
9
+
10
+ python scripts/codegen.py
11
+ """
12
+
13
+ from __future__ import annotations
14
+
15
+ import sys
16
+ from pathlib import Path
17
+
18
+ _ROOT = Path(__file__).resolve().parent.parent
19
+ sys.path.insert(0, str(_ROOT / "src"))
20
+
21
+ from dataify_sdk._codegen.generate import main
22
+
23
+
24
+ if __name__ == "__main__":
25
+ raise SystemExit(main())
@@ -0,0 +1,37 @@
1
+ """Dataify SDK — a Python client that talks **directly** to the Dataify
2
+ upstream REST API (no MCP layer).
3
+
4
+ Typical usage::
5
+
6
+ from dataify_sdk import DataifyClient
7
+ from dataify_sdk.tools.amazonproduct import amazon_product_by_asin
8
+
9
+ client = DataifyClient(token="YOUR_TOKEN")
10
+ result = amazon_product_by_asin(asin="B0BZYCJK89", client=client)
11
+
12
+ or, using the default client (token from ``DATAIFY_TOKEN``)::
13
+
14
+ result = amazon_product_by_asin(asin="B0BZYCJK89")
15
+ """
16
+
17
+ from __future__ import annotations
18
+
19
+ from dataify_sdk.client import DataifyClient, get_default_client
20
+ from dataify_sdk.errors import (
21
+ DataifyAPIError,
22
+ DataifyConnectionError,
23
+ DataifyError,
24
+ DataifyTimeoutError,
25
+ )
26
+
27
+ __version__ = "1.0.0"
28
+
29
+ __all__ = [
30
+ "__version__",
31
+ "DataifyClient",
32
+ "get_default_client",
33
+ "DataifyError",
34
+ "DataifyAPIError",
35
+ "DataifyConnectionError",
36
+ "DataifyTimeoutError",
37
+ ]
@@ -0,0 +1,5 @@
1
+ """Code generation utilities for the Dataify SDK.
2
+
3
+ ``generate`` parses the Go reference project (``C:\\dataify\\dataify_mcp_api``)
4
+ and emits the ``dataify_sdk.tools`` modules plus ``docs/api_reference.md``.
5
+ """