searchapi-haystack 1.0.0__tar.gz → 2.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.
- searchapi_haystack-2.0.0/CHANGELOG.md +9 -0
- {searchapi_haystack-1.0.0 → searchapi_haystack-2.0.0}/PKG-INFO +5 -4
- {searchapi_haystack-1.0.0 → searchapi_haystack-2.0.0}/README.md +1 -0
- {searchapi_haystack-1.0.0 → searchapi_haystack-2.0.0}/pyproject.toml +3 -2
- {searchapi_haystack-1.0.0 → searchapi_haystack-2.0.0}/src/haystack_integrations/components/websearch/searchapi/websearch.py +2 -15
- {searchapi_haystack-1.0.0 → searchapi_haystack-2.0.0}/tests/test_websearch.py +2 -1
- {searchapi_haystack-1.0.0 → searchapi_haystack-2.0.0}/.gitignore +0 -0
- {searchapi_haystack-1.0.0 → searchapi_haystack-2.0.0}/LICENSE.txt +0 -0
- {searchapi_haystack-1.0.0 → searchapi_haystack-2.0.0}/pydoc/config_docusaurus.yml +0 -0
- {searchapi_haystack-1.0.0 → searchapi_haystack-2.0.0}/src/haystack_integrations/components/websearch/py.typed +0 -0
- {searchapi_haystack-1.0.0 → searchapi_haystack-2.0.0}/src/haystack_integrations/components/websearch/searchapi/__init__.py +0 -0
- {searchapi_haystack-1.0.0 → searchapi_haystack-2.0.0}/tests/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: searchapi-haystack
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: Haystack integration for SearchApi Web Search
|
|
5
5
|
Project-URL: Documentation, https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/searchapi#readme
|
|
6
6
|
Project-URL: Issues, https://github.com/deepset-ai/haystack-core-integrations/issues
|
|
@@ -12,14 +12,14 @@ Keywords: AI Search,Haystack,SearchApi,Web Search
|
|
|
12
12
|
Classifier: Development Status :: 4 - Beta
|
|
13
13
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
14
14
|
Classifier: Programming Language :: Python
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.13
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
20
20
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
21
21
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
22
|
-
Requires-Python: >=3.
|
|
22
|
+
Requires-Python: >=3.11
|
|
23
23
|
Requires-Dist: haystack-ai>=2.24.1
|
|
24
24
|
Requires-Dist: httpx>=0.27.0
|
|
25
25
|
Description-Content-Type: text/markdown
|
|
@@ -29,6 +29,7 @@ Description-Content-Type: text/markdown
|
|
|
29
29
|
[](https://pypi.org/project/searchapi-haystack)
|
|
30
30
|
[](https://pypi.org/project/searchapi-haystack)
|
|
31
31
|
|
|
32
|
+
- [Integration page](https://haystack.deepset.ai/integrations/searchapi)
|
|
32
33
|
- [Changelog](https://github.com/deepset-ai/haystack-core-integrations/blob/main/integrations/searchapi/CHANGELOG.md)
|
|
33
34
|
|
|
34
35
|
---
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
[](https://pypi.org/project/searchapi-haystack)
|
|
4
4
|
[](https://pypi.org/project/searchapi-haystack)
|
|
5
5
|
|
|
6
|
+
- [Integration page](https://haystack.deepset.ai/integrations/searchapi)
|
|
6
7
|
- [Changelog](https://github.com/deepset-ai/haystack-core-integrations/blob/main/integrations/searchapi/CHANGELOG.md)
|
|
7
8
|
|
|
8
9
|
---
|
|
@@ -7,7 +7,7 @@ name = "searchapi-haystack"
|
|
|
7
7
|
dynamic = ["version"]
|
|
8
8
|
description = "Haystack integration for SearchApi Web Search"
|
|
9
9
|
readme = "README.md"
|
|
10
|
-
requires-python = ">=3.
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
11
|
license = "Apache-2.0"
|
|
12
12
|
keywords = ["Haystack", "SearchApi", "Web Search", "AI Search"]
|
|
13
13
|
authors = [{ name = "deepset GmbH", email = "info@deepset.ai" }]
|
|
@@ -15,11 +15,11 @@ classifiers = [
|
|
|
15
15
|
"License :: OSI Approved :: Apache Software License",
|
|
16
16
|
"Development Status :: 4 - Beta",
|
|
17
17
|
"Programming Language :: Python",
|
|
18
|
-
"Programming Language :: Python :: 3.10",
|
|
19
18
|
"Programming Language :: Python :: 3.11",
|
|
20
19
|
"Programming Language :: Python :: 3.12",
|
|
21
20
|
"Programming Language :: Python :: 3.13",
|
|
22
21
|
"Programming Language :: Python :: 3.14",
|
|
22
|
+
"Programming Language :: Python :: 3.15",
|
|
23
23
|
"Programming Language :: Python :: Implementation :: CPython",
|
|
24
24
|
"Programming Language :: Python :: Implementation :: PyPy",
|
|
25
25
|
]
|
|
@@ -131,6 +131,7 @@ ignore = [
|
|
|
131
131
|
"PLR0912",
|
|
132
132
|
"PLR0913",
|
|
133
133
|
"PLR0915",
|
|
134
|
+
"PLR0917",
|
|
134
135
|
# Allow `Any` type - used legitimately for dynamic types and SDK boundaries
|
|
135
136
|
"ANN401",
|
|
136
137
|
]
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
from typing import Any
|
|
6
6
|
|
|
7
7
|
import httpx
|
|
8
|
-
from haystack import ComponentError, Document, component,
|
|
9
|
-
from haystack.utils import Secret
|
|
8
|
+
from haystack import ComponentError, Document, component, default_to_dict, logging
|
|
9
|
+
from haystack.utils import Secret
|
|
10
10
|
|
|
11
11
|
logger = logging.getLogger(__name__)
|
|
12
12
|
|
|
@@ -82,19 +82,6 @@ class SearchApiWebSearch:
|
|
|
82
82
|
api_key=self.api_key.to_dict(),
|
|
83
83
|
)
|
|
84
84
|
|
|
85
|
-
@classmethod
|
|
86
|
-
def from_dict(cls, data: dict[str, Any]) -> "SearchApiWebSearch":
|
|
87
|
-
"""
|
|
88
|
-
Deserializes the component from a dictionary.
|
|
89
|
-
|
|
90
|
-
:param data:
|
|
91
|
-
The dictionary to deserialize from.
|
|
92
|
-
:returns:
|
|
93
|
-
The deserialized component.
|
|
94
|
-
"""
|
|
95
|
-
deserialize_secrets_inplace(data["init_parameters"], keys=["api_key"])
|
|
96
|
-
return default_from_dict(cls, data)
|
|
97
|
-
|
|
98
85
|
@component.output_types(documents=list[Document], links=list[str])
|
|
99
86
|
def run(self, query: str) -> dict[str, list[Document] | list[str]]:
|
|
100
87
|
"""
|
|
@@ -8,6 +8,7 @@ from unittest.mock import AsyncMock, MagicMock, Mock, patch
|
|
|
8
8
|
|
|
9
9
|
import pytest
|
|
10
10
|
from haystack import Document
|
|
11
|
+
from haystack.core.serialization import component_from_dict
|
|
11
12
|
from haystack.utils.auth import Secret
|
|
12
13
|
from httpx import ConnectTimeout, HTTPStatusError, Request, RequestError, Response
|
|
13
14
|
|
|
@@ -430,7 +431,7 @@ class TestSearchApiSearchAPI:
|
|
|
430
431
|
"search_params": {"param": "test params", "engine": "google"},
|
|
431
432
|
},
|
|
432
433
|
}
|
|
433
|
-
component = SearchApiWebSearch
|
|
434
|
+
component = component_from_dict(SearchApiWebSearch, data, name="component")
|
|
434
435
|
assert component.api_key == Secret.from_env_var("SEARCHAPI_API_KEY")
|
|
435
436
|
assert component.top_k == 10
|
|
436
437
|
assert component.allowed_domains == ["testdomain.com"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|