searchly 2.0.2__tar.gz → 2.0.4__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.
- {searchly-2.0.2 → searchly-2.0.4}/PKG-INFO +1 -1
- {searchly-2.0.2 → searchly-2.0.4}/pyproject.toml +1 -1
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/config.py +68 -134
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/providers/brave_provider/client.py +3 -5
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/providers/dataforseo_provider/dataforseo.py +3 -5
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/providers/exa_provider/exa.py +9 -7
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/providers/jigsawstack_provider/jigsawstack.py +8 -6
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/providers/kagi_provider/client.py +3 -5
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/providers/linkup_provider/client.py +8 -6
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/providers/search1_provider/client.py +8 -6
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/providers/serper_provider/client.py +3 -5
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/providers/tavily_provider/client.py +4 -7
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/providers/you_provider/you.py +3 -5
- {searchly-2.0.2 → searchly-2.0.4}/LICENSE +0 -0
- {searchly-2.0.2 → searchly-2.0.4}/README.md +0 -0
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/__init__.py +0 -0
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/base.py +0 -0
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/exceptions.py +0 -0
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/log.py +0 -0
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/providers/__init__.py +0 -0
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/providers/brave_provider/__init__.py +0 -0
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/providers/dataforseo_provider/__init__.py +0 -0
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/providers/exa_provider/__init__.py +0 -0
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/providers/jigsawstack_provider/__init__.py +0 -0
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/providers/kagi_provider/__init__.py +0 -0
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/providers/linkup_provider/__init__.py +0 -0
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/providers/search1_provider/__init__.py +0 -0
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/providers/serpapi_provider/__init__.py +0 -0
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/providers/serpapi_provider/client.py +0 -0
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/providers/serper_provider/__init__.py +0 -0
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/providers/tavily_provider/__init__.py +0 -0
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/providers/you_provider/__init__.py +0 -0
- {searchly-2.0.2 → searchly-2.0.4}/src/searchly/py.typed +0 -0
|
@@ -5,11 +5,25 @@ from __future__ import annotations
|
|
|
5
5
|
import os
|
|
6
6
|
from typing import TYPE_CHECKING, Annotated, Literal
|
|
7
7
|
|
|
8
|
-
from pydantic import
|
|
8
|
+
from pydantic import Field, SecretStr
|
|
9
9
|
from schemez import Schema
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
if TYPE_CHECKING:
|
|
13
|
+
from searchly.base import NewsSearchProvider, WebSearchProvider
|
|
14
|
+
from searchly.providers.brave_provider.client import AsyncBraveSearch
|
|
15
|
+
from searchly.providers.dataforseo_provider.dataforseo import AsyncDataForSEOClient
|
|
16
|
+
from searchly.providers.exa_provider.exa import AsyncExaClient
|
|
17
|
+
from searchly.providers.jigsawstack_provider.jigsawstack import AsyncJigsawStackClient
|
|
18
|
+
from searchly.providers.kagi_provider.client import AsyncKagiClient
|
|
19
|
+
from searchly.providers.linkup_provider.client import AsyncLinkUpClient
|
|
20
|
+
from searchly.providers.search1_provider.client import AsyncSearch1API
|
|
21
|
+
from searchly.providers.serpapi_provider.client import AsyncSerpAPIClient
|
|
22
|
+
from searchly.providers.serper_provider.client import AsyncSerperClient
|
|
23
|
+
from searchly.providers.tavily_provider.client import AsyncTavilyClient
|
|
24
|
+
from searchly.providers.you_provider.you import AsyncYouClient
|
|
25
|
+
|
|
26
|
+
|
|
13
27
|
WebSearchProviderName = Literal[
|
|
14
28
|
"brave",
|
|
15
29
|
"dataforseo",
|
|
@@ -24,28 +38,7 @@ WebSearchProviderName = Literal[
|
|
|
24
38
|
"you",
|
|
25
39
|
]
|
|
26
40
|
|
|
27
|
-
NewsSearchProviderName = Literal[
|
|
28
|
-
"brave",
|
|
29
|
-
"dataforseo",
|
|
30
|
-
"serpapi",
|
|
31
|
-
"serper",
|
|
32
|
-
"tavily",
|
|
33
|
-
"you",
|
|
34
|
-
]
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
if TYPE_CHECKING:
|
|
38
|
-
from searchly.providers.brave_provider.client import AsyncBraveSearch
|
|
39
|
-
from searchly.providers.dataforseo_provider.dataforseo import AsyncDataForSEOClient
|
|
40
|
-
from searchly.providers.exa_provider.exa import AsyncExaClient
|
|
41
|
-
from searchly.providers.jigsawstack_provider.jigsawstack import AsyncJigsawStackClient
|
|
42
|
-
from searchly.providers.kagi_provider.client import AsyncKagiClient
|
|
43
|
-
from searchly.providers.linkup_provider.client import AsyncLinkUpClient
|
|
44
|
-
from searchly.providers.search1_provider.client import AsyncSearch1API
|
|
45
|
-
from searchly.providers.serpapi_provider.client import AsyncSerpAPIClient
|
|
46
|
-
from searchly.providers.serper_provider.client import AsyncSerperClient
|
|
47
|
-
from searchly.providers.tavily_provider.client import AsyncTavilyClient
|
|
48
|
-
from searchly.providers.you_provider.you import AsyncYouClient
|
|
41
|
+
NewsSearchProviderName = Literal["brave", "dataforseo", "serpapi", "serper", "tavily", "you"]
|
|
49
42
|
|
|
50
43
|
|
|
51
44
|
class BaseSearchProviderConfig(Schema):
|
|
@@ -54,8 +47,6 @@ class BaseSearchProviderConfig(Schema):
|
|
|
54
47
|
type: str = Field(init=False)
|
|
55
48
|
"""Search provider type."""
|
|
56
49
|
|
|
57
|
-
model_config = ConfigDict(use_attribute_docstrings=True, extra="forbid")
|
|
58
|
-
|
|
59
50
|
def is_configured(self) -> bool:
|
|
60
51
|
"""Check if the provider has required credentials configured.
|
|
61
52
|
|
|
@@ -64,6 +55,14 @@ class BaseSearchProviderConfig(Schema):
|
|
|
64
55
|
"""
|
|
65
56
|
raise NotImplementedError
|
|
66
57
|
|
|
58
|
+
def get_provider(self) -> WebSearchProvider | NewsSearchProvider:
|
|
59
|
+
"""Check if the provider has required credentials configured.
|
|
60
|
+
|
|
61
|
+
Returns:
|
|
62
|
+
True if credentials are set via field or environment variable.
|
|
63
|
+
"""
|
|
64
|
+
raise NotImplementedError
|
|
65
|
+
|
|
67
66
|
|
|
68
67
|
class BraveSearchConfig(BaseSearchProviderConfig):
|
|
69
68
|
"""Brave Search provider configuration.
|
|
@@ -73,28 +72,15 @@ class BraveSearchConfig(BaseSearchProviderConfig):
|
|
|
73
72
|
"""
|
|
74
73
|
|
|
75
74
|
type: Literal["brave"] = Field("brave", init=False)
|
|
75
|
+
"""Brave Search provider."""
|
|
76
76
|
|
|
77
|
-
api_key: SecretStr | None = Field(
|
|
78
|
-
|
|
79
|
-
title="API Key",
|
|
80
|
-
description="Brave Search API key. Defaults to BRAVE_API_KEY env var.",
|
|
81
|
-
)
|
|
82
|
-
"""Brave Search API key."""
|
|
77
|
+
api_key: SecretStr | None = Field(default=None, title="API Key")
|
|
78
|
+
"""Brave Search API key. Defaults to BRAVE_API_KEY env var."""
|
|
83
79
|
|
|
84
|
-
retries: int = Field(
|
|
85
|
-
default=0,
|
|
86
|
-
ge=0,
|
|
87
|
-
title="Retries",
|
|
88
|
-
examples=[0, 3, 5],
|
|
89
|
-
)
|
|
80
|
+
retries: int = Field(default=0, ge=0, title="Retries", examples=[0, 3, 5])
|
|
90
81
|
"""Number of retries for failed requests."""
|
|
91
82
|
|
|
92
|
-
wait_time: int = Field(
|
|
93
|
-
default=2,
|
|
94
|
-
ge=0,
|
|
95
|
-
title="Wait Time",
|
|
96
|
-
examples=[1, 2, 5],
|
|
97
|
-
)
|
|
83
|
+
wait_time: int = Field(default=2, ge=0, title="Wait Time", examples=[1, 2, 5])
|
|
98
84
|
"""Time to wait between retries in seconds."""
|
|
99
85
|
|
|
100
86
|
def is_configured(self) -> bool:
|
|
@@ -121,25 +107,15 @@ class DataForSEOConfig(BaseSearchProviderConfig):
|
|
|
121
107
|
"""
|
|
122
108
|
|
|
123
109
|
type: Literal["dataforseo"] = Field("dataforseo", init=False)
|
|
110
|
+
"""DataForSEO provider."""
|
|
124
111
|
|
|
125
|
-
login: SecretStr | None = Field(
|
|
126
|
-
|
|
127
|
-
title="Login",
|
|
128
|
-
description="DataForSEO login. Defaults to DATAFORSEO_LOGIN env var.",
|
|
129
|
-
)
|
|
130
|
-
"""DataForSEO login."""
|
|
112
|
+
login: SecretStr | None = Field(default=None, title="Login")
|
|
113
|
+
"""DataForSEO login. Defaults to DATAFORSEO_LOGIN env var."""
|
|
131
114
|
|
|
132
|
-
password: SecretStr | None = Field(
|
|
133
|
-
|
|
134
|
-
title="Password",
|
|
135
|
-
description="DataForSEO password. Defaults to DATAFORSEO_PASSWORD env var.",
|
|
136
|
-
)
|
|
137
|
-
"""DataForSEO password."""
|
|
115
|
+
password: SecretStr | None = Field(default=None, title="Password")
|
|
116
|
+
"""DataForSEO password. Defaults to DATAFORSEO_PASSWORD env var."""
|
|
138
117
|
|
|
139
|
-
base_url: str = Field(
|
|
140
|
-
default="https://api.dataforseo.com/v3",
|
|
141
|
-
title="Base URL",
|
|
142
|
-
)
|
|
118
|
+
base_url: str = Field(default="https://api.dataforseo.com/v3", title="Base URL")
|
|
143
119
|
"""Base URL for the API."""
|
|
144
120
|
|
|
145
121
|
def is_configured(self) -> bool:
|
|
@@ -169,13 +145,10 @@ class ExaConfig(BaseSearchProviderConfig):
|
|
|
169
145
|
"""
|
|
170
146
|
|
|
171
147
|
type: Literal["exa"] = Field("exa", init=False)
|
|
148
|
+
"""Exa provider."""
|
|
172
149
|
|
|
173
|
-
api_key: SecretStr | None = Field(
|
|
174
|
-
|
|
175
|
-
title="API Key",
|
|
176
|
-
description="Exa API key. Defaults to EXA_API_KEY env var.",
|
|
177
|
-
)
|
|
178
|
-
"""Exa API key."""
|
|
150
|
+
api_key: SecretStr | None = Field(default=None, title="API Key")
|
|
151
|
+
"""Exa API key. Defaults to EXA_API_KEY env var."""
|
|
179
152
|
|
|
180
153
|
def is_configured(self) -> bool:
|
|
181
154
|
"""Check if Exa credentials are configured."""
|
|
@@ -197,18 +170,12 @@ class JigsawStackConfig(BaseSearchProviderConfig):
|
|
|
197
170
|
"""
|
|
198
171
|
|
|
199
172
|
type: Literal["jigsawstack"] = Field("jigsawstack", init=False)
|
|
173
|
+
"""JigsawStack provider."""
|
|
200
174
|
|
|
201
|
-
api_key: SecretStr | None = Field(
|
|
202
|
-
|
|
203
|
-
title="API Key",
|
|
204
|
-
description="JigsawStack API key. Defaults to JIGSAWSTACK_API_KEY env var.",
|
|
205
|
-
)
|
|
206
|
-
"""JigsawStack API key."""
|
|
175
|
+
api_key: SecretStr | None = Field(default=None, title="API Key")
|
|
176
|
+
"""JigsawStack API key. Defaults to JIGSAWSTACK_API_KEY env var."""
|
|
207
177
|
|
|
208
|
-
base_url: str = Field(
|
|
209
|
-
default="https://api.jigsawstack.com/v1",
|
|
210
|
-
title="Base URL",
|
|
211
|
-
)
|
|
178
|
+
base_url: str = Field(default="https://api.jigsawstack.com/v1", title="Base URL")
|
|
212
179
|
"""Base URL for the API."""
|
|
213
180
|
|
|
214
181
|
def is_configured(self) -> bool:
|
|
@@ -231,18 +198,12 @@ class KagiConfig(BaseSearchProviderConfig):
|
|
|
231
198
|
"""
|
|
232
199
|
|
|
233
200
|
type: Literal["kagi"] = Field("kagi", init=False)
|
|
201
|
+
"""Kagi provider."""
|
|
234
202
|
|
|
235
|
-
api_key: SecretStr | None = Field(
|
|
236
|
-
|
|
237
|
-
title="API Key",
|
|
238
|
-
description="Kagi API key. Defaults to KAGI_API_KEY env var.",
|
|
239
|
-
)
|
|
240
|
-
"""Kagi API key."""
|
|
203
|
+
api_key: SecretStr | None = Field(default=None, title="API Key")
|
|
204
|
+
"""Kagi API key. Defaults to KAGI_API_KEY env var."""
|
|
241
205
|
|
|
242
|
-
base_url: str = Field(
|
|
243
|
-
default="https://kagi.com/api/v0",
|
|
244
|
-
title="Base URL",
|
|
245
|
-
)
|
|
206
|
+
base_url: str = Field(default="https://kagi.com/api/v0", title="Base URL")
|
|
246
207
|
"""Base URL for the API."""
|
|
247
208
|
|
|
248
209
|
def is_configured(self) -> bool:
|
|
@@ -265,18 +226,12 @@ class LinkUpConfig(BaseSearchProviderConfig):
|
|
|
265
226
|
"""
|
|
266
227
|
|
|
267
228
|
type: Literal["linkup"] = Field("linkup", init=False)
|
|
229
|
+
"""LinkUp provider."""
|
|
268
230
|
|
|
269
|
-
api_key: SecretStr | None = Field(
|
|
270
|
-
|
|
271
|
-
title="API Key",
|
|
272
|
-
description="LinkUp API key. Defaults to LINKUP_API_KEY env var.",
|
|
273
|
-
)
|
|
274
|
-
"""LinkUp API key."""
|
|
231
|
+
api_key: SecretStr | None = Field(default=None, title="API Key")
|
|
232
|
+
"""LinkUp API key. Defaults to LINKUP_API_KEY env var."""
|
|
275
233
|
|
|
276
|
-
base_url: str = Field(
|
|
277
|
-
default="https://api.linkup.so/v1",
|
|
278
|
-
title="Base URL",
|
|
279
|
-
)
|
|
234
|
+
base_url: str = Field(default="https://api.linkup.so/v1", title="Base URL")
|
|
280
235
|
"""Base URL for the API."""
|
|
281
236
|
|
|
282
237
|
def is_configured(self) -> bool:
|
|
@@ -299,13 +254,10 @@ class Search1Config(BaseSearchProviderConfig):
|
|
|
299
254
|
"""
|
|
300
255
|
|
|
301
256
|
type: Literal["search1"] = Field("search1", init=False)
|
|
257
|
+
"""Search1API provider."""
|
|
302
258
|
|
|
303
|
-
api_key: SecretStr | None = Field(
|
|
304
|
-
|
|
305
|
-
title="API Key",
|
|
306
|
-
description="Search1API key. Defaults to SEARCH1API_KEY env var.",
|
|
307
|
-
)
|
|
308
|
-
"""Search1API key."""
|
|
259
|
+
api_key: SecretStr | None = Field(default=None, title="API Key")
|
|
260
|
+
"""Search1API key. Defaults to SEARCH1API_KEY env var."""
|
|
309
261
|
|
|
310
262
|
base_url: str = Field(
|
|
311
263
|
default="https://api.search1api.com",
|
|
@@ -333,13 +285,10 @@ class SerpAPIConfig(BaseSearchProviderConfig):
|
|
|
333
285
|
"""
|
|
334
286
|
|
|
335
287
|
type: Literal["serpapi"] = Field("serpapi", init=False)
|
|
288
|
+
"""SerpAPI provider."""
|
|
336
289
|
|
|
337
|
-
api_key: SecretStr | None = Field(
|
|
338
|
-
|
|
339
|
-
title="API Key",
|
|
340
|
-
description="SerpAPI key. Defaults to SERPAPI_KEY env var.",
|
|
341
|
-
)
|
|
342
|
-
"""SerpAPI key."""
|
|
290
|
+
api_key: SecretStr | None = Field(default=None, title="API Key")
|
|
291
|
+
"""SerpAPI key. Defaults to SERPAPI_KEY env var."""
|
|
343
292
|
|
|
344
293
|
def is_configured(self) -> bool:
|
|
345
294
|
"""Check if SerpAPI credentials are configured."""
|
|
@@ -361,18 +310,12 @@ class SerperConfig(BaseSearchProviderConfig):
|
|
|
361
310
|
"""
|
|
362
311
|
|
|
363
312
|
type: Literal["serper"] = Field("serper", init=False)
|
|
313
|
+
"""Serper provider."""
|
|
364
314
|
|
|
365
|
-
api_key: SecretStr | None = Field(
|
|
366
|
-
|
|
367
|
-
title="API Key",
|
|
368
|
-
description="Serper.dev API key. Defaults to SERPER_API_KEY env var.",
|
|
369
|
-
)
|
|
370
|
-
"""Serper.dev API key."""
|
|
315
|
+
api_key: SecretStr | None = Field(default=None, title="API Key")
|
|
316
|
+
"""Serper.dev API key. Defaults to SERPER_API_KEY env var."""
|
|
371
317
|
|
|
372
|
-
base_url: str = Field(
|
|
373
|
-
default="https://google.serper.dev",
|
|
374
|
-
title="Base URL",
|
|
375
|
-
)
|
|
318
|
+
base_url: str = Field(default="https://google.serper.dev", title="Base URL")
|
|
376
319
|
"""Base URL for the API."""
|
|
377
320
|
|
|
378
321
|
def is_configured(self) -> bool:
|
|
@@ -395,13 +338,10 @@ class TavilyConfig(BaseSearchProviderConfig):
|
|
|
395
338
|
"""
|
|
396
339
|
|
|
397
340
|
type: Literal["tavily"] = Field("tavily", init=False)
|
|
341
|
+
"""Tavily provider."""
|
|
398
342
|
|
|
399
|
-
api_key: SecretStr | None = Field(
|
|
400
|
-
|
|
401
|
-
title="API Key",
|
|
402
|
-
description="Tavily API key. Defaults to TAVILY_API_KEY env var.",
|
|
403
|
-
)
|
|
404
|
-
"""Tavily API key."""
|
|
343
|
+
api_key: SecretStr | None = Field(default=None, title="API Key")
|
|
344
|
+
"""Tavily API key. Defaults to TAVILY_API_KEY env var."""
|
|
405
345
|
|
|
406
346
|
def is_configured(self) -> bool:
|
|
407
347
|
"""Check if Tavily credentials are configured."""
|
|
@@ -423,18 +363,12 @@ class YouConfig(BaseSearchProviderConfig):
|
|
|
423
363
|
"""
|
|
424
364
|
|
|
425
365
|
type: Literal["you"] = Field("you", init=False)
|
|
366
|
+
"""You.com provider."""
|
|
426
367
|
|
|
427
|
-
api_key: SecretStr | None = Field(
|
|
428
|
-
|
|
429
|
-
title="API Key",
|
|
430
|
-
description="You.com API key. Defaults to YOU_API_KEY env var.",
|
|
431
|
-
)
|
|
432
|
-
"""You.com API key."""
|
|
368
|
+
api_key: SecretStr | None = Field(default=None, title="API Key")
|
|
369
|
+
"""You.com API key. Defaults to YOU_API_KEY env var."""
|
|
433
370
|
|
|
434
|
-
base_url: str = Field(
|
|
435
|
-
default="https://api.ydc-index.io",
|
|
436
|
-
title="Base URL",
|
|
437
|
-
)
|
|
371
|
+
base_url: str = Field(default="https://api.ydc-index.io", title="Base URL")
|
|
438
372
|
"""Base URL for the API."""
|
|
439
373
|
|
|
440
374
|
def is_configured(self) -> bool:
|
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import os
|
|
6
|
-
from typing import
|
|
6
|
+
from typing import Any, cast
|
|
7
7
|
|
|
8
8
|
from searchly.base import (
|
|
9
|
+
CountryCode, # noqa: TC001
|
|
10
|
+
LanguageCode, # noqa: TC001
|
|
9
11
|
NewsSearchProvider,
|
|
10
12
|
NewsSearchResponse,
|
|
11
13
|
NewsSearchResult,
|
|
@@ -15,10 +17,6 @@ from searchly.base import (
|
|
|
15
17
|
)
|
|
16
18
|
|
|
17
19
|
|
|
18
|
-
if TYPE_CHECKING:
|
|
19
|
-
from searchly.base import CountryCode, LanguageCode
|
|
20
|
-
|
|
21
|
-
|
|
22
20
|
class AsyncBraveSearch(WebSearchProvider, NewsSearchProvider):
|
|
23
21
|
"""Async client for Brave Search API."""
|
|
24
22
|
|
|
@@ -4,12 +4,14 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import base64
|
|
6
6
|
import os
|
|
7
|
-
from typing import
|
|
7
|
+
from typing import Any, Literal
|
|
8
8
|
|
|
9
9
|
import anyenv
|
|
10
10
|
|
|
11
11
|
from searchly.base import (
|
|
12
12
|
DATAFORSEO_COUNTRY_MAP,
|
|
13
|
+
CountryCode, # noqa: TC001
|
|
14
|
+
LanguageCode, # noqa: TC001
|
|
13
15
|
NewsSearchProvider,
|
|
14
16
|
NewsSearchResponse,
|
|
15
17
|
NewsSearchResult,
|
|
@@ -19,10 +21,6 @@ from searchly.base import (
|
|
|
19
21
|
)
|
|
20
22
|
|
|
21
23
|
|
|
22
|
-
if TYPE_CHECKING:
|
|
23
|
-
from searchly.base import CountryCode, LanguageCode
|
|
24
|
-
|
|
25
|
-
|
|
26
24
|
OSType = Literal["windows", "macos", "android", "ios"]
|
|
27
25
|
DeviceType = Literal["desktop", "mobile", "tablet"]
|
|
28
26
|
|
|
@@ -3,13 +3,15 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import os
|
|
6
|
-
from typing import
|
|
7
|
-
|
|
8
|
-
from searchly.base import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
from typing import Any, Literal
|
|
7
|
+
|
|
8
|
+
from searchly.base import (
|
|
9
|
+
CountryCode, # noqa: TC001
|
|
10
|
+
LanguageCode, # noqa: TC001
|
|
11
|
+
WebSearchProvider,
|
|
12
|
+
WebSearchResponse,
|
|
13
|
+
WebSearchResult,
|
|
14
|
+
)
|
|
13
15
|
|
|
14
16
|
|
|
15
17
|
class AsyncExaClient(WebSearchProvider):
|
{searchly-2.0.2 → searchly-2.0.4}/src/searchly/providers/jigsawstack_provider/jigsawstack.py
RENAMED
|
@@ -3,15 +3,17 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import os
|
|
6
|
-
from typing import
|
|
6
|
+
from typing import Any, Literal
|
|
7
7
|
|
|
8
8
|
import anyenv
|
|
9
9
|
|
|
10
|
-
from searchly.base import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
from searchly.base import (
|
|
11
|
+
CountryCode, # noqa: TC001
|
|
12
|
+
LanguageCode, # noqa: TC001
|
|
13
|
+
WebSearchProvider,
|
|
14
|
+
WebSearchResponse,
|
|
15
|
+
WebSearchResult,
|
|
16
|
+
)
|
|
15
17
|
|
|
16
18
|
|
|
17
19
|
SafeSearchSetting = Literal["moderate", "strict", "off"]
|
|
@@ -3,21 +3,19 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import os
|
|
6
|
-
from typing import
|
|
6
|
+
from typing import Any, Literal
|
|
7
7
|
|
|
8
8
|
import anyenv
|
|
9
9
|
|
|
10
10
|
from searchly.base import (
|
|
11
|
+
CountryCode, # noqa: TC001
|
|
12
|
+
LanguageCode, # noqa: TC001
|
|
11
13
|
WebSearchProvider,
|
|
12
14
|
WebSearchResponse,
|
|
13
15
|
WebSearchResult,
|
|
14
16
|
)
|
|
15
17
|
|
|
16
18
|
|
|
17
|
-
if TYPE_CHECKING:
|
|
18
|
-
from searchly.base import CountryCode, LanguageCode
|
|
19
|
-
|
|
20
|
-
|
|
21
19
|
SummaryType = Literal["summary", "takeaway"]
|
|
22
20
|
SummaryEngine = Literal["cecil", "agnes", "muriel"]
|
|
23
21
|
|
|
@@ -3,15 +3,17 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import os
|
|
6
|
-
from typing import
|
|
6
|
+
from typing import Any, Literal
|
|
7
7
|
|
|
8
8
|
import anyenv
|
|
9
9
|
|
|
10
|
-
from searchly.base import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
from searchly.base import (
|
|
11
|
+
CountryCode, # noqa: TC001
|
|
12
|
+
LanguageCode, # noqa: TC001
|
|
13
|
+
WebSearchProvider,
|
|
14
|
+
WebSearchResponse,
|
|
15
|
+
WebSearchResult,
|
|
16
|
+
)
|
|
15
17
|
|
|
16
18
|
|
|
17
19
|
OutputType = Literal["sourcedAnswer", "searchResults", "structured"]
|
|
@@ -3,15 +3,17 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import os
|
|
6
|
-
from typing import
|
|
6
|
+
from typing import Any, Literal
|
|
7
7
|
|
|
8
8
|
import anyenv
|
|
9
9
|
|
|
10
|
-
from searchly.base import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
from searchly.base import (
|
|
11
|
+
CountryCode, # noqa: TC001
|
|
12
|
+
LanguageCode, # noqa: TC001
|
|
13
|
+
WebSearchProvider,
|
|
14
|
+
WebSearchResponse,
|
|
15
|
+
WebSearchResult,
|
|
16
|
+
)
|
|
15
17
|
|
|
16
18
|
|
|
17
19
|
TimeRange = Literal["day", "week", "month", "year"]
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import os
|
|
6
|
-
from typing import
|
|
6
|
+
from typing import Any, Literal
|
|
7
7
|
|
|
8
8
|
import anyenv
|
|
9
9
|
|
|
10
10
|
from searchly.base import (
|
|
11
|
+
CountryCode, # noqa: TC001
|
|
12
|
+
LanguageCode, # noqa: TC001
|
|
11
13
|
NewsSearchProvider,
|
|
12
14
|
NewsSearchResponse,
|
|
13
15
|
NewsSearchResult,
|
|
@@ -17,10 +19,6 @@ from searchly.base import (
|
|
|
17
19
|
)
|
|
18
20
|
|
|
19
21
|
|
|
20
|
-
if TYPE_CHECKING:
|
|
21
|
-
from searchly.base import CountryCode, LanguageCode
|
|
22
|
-
|
|
23
|
-
|
|
24
22
|
DateRange = Literal["h", "d", "w", "m", "y"]
|
|
25
23
|
|
|
26
24
|
|
|
@@ -2,14 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
from collections.abc import Sequence # noqa: TC003
|
|
5
6
|
import contextlib
|
|
6
7
|
import os
|
|
7
|
-
from typing import
|
|
8
|
+
from typing import Any, Literal
|
|
8
9
|
|
|
9
10
|
import anyenv
|
|
10
11
|
import httpx
|
|
11
12
|
|
|
12
13
|
from searchly.base import (
|
|
14
|
+
CountryCode, # noqa: TC001
|
|
15
|
+
LanguageCode, # noqa: TC001
|
|
13
16
|
NewsSearchProvider,
|
|
14
17
|
NewsSearchResponse,
|
|
15
18
|
NewsSearchResult,
|
|
@@ -20,12 +23,6 @@ from searchly.base import (
|
|
|
20
23
|
from searchly.exceptions import InvalidAPIKeyError, MissingAPIKeyError, UsageLimitExceededError
|
|
21
24
|
|
|
22
25
|
|
|
23
|
-
if TYPE_CHECKING:
|
|
24
|
-
from collections.abc import Sequence
|
|
25
|
-
|
|
26
|
-
from searchly.base import CountryCode, LanguageCode
|
|
27
|
-
|
|
28
|
-
|
|
29
26
|
SearchDepth = Literal["basic", "advanced"]
|
|
30
27
|
|
|
31
28
|
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import os
|
|
6
|
-
from typing import
|
|
6
|
+
from typing import Any, Literal
|
|
7
7
|
|
|
8
8
|
import anyenv
|
|
9
9
|
|
|
10
10
|
from searchly.base import (
|
|
11
|
+
CountryCode, # noqa: TC001
|
|
12
|
+
LanguageCode, # noqa: TC001
|
|
11
13
|
NewsSearchProvider,
|
|
12
14
|
NewsSearchResponse,
|
|
13
15
|
NewsSearchResult,
|
|
@@ -17,10 +19,6 @@ from searchly.base import (
|
|
|
17
19
|
)
|
|
18
20
|
|
|
19
21
|
|
|
20
|
-
if TYPE_CHECKING:
|
|
21
|
-
from searchly.base import CountryCode, LanguageCode
|
|
22
|
-
|
|
23
|
-
|
|
24
22
|
SafeSearchLevel = Literal["off", "moderate", "strict"]
|
|
25
23
|
FreshnessFilter = Literal["day", "week", "month", "year"]
|
|
26
24
|
|
|
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
|