parallel-web 0.3.0__py3-none-any.whl → 0.3.1__py3-none-any.whl

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.

Potentially problematic release.


This version of parallel-web might be problematic. Click here for more details.

parallel/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "parallel"
4
- __version__ = "0.3.0" # x-release-please-version
4
+ __version__ = "0.3.1" # x-release-please-version
@@ -37,6 +37,7 @@ from ...types.beta import beta_search_params, beta_extract_params
37
37
  from ..._base_client import make_request_options
38
38
  from ...types.beta.search_result import SearchResult
39
39
  from ...types.beta.extract_response import ExtractResponse
40
+ from ...types.beta.fetch_policy_param import FetchPolicyParam
40
41
  from ...types.beta.parallel_beta_param import ParallelBetaParam
41
42
  from ...types.shared_params.source_policy import SourcePolicy
42
43
 
@@ -76,7 +77,7 @@ class BetaResource(SyncAPIResource):
76
77
  *,
77
78
  urls: SequenceNotStr[str],
78
79
  excerpts: beta_extract_params.Excerpts | Omit = omit,
79
- fetch_policy: Optional[beta_extract_params.FetchPolicy] | Omit = omit,
80
+ fetch_policy: Optional[FetchPolicyParam] | Omit = omit,
80
81
  full_content: beta_extract_params.FullContent | Omit = omit,
81
82
  objective: Optional[str] | Omit = omit,
82
83
  search_queries: Optional[SequenceNotStr[str]] | Omit = omit,
@@ -252,7 +253,7 @@ class AsyncBetaResource(AsyncAPIResource):
252
253
  *,
253
254
  urls: SequenceNotStr[str],
254
255
  excerpts: beta_extract_params.Excerpts | Omit = omit,
255
- fetch_policy: Optional[beta_extract_params.FetchPolicy] | Omit = omit,
256
+ fetch_policy: Optional[FetchPolicyParam] | Omit = omit,
256
257
  full_content: beta_extract_params.FullContent | Omit = omit,
257
258
  objective: Optional[str] | Omit = omit,
258
259
  search_queries: Optional[SequenceNotStr[str]] | Omit = omit,
@@ -18,6 +18,7 @@ from .mcp_server_param import McpServerParam as McpServerParam
18
18
  from .task_group_status import TaskGroupStatus as TaskGroupStatus
19
19
  from .web_search_result import WebSearchResult as WebSearchResult
20
20
  from .beta_search_params import BetaSearchParams as BetaSearchParams
21
+ from .fetch_policy_param import FetchPolicyParam as FetchPolicyParam
21
22
  from .beta_extract_params import BetaExtractParams as BetaExtractParams
22
23
  from .parallel_beta_param import ParallelBetaParam as ParallelBetaParam
23
24
  from .beta_run_input_param import BetaRunInputParam as BetaRunInputParam
@@ -7,10 +7,11 @@ from typing_extensions import Required, Annotated, TypeAlias, TypedDict
7
7
 
8
8
  from ..._types import SequenceNotStr
9
9
  from ..._utils import PropertyInfo
10
+ from .fetch_policy_param import FetchPolicyParam
10
11
  from .parallel_beta_param import ParallelBetaParam
11
12
  from .excerpt_settings_param import ExcerptSettingsParam
12
13
 
13
- __all__ = ["BetaExtractParams", "Excerpts", "FetchPolicy", "FullContent", "FullContentFullContentSettings"]
14
+ __all__ = ["BetaExtractParams", "Excerpts", "FullContent", "FullContentFullContentSettings"]
14
15
 
15
16
 
16
17
  class BetaExtractParams(TypedDict, total=False):
@@ -23,7 +24,7 @@ class BetaExtractParams(TypedDict, total=False):
23
24
  redundant with full content.
24
25
  """
25
26
 
26
- fetch_policy: Optional[FetchPolicy]
27
+ fetch_policy: Optional[FetchPolicyParam]
27
28
  """Fetch policy.
28
29
 
29
30
  Determines when to return content from the cache (faster) vs fetching live
@@ -50,29 +51,6 @@ class BetaExtractParams(TypedDict, total=False):
50
51
  Excerpts: TypeAlias = Union[bool, ExcerptSettingsParam]
51
52
 
52
53
 
53
- class FetchPolicy(TypedDict, total=False):
54
- disable_cache_fallback: bool
55
- """
56
- If false, fallback to cached content older than max-age if live fetch fails or
57
- times out. If true, returns an error instead.
58
- """
59
-
60
- max_age_seconds: Optional[int]
61
- """Maximum age of cached content in seconds to trigger a live fetch.
62
-
63
- Minimum value 600 seconds (10 minutes). If not provided, a dynamic age policy
64
- will be used based on the search objective and url.
65
- """
66
-
67
- timeout_seconds: Optional[float]
68
- """Timeout in seconds for fetching live content if unavailable in cache.
69
-
70
- If unspecified a dynamic timeout will be used based on the url, generally 15
71
- seconds for simple pages and up to 60 seconds for complex pages requiring
72
- javascript or PDF rendering.
73
- """
74
-
75
-
76
54
  class FullContentFullContentSettings(TypedDict, total=False):
77
55
  max_chars_per_result: Optional[int]
78
56
  """
@@ -0,0 +1,31 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Optional
6
+ from typing_extensions import TypedDict
7
+
8
+ __all__ = ["FetchPolicyParam"]
9
+
10
+
11
+ class FetchPolicyParam(TypedDict, total=False):
12
+ disable_cache_fallback: bool
13
+ """
14
+ If false, fallback to cached content older than max-age if live fetch fails or
15
+ times out. If true, returns an error instead.
16
+ """
17
+
18
+ max_age_seconds: Optional[int]
19
+ """Maximum age of cached content in seconds to trigger a live fetch.
20
+
21
+ Minimum value 600 seconds (10 minutes). If not provided, a dynamic age policy
22
+ will be used based on the search objective and url.
23
+ """
24
+
25
+ timeout_seconds: Optional[float]
26
+ """Timeout in seconds for fetching live content if unavailable in cache.
27
+
28
+ If unspecified a dynamic timeout will be used based on the url, generally 15
29
+ seconds for simple pages and up to 60 seconds for complex pages requiring
30
+ javascript or PDF rendering.
31
+ """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: parallel-web
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: The official Python library for the Parallel API
5
5
  Project-URL: Homepage, https://github.com/parallel-web/parallel-sdk-python
6
6
  Project-URL: Repository, https://github.com/parallel-web/parallel-sdk-python
@@ -11,7 +11,7 @@ parallel/_resource.py,sha256=QvY8l_r03hNBsFTTn3g7Pkx8OrDwIwROHaSEViWcYLA,1112
11
11
  parallel/_response.py,sha256=zJKnQ9YzrMZCTPWis4CdyGCAH0kzT4m1OHE74jiF0jA,28800
12
12
  parallel/_streaming.py,sha256=vH45vK3-83ruFalbvSgpE70zfwy8fjW9UwrO1TwjIfE,10108
13
13
  parallel/_types.py,sha256=ohdaBqcsvcZ14iBOJ8Tuv752Fzq-0lFSwCfTSgI-aIw,7238
14
- parallel/_version.py,sha256=iv1j6vu_rXYatHaC_spPxh4KfLvcwN2u6fOnjpPmIF0,160
14
+ parallel/_version.py,sha256=xYX02JmdjutuoQ6gHAdHV4B-KgE_nEjs_OeLxVZv5sY,160
15
15
  parallel/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  parallel/_utils/__init__.py,sha256=hQbbbshrJaj0DuLIvbvdLvCujBMzJ827P_CXVR1VosY,2327
17
17
  parallel/_utils/_compat.py,sha256=D8gtAvjJQrDWt9upS0XaG9Rr5l1QhiAx_I_1utT_tt0,1195
@@ -35,7 +35,7 @@ parallel/lib/_parsing/_task_spec.py,sha256=-yiyR88IqZJwuGtLwlLFikrB-w8pLc0wAysp4
35
35
  parallel/resources/__init__.py,sha256=PAnsvK_p1MHcu1XIBtyktNzkS60ata-K4YFXcVZ43ps,990
36
36
  parallel/resources/task_run.py,sha256=K600WuHJ5AesKtb3EG17FOi49GEDGzlHRuwBm2sL7Bs,26504
37
37
  parallel/resources/beta/__init__.py,sha256=7vguQhQFwL7SfwgJKziGU_cmz6qyh7IRucNpw6-GTz8,1480
38
- parallel/resources/beta/beta.py,sha256=dyfztp9SBSgqkz-Tjco4OrIQHGbTxmm_PqTdPbpQfEA,18915
38
+ parallel/resources/beta/beta.py,sha256=8yrSIUfK9_FNiLMRcnNoNLlvPGyXtFNbdQwrfOwZZgY,18947
39
39
  parallel/resources/beta/task_group.py,sha256=YekGyy06oAS2KkrOLcQXkN4GRMNdBwL8qMFN1Eh5VLA,26404
40
40
  parallel/resources/beta/task_run.py,sha256=UHw1HReVKGcsMqYprcFarNMZdMvXFDRJoUKyDvoMypo,20726
41
41
  parallel/types/__init__.py,sha256=VmaNWhKOnMNn-p9RvktHNEB9nKL_w3QSoQQx1z_ORIc,1302
@@ -56,8 +56,8 @@ parallel/types/task_spec.py,sha256=ZMV1G3G9Ap70MxrqqClq2XmvPmhw5DLHJQ7rFKv1SdI,1
56
56
  parallel/types/task_spec_param.py,sha256=fmz30Re2VvtDp_O14o3jQZtI_Yl7l1mzObi_AK-iDbU,1243
57
57
  parallel/types/text_schema.py,sha256=QLOILH4KqVTVpFkilnFQxjUHWSd2F4glbeJC0GMEseU,450
58
58
  parallel/types/text_schema_param.py,sha256=N1YQnxEbgjMZJF-3SPZdTDouDmN06aektgC6NfP9BPk,463
59
- parallel/types/beta/__init__.py,sha256=ifzxkWDIQx1TfSiNrjZngm4O-tGSDSzY-ws7Vwezg_0,2261
60
- parallel/types/beta/beta_extract_params.py,sha256=LEV9stilZxEt_cMwt7OEYyXLXy958Utonb0Ddv4xfZI,2871
59
+ parallel/types/beta/__init__.py,sha256=txIrZWzp-elxn1oKzhlLq2Ek47vnxvWKB14gzbZFZek,2330
60
+ parallel/types/beta/beta_extract_params.py,sha256=yN4hUoN-FC-XQmm_3tRSTBxWYBHsd3qG-yTUK_tZeX0,2111
61
61
  parallel/types/beta/beta_run_input.py,sha256=-Bq2ksQiuRsEGrMvbIyNza-6qKEeu3fhZfo7Uam6pi8,2281
62
62
  parallel/types/beta/beta_run_input_param.py,sha256=6vyv9FHUJ8q_hp6Icghzm2smP2kl-YkVSpF97r9m7ec,2398
63
63
  parallel/types/beta/beta_search_params.py,sha256=fSYhWsAPuh_ZH4RYZZn2dDn2j74XxdLBwjUE67qAd7c,1679
@@ -67,6 +67,7 @@ parallel/types/beta/excerpt_settings_param.py,sha256=qc6A_g-egZVI0loX7sUtsZIR05W
67
67
  parallel/types/beta/extract_error.py,sha256=19XCPu2POp9CWAF5HkceCjXR0RmEyKFZxlsfjmgOeJw,456
68
68
  parallel/types/beta/extract_response.py,sha256=jZ5b91iFaHhcpXG-EdzJl3NGv1ARSBp3zQu4y9Vdrvo,557
69
69
  parallel/types/beta/extract_result.py,sha256=7l13HHXZKEr4EPc2cRD0mtsT6CB7-hqMQf4lgAnF7DY,632
70
+ parallel/types/beta/fetch_policy_param.py,sha256=DRMDjPEesNEe-TG5eo68jSzSldxcZjj9g9e7tVov8mo,1027
70
71
  parallel/types/beta/mcp_server.py,sha256=BHmXfmV0odaB8xveYHMTbAEE_SVff9l-ObQxxjsImCI,636
71
72
  parallel/types/beta/mcp_server_param.py,sha256=x7LAisuTkYT034yVGNmz73I0SUQPyLHjXodsAZfR0v8,713
72
73
  parallel/types/beta/mcp_tool_call.py,sha256=yx8Er1bfGahyxfZhhkrHFO5ymdjl2qf4zDnCjg2P4y0,632
@@ -95,7 +96,7 @@ parallel/types/shared/source_policy.py,sha256=0E_avIRbTe_frkfVpaiuwACdp3LQ2EviAq
95
96
  parallel/types/shared/warning.py,sha256=QeJ5lJ-ZwkjbVmcc1wusx67O2amMXtm8Y9KxFM0USp0,594
96
97
  parallel/types/shared_params/__init__.py,sha256=nleCwf-4RjZtFXe7BaN5aFrrFnUmqZMMs9oeDajqn3g,143
97
98
  parallel/types/shared_params/source_policy.py,sha256=sz9YMyjgK5meQ-GZakajIrR1UrLKA7qOHmhGdq393h0,606
98
- parallel_web-0.3.0.dist-info/METADATA,sha256=Nxn2K6fCaqPMiMjlW1eGMP4vTvizXdNlMeiuhjIlt-E,16173
99
- parallel_web-0.3.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
100
- parallel_web-0.3.0.dist-info/licenses/LICENSE,sha256=1rFsV0HhxaZBP55JM8Cu2w0Bw-uxTFtyTja_DE94oEM,1048
101
- parallel_web-0.3.0.dist-info/RECORD,,
99
+ parallel_web-0.3.1.dist-info/METADATA,sha256=wbIzajhxn5LLGpALsS2CdiVeDv8IPbPJBlbvSw9LT0w,16173
100
+ parallel_web-0.3.1.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
101
+ parallel_web-0.3.1.dist-info/licenses/LICENSE,sha256=1rFsV0HhxaZBP55JM8Cu2w0Bw-uxTFtyTja_DE94oEM,1048
102
+ parallel_web-0.3.1.dist-info/RECORD,,