Skip to content

Commit b245661

Browse files
release: 0.3.1 (#14)
Automated Release PR --- ## 0.3.1 (2025-10-21) Full Changelog: [v0.3.0...v0.3.1](v0.3.0...v0.3.1) ### Features * **api**: Make FetchPolicy a common model instead of an extract specific model ([0acbe77](0acbe77)) --- This pull request is managed by Stainless's [GitHub App](https://github.com/apps/stainless-app). The [semver version number](https://semver.org/#semantic-versioning-specification-semver) is based on included [commit messages](https://www.conventionalcommits.org/en/v1.0.0/). Alternatively, you can manually set the version number in the title of this pull request. For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request. 🔗 Stainless [website](https://www.stainlessapi.com) 📚 Read the [docs](https://app.stainlessapi.com/docs) 🙋 [Reach out](mailto:support@stainlessapi.com) for help or questions --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent c84b04f commit b245661

File tree

10 files changed

+51
-31
lines changed

10 files changed

+51
-31
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.3.0"
2+
".": "0.3.1"
33
}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 13
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-e853fc79f3b41f00b3934fcc2e4c2813aa9f38528548f5f596e2b11ea833019b.yml
33
openapi_spec_hash: 34ed7e373927037fce6fd33d9bb60389
4-
config_hash: ae63572e3769dcd1b11e587f039e211a
4+
config_hash: 49716a82995763fddc4308b0b302f1cb

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 0.3.1 (2025-10-21)
4+
5+
Full Changelog: [v0.3.0...v0.3.1](https://github.com/parallel-web/parallel-sdk-python/compare/v0.3.0...v0.3.1)
6+
7+
### Features
8+
9+
* **api:** manual updates ([0acbe77](https://github.com/parallel-web/parallel-sdk-python/commit/0acbe77da0148029c21e6b3c541e0b1ca163038d))
10+
311
## 0.3.0 (2025-10-21)
412

513
Full Changelog: [v0.2.2...v0.3.0](https://github.com/parallel-web/parallel-sdk-python/compare/v0.2.2...v0.3.0)

api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ from parallel.types.beta import (
4545
ExtractError,
4646
ExtractResponse,
4747
ExtractResult,
48+
FetchPolicy,
4849
SearchResult,
4950
WebSearchResult,
5051
)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "parallel-web"
3-
version = "0.3.0"
3+
version = "0.3.1"
44
description = "The official Python library for the Parallel API"
55
dynamic = ["readme"]
66
license = "MIT"

src/parallel/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "parallel"
4-
__version__ = "0.3.0" # x-release-please-version
4+
__version__ = "0.3.1" # x-release-please-version

src/parallel/resources/beta/beta.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
from ..._base_client import make_request_options
3838
from ...types.beta.search_result import SearchResult
3939
from ...types.beta.extract_response import ExtractResponse
40+
from ...types.beta.fetch_policy_param import FetchPolicyParam
4041
from ...types.beta.parallel_beta_param import ParallelBetaParam
4142
from ...types.shared_params.source_policy import SourcePolicy
4243

@@ -76,7 +77,7 @@ def extract(
7677
*,
7778
urls: SequenceNotStr[str],
7879
excerpts: beta_extract_params.Excerpts | Omit = omit,
79-
fetch_policy: Optional[beta_extract_params.FetchPolicy] | Omit = omit,
80+
fetch_policy: Optional[FetchPolicyParam] | Omit = omit,
8081
full_content: beta_extract_params.FullContent | Omit = omit,
8182
objective: Optional[str] | Omit = omit,
8283
search_queries: Optional[SequenceNotStr[str]] | Omit = omit,
@@ -252,7 +253,7 @@ async def extract(
252253
*,
253254
urls: SequenceNotStr[str],
254255
excerpts: beta_extract_params.Excerpts | Omit = omit,
255-
fetch_policy: Optional[beta_extract_params.FetchPolicy] | Omit = omit,
256+
fetch_policy: Optional[FetchPolicyParam] | Omit = omit,
256257
full_content: beta_extract_params.FullContent | Omit = omit,
257258
objective: Optional[str] | Omit = omit,
258259
search_queries: Optional[SequenceNotStr[str]] | Omit = omit,

src/parallel/types/beta/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from .task_group_status import TaskGroupStatus as TaskGroupStatus
1919
from .web_search_result import WebSearchResult as WebSearchResult
2020
from .beta_search_params import BetaSearchParams as BetaSearchParams
21+
from .fetch_policy_param import FetchPolicyParam as FetchPolicyParam
2122
from .beta_extract_params import BetaExtractParams as BetaExtractParams
2223
from .parallel_beta_param import ParallelBetaParam as ParallelBetaParam
2324
from .beta_run_input_param import BetaRunInputParam as BetaRunInputParam

src/parallel/types/beta/beta_extract_params.py

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77

88
from ..._types import SequenceNotStr
99
from ..._utils import PropertyInfo
10+
from .fetch_policy_param import FetchPolicyParam
1011
from .parallel_beta_param import ParallelBetaParam
1112
from .excerpt_settings_param import ExcerptSettingsParam
1213

13-
__all__ = ["BetaExtractParams", "Excerpts", "FetchPolicy", "FullContent", "FullContentFullContentSettings"]
14+
__all__ = ["BetaExtractParams", "Excerpts", "FullContent", "FullContentFullContentSettings"]
1415

1516

1617
class BetaExtractParams(TypedDict, total=False):
@@ -23,7 +24,7 @@ class BetaExtractParams(TypedDict, total=False):
2324
redundant with full content.
2425
"""
2526

26-
fetch_policy: Optional[FetchPolicy]
27+
fetch_policy: Optional[FetchPolicyParam]
2728
"""Fetch policy.
2829
2930
Determines when to return content from the cache (faster) vs fetching live
@@ -50,29 +51,6 @@ class BetaExtractParams(TypedDict, total=False):
5051
Excerpts: TypeAlias = Union[bool, ExcerptSettingsParam]
5152

5253

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-
7654
class FullContentFullContentSettings(TypedDict, total=False):
7755
max_chars_per_result: Optional[int]
7856
"""
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
"""

0 commit comments

Comments
 (0)