Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.3.0"
".": "0.3.1"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 13
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-e853fc79f3b41f00b3934fcc2e4c2813aa9f38528548f5f596e2b11ea833019b.yml
openapi_spec_hash: 34ed7e373927037fce6fd33d9bb60389
config_hash: ae63572e3769dcd1b11e587f039e211a
config_hash: 49716a82995763fddc4308b0b302f1cb
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.3.1 (2025-10-21)

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

### Features

* **api:** manual updates ([0acbe77](https://github.com/parallel-web/parallel-sdk-python/commit/0acbe77da0148029c21e6b3c541e0b1ca163038d))

## 0.3.0 (2025-10-21)

Full Changelog: [v0.2.2...v0.3.0](https://github.com/parallel-web/parallel-sdk-python/compare/v0.2.2...v0.3.0)
Expand Down
1 change: 1 addition & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ from parallel.types.beta import (
ExtractError,
ExtractResponse,
ExtractResult,
FetchPolicy,
SearchResult,
WebSearchResult,
)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "parallel-web"
version = "0.3.0"
version = "0.3.1"
description = "The official Python library for the Parallel API"
dynamic = ["readme"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src/parallel/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "parallel"
__version__ = "0.3.0" # x-release-please-version
__version__ = "0.3.1" # x-release-please-version
5 changes: 3 additions & 2 deletions src/parallel/resources/beta/beta.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
from ..._base_client import make_request_options
from ...types.beta.search_result import SearchResult
from ...types.beta.extract_response import ExtractResponse
from ...types.beta.fetch_policy_param import FetchPolicyParam
from ...types.beta.parallel_beta_param import ParallelBetaParam
from ...types.shared_params.source_policy import SourcePolicy

Expand Down Expand Up @@ -76,7 +77,7 @@ def extract(
*,
urls: SequenceNotStr[str],
excerpts: beta_extract_params.Excerpts | Omit = omit,
fetch_policy: Optional[beta_extract_params.FetchPolicy] | Omit = omit,
fetch_policy: Optional[FetchPolicyParam] | Omit = omit,
full_content: beta_extract_params.FullContent | Omit = omit,
objective: Optional[str] | Omit = omit,
search_queries: Optional[SequenceNotStr[str]] | Omit = omit,
Expand Down Expand Up @@ -252,7 +253,7 @@ async def extract(
*,
urls: SequenceNotStr[str],
excerpts: beta_extract_params.Excerpts | Omit = omit,
fetch_policy: Optional[beta_extract_params.FetchPolicy] | Omit = omit,
fetch_policy: Optional[FetchPolicyParam] | Omit = omit,
full_content: beta_extract_params.FullContent | Omit = omit,
objective: Optional[str] | Omit = omit,
search_queries: Optional[SequenceNotStr[str]] | Omit = omit,
Expand Down
1 change: 1 addition & 0 deletions src/parallel/types/beta/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from .task_group_status import TaskGroupStatus as TaskGroupStatus
from .web_search_result import WebSearchResult as WebSearchResult
from .beta_search_params import BetaSearchParams as BetaSearchParams
from .fetch_policy_param import FetchPolicyParam as FetchPolicyParam
from .beta_extract_params import BetaExtractParams as BetaExtractParams
from .parallel_beta_param import ParallelBetaParam as ParallelBetaParam
from .beta_run_input_param import BetaRunInputParam as BetaRunInputParam
Expand Down
28 changes: 3 additions & 25 deletions src/parallel/types/beta/beta_extract_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@

from ..._types import SequenceNotStr
from ..._utils import PropertyInfo
from .fetch_policy_param import FetchPolicyParam
from .parallel_beta_param import ParallelBetaParam
from .excerpt_settings_param import ExcerptSettingsParam

__all__ = ["BetaExtractParams", "Excerpts", "FetchPolicy", "FullContent", "FullContentFullContentSettings"]
__all__ = ["BetaExtractParams", "Excerpts", "FullContent", "FullContentFullContentSettings"]


class BetaExtractParams(TypedDict, total=False):
Expand All @@ -23,7 +24,7 @@ class BetaExtractParams(TypedDict, total=False):
redundant with full content.
"""

fetch_policy: Optional[FetchPolicy]
fetch_policy: Optional[FetchPolicyParam]
"""Fetch policy.

Determines when to return content from the cache (faster) vs fetching live
Expand All @@ -50,29 +51,6 @@ class BetaExtractParams(TypedDict, total=False):
Excerpts: TypeAlias = Union[bool, ExcerptSettingsParam]


class FetchPolicy(TypedDict, total=False):
disable_cache_fallback: bool
"""
If false, fallback to cached content older than max-age if live fetch fails or
times out. If true, returns an error instead.
"""

max_age_seconds: Optional[int]
"""Maximum age of cached content in seconds to trigger a live fetch.

Minimum value 600 seconds (10 minutes). If not provided, a dynamic age policy
will be used based on the search objective and url.
"""

timeout_seconds: Optional[float]
"""Timeout in seconds for fetching live content if unavailable in cache.

If unspecified a dynamic timeout will be used based on the url, generally 15
seconds for simple pages and up to 60 seconds for complex pages requiring
javascript or PDF rendering.
"""


class FullContentFullContentSettings(TypedDict, total=False):
max_chars_per_result: Optional[int]
"""
Expand Down
31 changes: 31 additions & 0 deletions src/parallel/types/beta/fetch_policy_param.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing import Optional
from typing_extensions import TypedDict

__all__ = ["FetchPolicyParam"]


class FetchPolicyParam(TypedDict, total=False):
disable_cache_fallback: bool
"""
If false, fallback to cached content older than max-age if live fetch fails or
times out. If true, returns an error instead.
"""

max_age_seconds: Optional[int]
"""Maximum age of cached content in seconds to trigger a live fetch.

Minimum value 600 seconds (10 minutes). If not provided, a dynamic age policy
will be used based on the search objective and url.
"""

timeout_seconds: Optional[float]
"""Timeout in seconds for fetching live content if unavailable in cache.

If unspecified a dynamic timeout will be used based on the url, generally 15
seconds for simple pages and up to 60 seconds for complex pages requiring
javascript or PDF rendering.
"""
Loading