From 558822483f60eb430a795e0ee5c6ac780c5f56c1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 22 Nov 2025 03:15:51 +0000 Subject: [PATCH 01/18] chore: add Python 3.14 classifier and testing --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 8d35e5f..77e5c9b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: MacOS", From bafa464c3f124690387410b0d17bf8a1253e8e63 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 26 Nov 2025 00:03:49 +0000 Subject: [PATCH 02/18] feat(api): Update excerpt settings --- .stats.yml | 4 +- api.md | 3 +- src/parallel/resources/beta/beta.py | 36 +-- src/parallel/resources/beta/findall.py | 49 ++-- src/parallel/types/beta/__init__.py | 1 - .../types/beta/beta_extract_params.py | 6 +- src/parallel/types/beta/beta_search_params.py | 2 +- .../types/beta/beta_task_run_result.py | 14 +- src/parallel/types/beta/error_event.py | 2 +- .../types/beta/excerpt_settings_param.py | 10 +- .../findall_candidate_match_status_event.py | 6 +- .../types/beta/findall_create_params.py | 7 +- .../types/beta/findall_enrich_input.py | 2 +- .../types/beta/findall_enrich_params.py | 2 +- .../types/beta/findall_retrieve_response.py | 262 ------------------ src/parallel/types/beta/findall_run.py | 10 +- src/parallel/types/beta/findall_run_result.py | 2 +- .../types/beta/findall_run_status_event.py | 2 +- .../beta/findall_schema_updated_event.py | 2 +- .../types/beta/parallel_beta_param.py | 1 + src/parallel/types/beta/task_group.py | 2 +- .../types/beta/task_group_events_response.py | 2 +- .../types/beta/task_group_run_response.py | 2 +- src/parallel/types/beta/task_run_event.py | 2 +- .../types/beta/task_run_events_response.py | 2 +- src/parallel/types/shared/error_response.py | 2 +- src/parallel/types/task_run_json_output.py | 6 +- src/parallel/types/task_run_result.py | 2 +- tests/api_resources/beta/test_findall.py | 17 +- tests/api_resources/test_beta.py | 20 +- 30 files changed, 115 insertions(+), 365 deletions(-) delete mode 100644 src/parallel/types/beta/findall_retrieve_response.py diff --git a/.stats.yml b/.stats.yml index 49c5eaf..8098562 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 22 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-70ca78f3dbacd1f8145c633b64c2d9eec9f390db6110ce98705427248a22f19f.yml -openapi_spec_hash: 877617cbe6e7a48410632dbb57ff5488 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-e6afa27fc86492ffa6ee5f929f2d1eb8166750c3a9652a393aede2ca467c49ef.yml +openapi_spec_hash: 12e9b47405451f5286c199d7ee26c3cc config_hash: 6a16116c579cf9a3739083c24b10534d diff --git a/api.md b/api.md index f5f5456..d22709d 100644 --- a/api.md +++ b/api.md @@ -119,7 +119,6 @@ from parallel.types.beta import ( FindallSchema, FindallSchemaUpdatedEvent, IngestInput, - FindallRetrieveResponse, FindallEventsResponse, ) ``` @@ -127,7 +126,7 @@ from parallel.types.beta import ( Methods: - client.beta.findall.create(\*\*params) -> FindallRun -- client.beta.findall.retrieve(findall_id) -> FindallRetrieveResponse +- client.beta.findall.retrieve(findall_id) -> FindallRun - client.beta.findall.cancel(findall_id) -> object - client.beta.findall.enrich(findall_id, \*\*params) -> FindallSchema - client.beta.findall.events(findall_id, \*\*params) -> FindallEventsResponse diff --git a/src/parallel/resources/beta/beta.py b/src/parallel/resources/beta/beta.py index ae9279c..c719dcb 100644 --- a/src/parallel/resources/beta/beta.py +++ b/src/parallel/resources/beta/beta.py @@ -90,12 +90,12 @@ def extract( self, *, urls: SequenceNotStr[str], + betas: List[ParallelBetaParam], excerpts: beta_extract_params.Excerpts | 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, - betas: List[ParallelBetaParam] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -110,6 +110,8 @@ def extract( `search-extract-2025-10-10`. Args: + betas: Optional header to specify the beta version(s) to enable. + excerpts: Include excerpts from each URL relevant to the search objective and queries. Note that if neither objective nor search_queries is provided, excerpts are redundant with full content. @@ -123,8 +125,6 @@ def extract( search_queries: If provided, focuses extracted content on the specified keyword search queries. - betas: Optional header to specify the beta version(s) to enable. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -134,16 +134,10 @@ def extract( timeout: Override the client-level default timeout for this request, in seconds """ extra_headers = { - **strip_not_given( - { - "parallel-beta": ",".join(chain((str(e) for e in betas), ["search-extract-2025-10-10"])) - if is_given(betas) - else not_given - } - ), + "parallel-beta": ",".join(chain((str(e) for e in betas), ["search-extract-2025-10-10"])), **(extra_headers or {}), } - extra_headers = {"parallel-beta": "search-extract-2025-10-10", **(extra_headers or {})} + extra_headers.update({"parallel-beta": "search-extract-2025-10-10"}) return self._post( "/v1beta/extract", body=maybe_transform( @@ -190,7 +184,7 @@ def search( `search-extract-2025-10-10`. Args: - excerpts: Optional settings for returning relevant excerpts. + excerpts: Optional settings to configure excerpt generation. fetch_policy: Policy for live fetching web results. @@ -298,12 +292,12 @@ async def extract( self, *, urls: SequenceNotStr[str], + betas: List[ParallelBetaParam], excerpts: beta_extract_params.Excerpts | 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, - betas: List[ParallelBetaParam] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -318,6 +312,8 @@ async def extract( `search-extract-2025-10-10`. Args: + betas: Optional header to specify the beta version(s) to enable. + excerpts: Include excerpts from each URL relevant to the search objective and queries. Note that if neither objective nor search_queries is provided, excerpts are redundant with full content. @@ -331,8 +327,6 @@ async def extract( search_queries: If provided, focuses extracted content on the specified keyword search queries. - betas: Optional header to specify the beta version(s) to enable. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -342,16 +336,10 @@ async def extract( timeout: Override the client-level default timeout for this request, in seconds """ extra_headers = { - **strip_not_given( - { - "parallel-beta": ",".join(chain((str(e) for e in betas), ["search-extract-2025-10-10"])) - if is_given(betas) - else not_given - } - ), + "parallel-beta": ",".join(chain((str(e) for e in betas), ["search-extract-2025-10-10"])), **(extra_headers or {}), } - extra_headers = {"parallel-beta": "search-extract-2025-10-10", **(extra_headers or {})} + extra_headers.update({"parallel-beta": "search-extract-2025-10-10"}) return await self._post( "/v1beta/extract", body=await async_maybe_transform( @@ -398,7 +386,7 @@ async def search( `search-extract-2025-10-10`. Args: - excerpts: Optional settings for returning relevant excerpts. + excerpts: Optional settings to configure excerpt generation. fetch_policy: Policy for live fetching web results. diff --git a/src/parallel/resources/beta/findall.py b/src/parallel/resources/beta/findall.py index 2be0889..dd87494 100644 --- a/src/parallel/resources/beta/findall.py +++ b/src/parallel/resources/beta/findall.py @@ -35,7 +35,6 @@ from ...types.beta.findall_run_result import FindallRunResult from ...types.beta.parallel_beta_param import ParallelBetaParam from ...types.beta.findall_events_response import FindallEventsResponse -from ...types.beta.findall_retrieve_response import FindallRetrieveResponse __all__ = ["FindallResource", "AsyncFindallResource"] @@ -96,11 +95,12 @@ def create( Args: entity_type: Type of the entity for the FindAll run. - generator: Generator for the FindAll run. + generator: Generator for the FindAll run. One of base, core, pro, preview. match_conditions: List of match conditions for the FindAll run. - match_limit: Maximum number of matches to find for this FindAll run. + match_limit: Maximum number of matches to find for this FindAll run. Must be between 5 and + 1000 (inclusive). objective: Natural language objective of the FindAll run. @@ -163,7 +163,7 @@ def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> FindallRetrieveResponse: + ) -> FindallRun: """ Retrieve a FindAll run. @@ -191,17 +191,12 @@ def retrieve( **(extra_headers or {}), } extra_headers = {"parallel-beta": "findall-2025-02-01", **(extra_headers or {})} - return cast( - FindallRetrieveResponse, - self._get( - f"/v1beta/findall/runs/{findall_id}", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=cast( - Any, FindallRetrieveResponse - ), # Union types cannot be passed in as arguments in the type system + return self._get( + f"/v1beta/findall/runs/{findall_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), + cast_to=FindallRun, ) def cancel( @@ -270,7 +265,7 @@ def enrich( Add an enrichment to a FindAll run. Args: - output_schema: JSON schema for a task input or output. + output_schema: JSON schema for the enrichment output schema for the FindAll run. mcp_servers: List of MCP servers to use for the task. @@ -641,11 +636,12 @@ async def create( Args: entity_type: Type of the entity for the FindAll run. - generator: Generator for the FindAll run. + generator: Generator for the FindAll run. One of base, core, pro, preview. match_conditions: List of match conditions for the FindAll run. - match_limit: Maximum number of matches to find for this FindAll run. + match_limit: Maximum number of matches to find for this FindAll run. Must be between 5 and + 1000 (inclusive). objective: Natural language objective of the FindAll run. @@ -708,7 +704,7 @@ async def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> FindallRetrieveResponse: + ) -> FindallRun: """ Retrieve a FindAll run. @@ -736,17 +732,12 @@ async def retrieve( **(extra_headers or {}), } extra_headers = {"parallel-beta": "findall-2025-02-01", **(extra_headers or {})} - return cast( - FindallRetrieveResponse, - await self._get( - f"/v1beta/findall/runs/{findall_id}", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=cast( - Any, FindallRetrieveResponse - ), # Union types cannot be passed in as arguments in the type system + return await self._get( + f"/v1beta/findall/runs/{findall_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), + cast_to=FindallRun, ) async def cancel( @@ -815,7 +806,7 @@ async def enrich( Add an enrichment to a FindAll run. Args: - output_schema: JSON schema for a task input or output. + output_schema: JSON schema for the enrichment output schema for the FindAll run. mcp_servers: List of MCP servers to use for the task. diff --git a/src/parallel/types/beta/__init__.py b/src/parallel/types/beta/__init__.py index 1ef2fe2..e445ba2 100644 --- a/src/parallel/types/beta/__init__.py +++ b/src/parallel/types/beta/__init__.py @@ -42,7 +42,6 @@ from .task_group_create_params import TaskGroupCreateParams as TaskGroupCreateParams from .task_group_events_params import TaskGroupEventsParams as TaskGroupEventsParams from .task_run_events_response import TaskRunEventsResponse as TaskRunEventsResponse -from .findall_retrieve_response import FindallRetrieveResponse as FindallRetrieveResponse from .task_group_add_runs_params import TaskGroupAddRunsParams as TaskGroupAddRunsParams from .task_group_events_response import TaskGroupEventsResponse as TaskGroupEventsResponse from .task_group_get_runs_params import TaskGroupGetRunsParams as TaskGroupGetRunsParams diff --git a/src/parallel/types/beta/beta_extract_params.py b/src/parallel/types/beta/beta_extract_params.py index 965fe63..3dd62d6 100644 --- a/src/parallel/types/beta/beta_extract_params.py +++ b/src/parallel/types/beta/beta_extract_params.py @@ -17,6 +17,9 @@ class BetaExtractParams(TypedDict, total=False): urls: Required[SequenceNotStr[str]] + betas: Required[Annotated[List[ParallelBetaParam], PropertyInfo(alias="parallel-beta")]] + """Optional header to specify the beta version(s) to enable.""" + excerpts: Excerpts """Include excerpts from each URL relevant to the search objective and queries. @@ -40,9 +43,6 @@ class BetaExtractParams(TypedDict, total=False): search_queries: Optional[SequenceNotStr[str]] """If provided, focuses extracted content on the specified keyword search queries.""" - betas: Annotated[List[ParallelBetaParam], PropertyInfo(alias="parallel-beta")] - """Optional header to specify the beta version(s) to enable.""" - Excerpts: TypeAlias = Union[bool, ExcerptSettingsParam] diff --git a/src/parallel/types/beta/beta_search_params.py b/src/parallel/types/beta/beta_search_params.py index 661e588..58a8874 100644 --- a/src/parallel/types/beta/beta_search_params.py +++ b/src/parallel/types/beta/beta_search_params.py @@ -17,7 +17,7 @@ class BetaSearchParams(TypedDict, total=False): excerpts: ExcerptSettingsParam - """Optional settings for returning relevant excerpts.""" + """Optional settings to configure excerpt generation.""" fetch_policy: Optional[FetchPolicyParam] """Policy for live fetching web results.""" diff --git a/src/parallel/types/beta/beta_task_run_result.py b/src/parallel/types/beta/beta_task_run_result.py index 3db1c50..ede91b9 100644 --- a/src/parallel/types/beta/beta_task_run_result.py +++ b/src/parallel/types/beta/beta_task_run_result.py @@ -14,7 +14,11 @@ class OutputBetaTaskRunTextOutput(BaseModel): basis: List[FieldBasis] - """Basis for the output.""" + """Basis for the output. + + To include per-list-element basis entries, send the `parallel-beta` header with + the value `field-basis-2025-11-25` when creating the run. + """ content: str """Text output from the task.""" @@ -34,7 +38,11 @@ class OutputBetaTaskRunTextOutput(BaseModel): class OutputBetaTaskRunJsonOutput(BaseModel): basis: List[FieldBasis] - """Basis for the output.""" + """Basis for the output. + + To include per-list-element basis entries, send the `parallel-beta` header with + the value `field-basis-2025-11-25` when creating the run. + """ content: Dict[str, object] """ @@ -71,4 +79,4 @@ class BetaTaskRunResult(BaseModel): """Output from the task conforming to the output schema.""" run: TaskRun - """Status of a task run.""" + """Beta task run object with status 'completed'.""" diff --git a/src/parallel/types/beta/error_event.py b/src/parallel/types/beta/error_event.py index aefa872..90e4da5 100644 --- a/src/parallel/types/beta/error_event.py +++ b/src/parallel/types/beta/error_event.py @@ -10,7 +10,7 @@ class ErrorEvent(BaseModel): error: ErrorObject - """An error message.""" + """Error.""" type: Literal["error"] """Event type; always 'error'.""" diff --git a/src/parallel/types/beta/excerpt_settings_param.py b/src/parallel/types/beta/excerpt_settings_param.py index 1a07f80..52d2abe 100644 --- a/src/parallel/types/beta/excerpt_settings_param.py +++ b/src/parallel/types/beta/excerpt_settings_param.py @@ -13,5 +13,13 @@ class ExcerptSettingsParam(TypedDict, total=False): """Optional upper bound on the total number of characters to include per url. Excerpts may contain fewer characters than this limit to maximize relevance and - token efficiency. + token efficiency, but will never contain fewer than 1000 characters per result. + """ + + max_chars_total: Optional[int] + """ + Optional upper bound on the total number of characters to include across all + urls. Results may contain fewer characters than this limit to maximize relevance + and token efficiency, but will never contain fewer than 1000 characters per + result.This overall limit applies in addition to max_chars_per_result. """ diff --git a/src/parallel/types/beta/findall_candidate_match_status_event.py b/src/parallel/types/beta/findall_candidate_match_status_event.py index 9133376..590fec4 100644 --- a/src/parallel/types/beta/findall_candidate_match_status_event.py +++ b/src/parallel/types/beta/findall_candidate_match_status_event.py @@ -42,11 +42,7 @@ class Data(BaseModel): class FindallCandidateMatchStatusEvent(BaseModel): data: Data - """Candidate for a find all run that may end up as a match. - - Contains all the candidate's metadata and the output of the match conditions. A - candidate is a match if all match conditions are satisfied. - """ + """The candidate whose match status has been updated.""" event_id: str """Unique event identifier for the event.""" diff --git a/src/parallel/types/beta/findall_create_params.py b/src/parallel/types/beta/findall_create_params.py index ee618cf..780f17e 100644 --- a/src/parallel/types/beta/findall_create_params.py +++ b/src/parallel/types/beta/findall_create_params.py @@ -17,13 +17,16 @@ class FindallCreateParams(TypedDict, total=False): """Type of the entity for the FindAll run.""" generator: Required[Literal["base", "core", "pro", "preview"]] - """Generator for the FindAll run.""" + """Generator for the FindAll run. One of base, core, pro, preview.""" match_conditions: Required[Iterable[MatchCondition]] """List of match conditions for the FindAll run.""" match_limit: Required[int] - """Maximum number of matches to find for this FindAll run.""" + """Maximum number of matches to find for this FindAll run. + + Must be between 5 and 1000 (inclusive). + """ objective: Required[str] """Natural language objective of the FindAll run.""" diff --git a/src/parallel/types/beta/findall_enrich_input.py b/src/parallel/types/beta/findall_enrich_input.py index 6b84ea8..fc6a13f 100644 --- a/src/parallel/types/beta/findall_enrich_input.py +++ b/src/parallel/types/beta/findall_enrich_input.py @@ -11,7 +11,7 @@ class FindallEnrichInput(BaseModel): output_schema: JsonSchema - """JSON schema for a task input or output.""" + """JSON schema for the enrichment output schema for the FindAll run.""" mcp_servers: Optional[List[McpServer]] = None """List of MCP servers to use for the task.""" diff --git a/src/parallel/types/beta/findall_enrich_params.py b/src/parallel/types/beta/findall_enrich_params.py index 22860fe..e463d2b 100644 --- a/src/parallel/types/beta/findall_enrich_params.py +++ b/src/parallel/types/beta/findall_enrich_params.py @@ -15,7 +15,7 @@ class FindallEnrichParams(TypedDict, total=False): output_schema: Required[JsonSchemaParam] - """JSON schema for a task input or output.""" + """JSON schema for the enrichment output schema for the FindAll run.""" mcp_servers: Optional[Iterable[McpServerParam]] """List of MCP servers to use for the task.""" diff --git a/src/parallel/types/beta/findall_retrieve_response.py b/src/parallel/types/beta/findall_retrieve_response.py deleted file mode 100644 index bbdef51..0000000 --- a/src/parallel/types/beta/findall_retrieve_response.py +++ /dev/null @@ -1,262 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Union, Optional -from typing_extensions import Literal, TypeAlias - -from ..._models import BaseModel -from .findall_run import FindallRun - -__all__ = [ - "FindallRetrieveResponse", - "FindAllPollResponse", - "FindAllPollResponseBillingMetrics", - "FindAllPollResponseCandidate", - "FindAllPollResponseEnrichment", - "FindAllPollResponseFilter", - "FindAllPollResponseResult", - "FindAllPollResponseResultEnrichmentResult", - "FindAllPollResponseResultEnrichmentResultEnhancedCitation", - "FindAllPollResponseResultFilterResult", - "FindAllPollResponseResultFilterResultEnhancedCitation", - "FindAllPollResponseSpec", - "FindAllPollResponseSpecColumn", - "FindAllPollResponseStep", - "FindAllPollResponseEnrichmentRecommendation", -] - - -class FindAllPollResponseBillingMetrics(BaseModel): - enrichment_cells: int - """Number of enrichment cells processed""" - - rows_processed: int - """Number of rows processed""" - - cost_mode: Optional[Literal["lite", "base", "pro", "preview"]] = None - - -class FindAllPollResponseCandidate(BaseModel): - entity_id: str - """Unique entity identifier""" - - name: str - """Entity name""" - - -class FindAllPollResponseEnrichment(BaseModel): - description: str - """Human-readable description of the column""" - - name: str - """Column identifier""" - - type: str - """Column type ('enrichment' or 'filter')""" - - status: Optional[str] = None - """Status of the column ('running', 'done', 'failed')""" - - -class FindAllPollResponseFilter(BaseModel): - description: str - """Human-readable description of the column""" - - name: str - """Column identifier""" - - type: str - """Column type ('enrichment' or 'filter')""" - - status: Optional[str] = None - """Status of the column ('running', 'done', 'failed')""" - - -class FindAllPollResponseResultEnrichmentResultEnhancedCitation(BaseModel): - url: str - """Citation URL""" - - excerpts: Optional[List[str]] = None - """List of relevant excerpts from the cited page""" - - title: Optional[str] = None - """Title of the cited page""" - - -class FindAllPollResponseResultEnrichmentResult(BaseModel): - key: str - """Name of column""" - - value: str - """Result of column""" - - citations: Optional[str] = None - """Space separated list of citation urls""" - - confidence: Optional[str] = None - """Confidence score (e.g. 'high', 'medium', 'low')""" - - enhanced_citations: Optional[List[FindAllPollResponseResultEnrichmentResultEnhancedCitation]] = None - """List of enhanced citations with title and excerpts""" - - reasoning: Optional[str] = None - """Reasoning behind the value""" - - -class FindAllPollResponseResultFilterResultEnhancedCitation(BaseModel): - url: str - """Citation URL""" - - excerpts: Optional[List[str]] = None - """List of relevant excerpts from the cited page""" - - title: Optional[str] = None - """Title of the cited page""" - - -class FindAllPollResponseResultFilterResult(BaseModel): - key: str - """Name of column""" - - value: str - """Result of column""" - - citations: Optional[str] = None - """Space separated list of citation urls""" - - confidence: Optional[str] = None - """Confidence score (e.g. 'high', 'medium', 'low')""" - - enhanced_citations: Optional[List[FindAllPollResponseResultFilterResultEnhancedCitation]] = None - """List of enhanced citations with title and excerpts""" - - reasoning: Optional[str] = None - """Reasoning behind the value""" - - -class FindAllPollResponseResult(BaseModel): - entity_id: str - """Unique entity identifier""" - - name: str - """Entity name""" - - description: Optional[str] = None - """Entity description if available""" - - enrichment_results: Optional[List[FindAllPollResponseResultEnrichmentResult]] = None - """List of enrichment results""" - - filter_results: Optional[List[FindAllPollResponseResultFilterResult]] = None - """List of filter results""" - - score: Optional[float] = None - """Confidence score (positive real number)""" - - url: Optional[str] = None - """Entity URL if available""" - - -class FindAllPollResponseSpecColumn(BaseModel): - description: str - """Human-readable description of the column""" - - name: str - """Column identifier""" - - type: str - """Column type ('enrichment' or 'filter')""" - - status: Optional[str] = None - """Status of the column ('running', 'done', 'failed')""" - - -class FindAllPollResponseSpec(BaseModel): - columns: List[FindAllPollResponseSpecColumn] - """List of columns in the view""" - - name: str - """Name of the view""" - - -class FindAllPollResponseStep(BaseModel): - description: str - """Human-readable description of the step""" - - name: str - """Step identifier""" - - status: str - """Current status of the step""" - - -class FindAllPollResponseEnrichmentRecommendation(BaseModel): - column_name: str - """Recommended column name""" - - description: str - """Description of the recommended enrichment""" - - recommendation_run_id: str - """Run ID that generated this recommendation""" - - recommendation_task_id: str - """Task ID that generated this recommendation""" - - -class FindAllPollResponse(BaseModel): - billing_metrics: FindAllPollResponseBillingMetrics - """Billing metrics for the run.""" - - candidates: List[FindAllPollResponseCandidate] - """List of candidates being processed""" - - enrichments: List[FindAllPollResponseEnrichment] - """List of enrichments derived from the query""" - - filters: List[FindAllPollResponseFilter] - """List of filters derived from the query""" - - is_active: bool - """True if the run is still processing candidates""" - - max_results: int - """Max results processed for the run""" - - query: str - """Query for the run""" - - results: List[FindAllPollResponseResult] - """List of entities which are fully processed""" - - spec: FindAllPollResponseSpec - """View model for the run.""" - - status: str - """Derived overall status (e.g., 'running', 'completed', 'failed')""" - - steps: List[FindAllPollResponseStep] - """List of processing steps undertaken with their status""" - - title: str - """Title of the run""" - - are_enrichments_active: Optional[bool] = None - """True if enrichments are still being processed""" - - created_at: Optional[str] = None - """Timestamp of the request""" - - enrichment_recommendations: Optional[List[FindAllPollResponseEnrichmentRecommendation]] = None - """List of recommended enrichments that could be added""" - - modified_at: Optional[str] = None - """Timestamp of the last status update""" - - pages_considered: Optional[int] = None - """Number of web pages considered for this entity""" - - pages_read: Optional[int] = None - """Number of web pages read for this entity""" - - -FindallRetrieveResponse: TypeAlias = Union[FindallRun, FindAllPollResponse] diff --git a/src/parallel/types/beta/findall_run.py b/src/parallel/types/beta/findall_run.py index e5e61f7..7264227 100644 --- a/src/parallel/types/beta/findall_run.py +++ b/src/parallel/types/beta/findall_run.py @@ -21,12 +21,16 @@ class Status(BaseModel): """Whether the FindAll run is active""" metrics: StatusMetrics - """Metrics object for FindAll run.""" + """Candidate metrics for the FindAll run.""" status: Literal["queued", "action_required", "running", "completed", "failed", "cancelling", "cancelled"] """Status of the FindAll run.""" - termination_reason: Optional[str] = None + termination_reason: Optional[ + Literal[ + "low_match_rate", "match_limit_met", "candidates_exhausted", "user_cancelled", "error_occurred", "timeout" + ] + ] = None """Reason for termination when FindAll run is in terminal status.""" @@ -38,7 +42,7 @@ class FindallRun(BaseModel): """Generator for the FindAll run.""" status: Status - """Status object for FindAll run.""" + """Status object for the FindAll run.""" created_at: Optional[str] = None """Timestamp of the creation of the run, in RFC 3339 format.""" diff --git a/src/parallel/types/beta/findall_run_result.py b/src/parallel/types/beta/findall_run_result.py index b738459..4265765 100644 --- a/src/parallel/types/beta/findall_run_result.py +++ b/src/parallel/types/beta/findall_run_result.py @@ -45,7 +45,7 @@ class FindallRunResult(BaseModel): """All evaluated candidates at the time of the snapshot.""" run: FindallRun - """FindAll run object with status and metadata.""" + """FindAll run object.""" last_event_id: Optional[str] = None """ID of the last event of the run at the time of the request. diff --git a/src/parallel/types/beta/findall_run_status_event.py b/src/parallel/types/beta/findall_run_status_event.py index a39be11..8ca47fe 100644 --- a/src/parallel/types/beta/findall_run_status_event.py +++ b/src/parallel/types/beta/findall_run_status_event.py @@ -11,7 +11,7 @@ class FindallRunStatusEvent(BaseModel): data: FindallRun - """FindAll run object with status and metadata.""" + """Updated FindAll run information.""" event_id: str """Unique event identifier for the event.""" diff --git a/src/parallel/types/beta/findall_schema_updated_event.py b/src/parallel/types/beta/findall_schema_updated_event.py index 1d56d56..6401e21 100644 --- a/src/parallel/types/beta/findall_schema_updated_event.py +++ b/src/parallel/types/beta/findall_schema_updated_event.py @@ -11,7 +11,7 @@ class FindallSchemaUpdatedEvent(BaseModel): data: FindallSchema - """Response model for FindAll ingest.""" + """Updated FindAll schema.""" event_id: str """Unique event identifier for the event.""" diff --git a/src/parallel/types/beta/parallel_beta_param.py b/src/parallel/types/beta/parallel_beta_param.py index e723503..03e848e 100644 --- a/src/parallel/types/beta/parallel_beta_param.py +++ b/src/parallel/types/beta/parallel_beta_param.py @@ -14,6 +14,7 @@ "webhook-2025-08-12", "findall-2025-09-15", "search-extract-2025-10-10", + "field-basis-2025-11-25", ], str, ] diff --git a/src/parallel/types/beta/task_group.py b/src/parallel/types/beta/task_group.py index 247bddb..67c0695 100644 --- a/src/parallel/types/beta/task_group.py +++ b/src/parallel/types/beta/task_group.py @@ -15,7 +15,7 @@ class TaskGroup(BaseModel): """Timestamp of the creation of the group, as an RFC 3339 string.""" status: TaskGroupStatus - """Status of a task group.""" + """Status of the group.""" task_group_id: str = FieldInfo(alias="taskgroup_id") """ID of the group.""" diff --git a/src/parallel/types/beta/task_group_events_response.py b/src/parallel/types/beta/task_group_events_response.py index cbb6522..182f855 100644 --- a/src/parallel/types/beta/task_group_events_response.py +++ b/src/parallel/types/beta/task_group_events_response.py @@ -17,7 +17,7 @@ class TaskGroupStatusEvent(BaseModel): """Cursor to resume the event stream.""" status: TaskGroupStatus - """Status of a task group.""" + """Task group status object.""" type: Literal["task_group_status"] """Event type; always 'task_group_status'.""" diff --git a/src/parallel/types/beta/task_group_run_response.py b/src/parallel/types/beta/task_group_run_response.py index 98161bb..b5b464c 100644 --- a/src/parallel/types/beta/task_group_run_response.py +++ b/src/parallel/types/beta/task_group_run_response.py @@ -27,4 +27,4 @@ class TaskGroupRunResponse(BaseModel): """IDs of the newly created runs.""" status: TaskGroupStatus - """Status of a task group.""" + """Status of the group.""" diff --git a/src/parallel/types/beta/task_run_event.py b/src/parallel/types/beta/task_run_event.py index 7d809fe..007ec7c 100644 --- a/src/parallel/types/beta/task_run_event.py +++ b/src/parallel/types/beta/task_run_event.py @@ -20,7 +20,7 @@ class TaskRunEvent(BaseModel): """Cursor to resume the event stream. Always empty for non Task Group runs.""" run: TaskRun - """Status of a task run.""" + """Task run object.""" type: Literal["task_run.state"] """Event type; always 'task_run.state'.""" diff --git a/src/parallel/types/beta/task_run_events_response.py b/src/parallel/types/beta/task_run_events_response.py index e344ef1..e4e47d6 100644 --- a/src/parallel/types/beta/task_run_events_response.py +++ b/src/parallel/types/beta/task_run_events_response.py @@ -35,7 +35,7 @@ class TaskRunProgressStatsEvent(BaseModel): """ source_stats: TaskRunProgressStatsEventSourceStats - """Source stats for a task run.""" + """Source stats describing progress so far.""" type: Literal["task_run.progress_stats"] """Event type; always 'task_run.progress_stats'.""" diff --git a/src/parallel/types/shared/error_response.py b/src/parallel/types/shared/error_response.py index 4a72af6..0a0fa30 100644 --- a/src/parallel/types/shared/error_response.py +++ b/src/parallel/types/shared/error_response.py @@ -10,7 +10,7 @@ class ErrorResponse(BaseModel): error: ErrorObject - """An error message.""" + """Error.""" type: Literal["error"] """Always 'error'.""" diff --git a/src/parallel/types/task_run_json_output.py b/src/parallel/types/task_run_json_output.py index ee63e60..d8d78ac 100644 --- a/src/parallel/types/task_run_json_output.py +++ b/src/parallel/types/task_run_json_output.py @@ -11,7 +11,11 @@ class TaskRunJsonOutput(BaseModel): basis: List[FieldBasis] - """Basis for each top-level field in the JSON output.""" + """Basis for each top-level field in the JSON output. + + Per-list-element basis entries are available only when the + `parallel-beta: field-basis-2025-11-25` header is supplied. + """ content: Dict[str, object] """ diff --git a/src/parallel/types/task_run_result.py b/src/parallel/types/task_run_result.py index 087cdce..aaf1a95 100644 --- a/src/parallel/types/task_run_result.py +++ b/src/parallel/types/task_run_result.py @@ -49,4 +49,4 @@ class TaskRunResult(BaseModel): """Output from the task conforming to the output schema.""" run: TaskRun - """Status of a task run.""" + """Task run object with status 'completed'.""" diff --git a/tests/api_resources/beta/test_findall.py b/tests/api_resources/beta/test_findall.py index 4eacbca..2738d8d 100644 --- a/tests/api_resources/beta/test_findall.py +++ b/tests/api_resources/beta/test_findall.py @@ -13,7 +13,6 @@ FindallRun, FindallSchema, FindallRunResult, - FindallRetrieveResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -113,7 +112,7 @@ def test_method_retrieve(self, client: Parallel) -> None: findall = client.beta.findall.retrieve( findall_id="findall_id", ) - assert_matches_type(FindallRetrieveResponse, findall, path=["response"]) + assert_matches_type(FindallRun, findall, path=["response"]) @parametrize def test_method_retrieve_with_all_params(self, client: Parallel) -> None: @@ -121,7 +120,7 @@ def test_method_retrieve_with_all_params(self, client: Parallel) -> None: findall_id="findall_id", betas=["mcp-server-2025-07-17"], ) - assert_matches_type(FindallRetrieveResponse, findall, path=["response"]) + assert_matches_type(FindallRun, findall, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Parallel) -> None: @@ -132,7 +131,7 @@ def test_raw_response_retrieve(self, client: Parallel) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = response.parse() - assert_matches_type(FindallRetrieveResponse, findall, path=["response"]) + assert_matches_type(FindallRun, findall, path=["response"]) @parametrize def test_streaming_response_retrieve(self, client: Parallel) -> None: @@ -143,7 +142,7 @@ def test_streaming_response_retrieve(self, client: Parallel) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = response.parse() - assert_matches_type(FindallRetrieveResponse, findall, path=["response"]) + assert_matches_type(FindallRun, findall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -628,7 +627,7 @@ async def test_method_retrieve(self, async_client: AsyncParallel) -> None: findall = await async_client.beta.findall.retrieve( findall_id="findall_id", ) - assert_matches_type(FindallRetrieveResponse, findall, path=["response"]) + assert_matches_type(FindallRun, findall, path=["response"]) @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncParallel) -> None: @@ -636,7 +635,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncParallel findall_id="findall_id", betas=["mcp-server-2025-07-17"], ) - assert_matches_type(FindallRetrieveResponse, findall, path=["response"]) + assert_matches_type(FindallRun, findall, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncParallel) -> None: @@ -647,7 +646,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncParallel) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = await response.parse() - assert_matches_type(FindallRetrieveResponse, findall, path=["response"]) + assert_matches_type(FindallRun, findall, path=["response"]) @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncParallel) -> None: @@ -658,7 +657,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncParallel) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = await response.parse() - assert_matches_type(FindallRetrieveResponse, findall, path=["response"]) + assert_matches_type(FindallRun, findall, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_beta.py b/tests/api_resources/test_beta.py index 216a30f..e4f1632 100644 --- a/tests/api_resources/test_beta.py +++ b/tests/api_resources/test_beta.py @@ -24,6 +24,7 @@ class TestBeta: def test_method_extract(self, client: Parallel) -> None: beta = client.beta.extract( urls=["string"], + betas=["mcp-server-2025-07-17"], ) assert_matches_type(ExtractResponse, beta, path=["response"]) @@ -31,6 +32,7 @@ def test_method_extract(self, client: Parallel) -> None: def test_method_extract_with_all_params(self, client: Parallel) -> None: beta = client.beta.extract( urls=["string"], + betas=["mcp-server-2025-07-17"], excerpts=True, fetch_policy={ "disable_cache_fallback": True, @@ -40,7 +42,6 @@ def test_method_extract_with_all_params(self, client: Parallel) -> None: full_content=True, objective="objective", search_queries=["string"], - betas=["mcp-server-2025-07-17"], ) assert_matches_type(ExtractResponse, beta, path=["response"]) @@ -48,6 +49,7 @@ def test_method_extract_with_all_params(self, client: Parallel) -> None: def test_raw_response_extract(self, client: Parallel) -> None: response = client.beta.with_raw_response.extract( urls=["string"], + betas=["mcp-server-2025-07-17"], ) assert response.is_closed is True @@ -59,6 +61,7 @@ def test_raw_response_extract(self, client: Parallel) -> None: def test_streaming_response_extract(self, client: Parallel) -> None: with client.beta.with_streaming_response.extract( urls=["string"], + betas=["mcp-server-2025-07-17"], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -76,7 +79,10 @@ def test_method_search(self, client: Parallel) -> None: @parametrize def test_method_search_with_all_params(self, client: Parallel) -> None: beta = client.beta.search( - excerpts={"max_chars_per_result": 0}, + excerpts={ + "max_chars_per_result": 0, + "max_chars_total": 0, + }, fetch_policy={ "disable_cache_fallback": True, "max_age_seconds": 86400, @@ -126,6 +132,7 @@ class TestAsyncBeta: async def test_method_extract(self, async_client: AsyncParallel) -> None: beta = await async_client.beta.extract( urls=["string"], + betas=["mcp-server-2025-07-17"], ) assert_matches_type(ExtractResponse, beta, path=["response"]) @@ -133,6 +140,7 @@ async def test_method_extract(self, async_client: AsyncParallel) -> None: async def test_method_extract_with_all_params(self, async_client: AsyncParallel) -> None: beta = await async_client.beta.extract( urls=["string"], + betas=["mcp-server-2025-07-17"], excerpts=True, fetch_policy={ "disable_cache_fallback": True, @@ -142,7 +150,6 @@ async def test_method_extract_with_all_params(self, async_client: AsyncParallel) full_content=True, objective="objective", search_queries=["string"], - betas=["mcp-server-2025-07-17"], ) assert_matches_type(ExtractResponse, beta, path=["response"]) @@ -150,6 +157,7 @@ async def test_method_extract_with_all_params(self, async_client: AsyncParallel) async def test_raw_response_extract(self, async_client: AsyncParallel) -> None: response = await async_client.beta.with_raw_response.extract( urls=["string"], + betas=["mcp-server-2025-07-17"], ) assert response.is_closed is True @@ -161,6 +169,7 @@ async def test_raw_response_extract(self, async_client: AsyncParallel) -> None: async def test_streaming_response_extract(self, async_client: AsyncParallel) -> None: async with async_client.beta.with_streaming_response.extract( urls=["string"], + betas=["mcp-server-2025-07-17"], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -178,7 +187,10 @@ async def test_method_search(self, async_client: AsyncParallel) -> None: @parametrize async def test_method_search_with_all_params(self, async_client: AsyncParallel) -> None: beta = await async_client.beta.search( - excerpts={"max_chars_per_result": 0}, + excerpts={ + "max_chars_per_result": 0, + "max_chars_total": 0, + }, fetch_policy={ "disable_cache_fallback": True, "max_age_seconds": 86400, From 24c0c792c1807b6d4ebd54380cb698b244a95141 Mon Sep 17 00:00:00 2001 From: Kumar Saunack Date: Tue, 25 Nov 2025 16:12:20 -0800 Subject: [PATCH 03/18] add references for backwards compatibility --- src/parallel/types/beta/__init__.py | 1 + src/parallel/types/beta/findall_retrieve_response.py | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 src/parallel/types/beta/findall_retrieve_response.py diff --git a/src/parallel/types/beta/__init__.py b/src/parallel/types/beta/__init__.py index e445ba2..1ef2fe2 100644 --- a/src/parallel/types/beta/__init__.py +++ b/src/parallel/types/beta/__init__.py @@ -42,6 +42,7 @@ from .task_group_create_params import TaskGroupCreateParams as TaskGroupCreateParams from .task_group_events_params import TaskGroupEventsParams as TaskGroupEventsParams from .task_run_events_response import TaskRunEventsResponse as TaskRunEventsResponse +from .findall_retrieve_response import FindallRetrieveResponse as FindallRetrieveResponse from .task_group_add_runs_params import TaskGroupAddRunsParams as TaskGroupAddRunsParams from .task_group_events_response import TaskGroupEventsResponse as TaskGroupEventsResponse from .task_group_get_runs_params import TaskGroupGetRunsParams as TaskGroupGetRunsParams diff --git a/src/parallel/types/beta/findall_retrieve_response.py b/src/parallel/types/beta/findall_retrieve_response.py new file mode 100644 index 0000000..bad30d6 --- /dev/null +++ b/src/parallel/types/beta/findall_retrieve_response.py @@ -0,0 +1,4 @@ +from .findall_run import FindallRun + +# for backwards compatibility with v0.3.4 +FindallRetrieveResponse = FindallRun \ No newline at end of file From 325103322362df0fe730362841dbc0d4b3a60c18 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 28 Nov 2025 03:05:57 +0000 Subject: [PATCH 04/18] fix: ensure streams are always closed --- src/parallel/_streaming.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/parallel/_streaming.py b/src/parallel/_streaming.py index daf80c4..e65969e 100644 --- a/src/parallel/_streaming.py +++ b/src/parallel/_streaming.py @@ -54,11 +54,12 @@ def __stream__(self) -> Iterator[_T]: process_data = self._client._process_response_data iterator = self._iter_events() - for sse in iterator: - yield process_data(data=sse.json(), cast_to=cast_to, response=response) - - # As we might not fully consume the response stream, we need to close it explicitly - response.close() + try: + for sse in iterator: + yield process_data(data=sse.json(), cast_to=cast_to, response=response) + finally: + # Ensure the response is closed even if the consumer doesn't read all data + response.close() def __enter__(self) -> Self: return self @@ -117,11 +118,12 @@ async def __stream__(self) -> AsyncIterator[_T]: process_data = self._client._process_response_data iterator = self._iter_events() - async for sse in iterator: - yield process_data(data=sse.json(), cast_to=cast_to, response=response) - - # As we might not fully consume the response stream, we need to close it explicitly - await response.aclose() + try: + async for sse in iterator: + yield process_data(data=sse.json(), cast_to=cast_to, response=response) + finally: + # Ensure the response is closed even if the consumer doesn't read all data + await response.aclose() async def __aenter__(self) -> Self: return self From e327c6e2ba27b3dd565c3f36537643889b4c43e8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 28 Nov 2025 03:07:02 +0000 Subject: [PATCH 05/18] chore(deps): mypy 1.18.1 has a regression, pin to 1.17 --- pyproject.toml | 2 +- requirements-dev.lock | 4 +++- requirements.lock | 8 ++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 77e5c9b..3d6313c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,7 @@ managed = true # version pins are in requirements-dev.lock dev-dependencies = [ "pyright==1.1.399", - "mypy", + "mypy==1.17", "respx", "pytest", "pytest-asyncio", diff --git a/requirements-dev.lock b/requirements-dev.lock index 6192af5..b7429fa 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -75,7 +75,7 @@ mdurl==0.1.2 multidict==6.4.4 # via aiohttp # via yarl -mypy==1.14.1 +mypy==1.17.0 mypy-extensions==1.0.0 # via mypy nodeenv==1.8.0 @@ -84,6 +84,8 @@ nox==2023.4.22 packaging==23.2 # via nox # via pytest +pathspec==0.12.1 + # via mypy platformdirs==3.11.0 # via virtualenv pluggy==1.5.0 diff --git a/requirements.lock b/requirements.lock index dfc4717..89e97a9 100644 --- a/requirements.lock +++ b/requirements.lock @@ -55,21 +55,21 @@ multidict==6.4.4 propcache==0.3.1 # via aiohttp # via yarl -pydantic==2.11.9 +pydantic==2.12.5 # via parallel-web -pydantic-core==2.33.2 +pydantic-core==2.41.5 # via pydantic sniffio==1.3.0 # via anyio # via parallel-web -typing-extensions==4.12.2 +typing-extensions==4.15.0 # via anyio # via multidict # via parallel-web # via pydantic # via pydantic-core # via typing-inspection -typing-inspection==0.4.1 +typing-inspection==0.4.2 # via pydantic yarl==1.20.0 # via aiohttp From 37bb7a6d321646946f52d37455fc5ad1a2458154 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 3 Dec 2025 03:34:48 +0000 Subject: [PATCH 06/18] chore: update lockfile --- pyproject.toml | 14 +++--- requirements-dev.lock | 110 +++++++++++++++++++++++------------------- requirements.lock | 31 ++++++------ 3 files changed, 84 insertions(+), 71 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3d6313c..125393b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,14 +7,16 @@ license = "MIT" authors = [ { name = "Parallel", email = "support@parallel.ai" }, ] + dependencies = [ - "httpx>=0.23.0, <1", - "pydantic>=1.9.0, <3", - "typing-extensions>=4.10, <5", - "anyio>=3.5.0, <5", - "distro>=1.7.0, <2", - "sniffio", + "httpx>=0.23.0, <1", + "pydantic>=1.9.0, <3", + "typing-extensions>=4.10, <5", + "anyio>=3.5.0, <5", + "distro>=1.7.0, <2", + "sniffio", ] + requires-python = ">= 3.9" classifiers = [ "Typing :: Typed", diff --git a/requirements-dev.lock b/requirements-dev.lock index b7429fa..6b24ce1 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -12,45 +12,50 @@ -e file:. aiohappyeyeballs==2.6.1 # via aiohttp -aiohttp==3.12.8 +aiohttp==3.13.2 # via httpx-aiohttp # via parallel-web -aiosignal==1.3.2 +aiosignal==1.4.0 # via aiohttp -annotated-types==0.6.0 +annotated-types==0.7.0 # via pydantic -anyio==4.4.0 +anyio==4.12.0 # via httpx # via parallel-web -argcomplete==3.1.2 +argcomplete==3.6.3 # via nox async-timeout==5.0.1 # via aiohttp -attrs==25.3.0 +attrs==25.4.0 # via aiohttp -certifi==2023.7.22 + # via nox +backports-asyncio-runner==1.2.0 + # via pytest-asyncio +certifi==2025.11.12 # via httpcore # via httpx colorama==0.4.6 # via griffe -colorlog==6.7.0 +colorlog==6.10.1 + # via nox +dependency-groups==1.3.1 # via nox -dirty-equals==0.6.0 -distlib==0.3.7 +dirty-equals==0.11 +distlib==0.4.0 # via virtualenv -distro==1.8.0 +distro==1.9.0 # via parallel-web -exceptiongroup==1.2.2 +exceptiongroup==1.3.1 # via anyio # via pytest -execnet==2.1.1 +execnet==2.1.2 # via pytest-xdist -filelock==3.12.4 +filelock==3.19.1 # via virtualenv -frozenlist==1.6.2 +frozenlist==1.8.0 # via aiohttp # via aiosignal -griffe==1.13.0 +griffe==1.14.0 h11==0.16.0 # via httpcore httpcore==1.0.9 @@ -61,82 +66,87 @@ httpx==0.28.1 # via respx httpx-aiohttp==0.1.9 # via parallel-web -idna==3.4 +humanize==4.13.0 + # via nox +idna==3.11 # via anyio # via httpx # via yarl -importlib-metadata==7.0.0 -iniconfig==2.0.0 +importlib-metadata==8.7.0 +iniconfig==2.1.0 # via pytest markdown-it-py==3.0.0 # via rich mdurl==0.1.2 # via markdown-it-py -multidict==6.4.4 +multidict==6.7.0 # via aiohttp # via yarl mypy==1.17.0 -mypy-extensions==1.0.0 +mypy-extensions==1.1.0 # via mypy -nodeenv==1.8.0 +nodeenv==1.9.1 # via pyright -nox==2023.4.22 -packaging==23.2 +nox==2025.11.12 +packaging==25.0 + # via dependency-groups # via nox # via pytest pathspec==0.12.1 # via mypy -platformdirs==3.11.0 +platformdirs==4.4.0 # via virtualenv -pluggy==1.5.0 +pluggy==1.6.0 # via pytest -propcache==0.3.1 +propcache==0.4.1 # via aiohttp # via yarl -pydantic==2.11.9 +pydantic==2.12.5 # via parallel-web -pydantic-core==2.33.2 +pydantic-core==2.41.5 # via pydantic -pygments==2.18.0 +pygments==2.19.2 + # via pytest # via rich pyright==1.1.399 -pytest==8.3.3 +pytest==8.4.2 # via pytest-asyncio # via pytest-xdist -pytest-asyncio==0.24.0 -pytest-xdist==3.7.0 -python-dateutil==2.8.2 +pytest-asyncio==1.2.0 +pytest-xdist==3.8.0 +python-dateutil==2.9.0.post0 # via time-machine -pytz==2023.3.post1 - # via dirty-equals respx==0.22.0 -rich==13.7.1 -ruff==0.9.4 -setuptools==68.2.2 - # via nodeenv -six==1.16.0 +rich==14.2.0 +ruff==0.14.7 +six==1.17.0 # via python-dateutil -sniffio==1.3.0 - # via anyio +sniffio==1.3.1 # via parallel-web -time-machine==2.9.0 -tomli==2.0.2 +time-machine==2.19.0 +tomli==2.3.0 + # via dependency-groups # via mypy + # via nox # via pytest -typing-extensions==4.12.2 +typing-extensions==4.15.0 + # via aiosignal # via anyio + # via exceptiongroup # via multidict # via mypy # via parallel-web # via pydantic # via pydantic-core # via pyright + # via pytest-asyncio # via typing-inspection -typing-inspection==0.4.1 + # via virtualenv +typing-inspection==0.4.2 # via pydantic -virtualenv==20.24.5 +virtualenv==20.35.4 # via nox -yarl==1.20.0 +yarl==1.22.0 # via aiohttp -zipp==3.17.0 +zipp==3.23.0 # via importlib-metadata diff --git a/requirements.lock b/requirements.lock index 89e97a9..12e9e32 100644 --- a/requirements.lock +++ b/requirements.lock @@ -12,28 +12,28 @@ -e file:. aiohappyeyeballs==2.6.1 # via aiohttp -aiohttp==3.12.8 +aiohttp==3.13.2 # via httpx-aiohttp # via parallel-web -aiosignal==1.3.2 +aiosignal==1.4.0 # via aiohttp -annotated-types==0.6.0 +annotated-types==0.7.0 # via pydantic -anyio==4.4.0 +anyio==4.12.0 # via httpx # via parallel-web async-timeout==5.0.1 # via aiohttp -attrs==25.3.0 +attrs==25.4.0 # via aiohttp -certifi==2023.7.22 +certifi==2025.11.12 # via httpcore # via httpx -distro==1.8.0 +distro==1.9.0 # via parallel-web -exceptiongroup==1.2.2 +exceptiongroup==1.3.1 # via anyio -frozenlist==1.6.2 +frozenlist==1.8.0 # via aiohttp # via aiosignal h11==0.16.0 @@ -45,25 +45,26 @@ httpx==0.28.1 # via parallel-web httpx-aiohttp==0.1.9 # via parallel-web -idna==3.4 +idna==3.11 # via anyio # via httpx # via yarl -multidict==6.4.4 +multidict==6.7.0 # via aiohttp # via yarl -propcache==0.3.1 +propcache==0.4.1 # via aiohttp # via yarl pydantic==2.12.5 # via parallel-web pydantic-core==2.41.5 # via pydantic -sniffio==1.3.0 - # via anyio +sniffio==1.3.1 # via parallel-web typing-extensions==4.15.0 + # via aiosignal # via anyio + # via exceptiongroup # via multidict # via parallel-web # via pydantic @@ -71,5 +72,5 @@ typing-extensions==4.15.0 # via typing-inspection typing-inspection==0.4.2 # via pydantic -yarl==1.20.0 +yarl==1.22.0 # via aiohttp From e44bc9528e5e16f243aa8dee4633730d2899c72d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 13 Jan 2026 00:28:57 +0000 Subject: [PATCH 07/18] chore(docs): use environment variables for authentication in code snippets From f134f9bf488bdcd80088fc7752b5d33d84fcca66 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 9 Dec 2025 03:23:27 +0000 Subject: [PATCH 08/18] fix(types): allow pyright to infer TypedDict types within SequenceNotStr --- src/parallel/_types.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/parallel/_types.py b/src/parallel/_types.py index eb5f730..4a537e4 100644 --- a/src/parallel/_types.py +++ b/src/parallel/_types.py @@ -243,6 +243,9 @@ class HttpxSendArgs(TypedDict, total=False): if TYPE_CHECKING: # This works because str.__contains__ does not accept object (either in typeshed or at runtime) # https://github.com/hauntsaninja/useful_types/blob/5e9710f3875107d068e7679fd7fec9cfab0eff3b/useful_types/__init__.py#L285 + # + # Note: index() and count() methods are intentionally omitted to allow pyright to properly + # infer TypedDict types when dict literals are used in lists assigned to SequenceNotStr. class SequenceNotStr(Protocol[_T_co]): @overload def __getitem__(self, index: SupportsIndex, /) -> _T_co: ... @@ -251,8 +254,6 @@ def __getitem__(self, index: slice, /) -> Sequence[_T_co]: ... def __contains__(self, value: object, /) -> bool: ... def __len__(self) -> int: ... def __iter__(self) -> Iterator[_T_co]: ... - def index(self, value: Any, start: int = 0, stop: int = ..., /) -> int: ... - def count(self, value: Any, /) -> int: ... def __reversed__(self) -> Iterator[_T_co]: ... else: # just point this to a normal `Sequence` at runtime to avoid having to special case From 05118fc081e6907ac0cdde365e5ed364f49b769c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 9 Dec 2025 03:25:43 +0000 Subject: [PATCH 09/18] chore: add missing docstrings --- src/parallel/types/auto_schema.py | 2 ++ src/parallel/types/auto_schema_param.py | 2 ++ src/parallel/types/beta/beta_extract_params.py | 2 ++ src/parallel/types/beta/beta_run_input.py | 2 ++ src/parallel/types/beta/beta_run_input_param.py | 2 ++ src/parallel/types/beta/beta_task_run_result.py | 6 ++++++ src/parallel/types/beta/error_event.py | 2 ++ src/parallel/types/beta/excerpt_settings_param.py | 2 ++ src/parallel/types/beta/extract_error.py | 2 ++ src/parallel/types/beta/extract_response.py | 2 ++ src/parallel/types/beta/extract_result.py | 2 ++ src/parallel/types/beta/fetch_policy_param.py | 2 ++ .../beta/findall_candidate_match_status_event.py | 4 ++++ src/parallel/types/beta/findall_create_params.py | 4 ++++ src/parallel/types/beta/findall_enrich_input.py | 2 ++ src/parallel/types/beta/findall_run.py | 6 ++++++ src/parallel/types/beta/findall_run_result.py | 13 +++++++++++++ src/parallel/types/beta/findall_run_status_event.py | 2 ++ src/parallel/types/beta/findall_schema.py | 4 ++++ .../types/beta/findall_schema_updated_event.py | 2 ++ src/parallel/types/beta/mcp_server.py | 2 ++ src/parallel/types/beta/mcp_server_param.py | 2 ++ src/parallel/types/beta/mcp_tool_call.py | 2 ++ src/parallel/types/beta/search_result.py | 2 ++ src/parallel/types/beta/task_group.py | 2 ++ .../types/beta/task_group_events_response.py | 2 ++ src/parallel/types/beta/task_group_run_response.py | 2 ++ src/parallel/types/beta/task_group_status.py | 2 ++ src/parallel/types/beta/task_run_event.py | 5 +++++ src/parallel/types/beta/task_run_events_response.py | 6 ++++++ src/parallel/types/beta/usage_item.py | 2 ++ src/parallel/types/beta/web_search_result.py | 2 ++ src/parallel/types/beta/webhook.py | 2 ++ src/parallel/types/beta/webhook_param.py | 2 ++ src/parallel/types/citation.py | 2 ++ src/parallel/types/field_basis.py | 2 ++ src/parallel/types/json_schema.py | 2 ++ src/parallel/types/json_schema_param.py | 2 ++ src/parallel/types/shared/error_object.py | 2 ++ src/parallel/types/shared/error_response.py | 2 ++ src/parallel/types/shared/source_policy.py | 5 +++++ src/parallel/types/shared/warning.py | 2 ++ src/parallel/types/shared_params/source_policy.py | 5 +++++ src/parallel/types/task_run.py | 2 ++ src/parallel/types/task_run_json_output.py | 2 ++ src/parallel/types/task_run_result.py | 2 ++ src/parallel/types/task_run_text_output.py | 2 ++ src/parallel/types/task_spec.py | 8 ++++++++ src/parallel/types/task_spec_param.py | 8 ++++++++ src/parallel/types/text_schema.py | 2 ++ src/parallel/types/text_schema_param.py | 2 ++ 51 files changed, 152 insertions(+) diff --git a/src/parallel/types/auto_schema.py b/src/parallel/types/auto_schema.py index 6ff429e..f32a610 100644 --- a/src/parallel/types/auto_schema.py +++ b/src/parallel/types/auto_schema.py @@ -9,5 +9,7 @@ class AutoSchema(BaseModel): + """Auto schema for a task input or output.""" + type: Optional[Literal["auto"]] = None """The type of schema being defined. Always `auto`.""" diff --git a/src/parallel/types/auto_schema_param.py b/src/parallel/types/auto_schema_param.py index 54d5196..7c3b336 100644 --- a/src/parallel/types/auto_schema_param.py +++ b/src/parallel/types/auto_schema_param.py @@ -8,5 +8,7 @@ class AutoSchemaParam(TypedDict, total=False): + """Auto schema for a task input or output.""" + type: Literal["auto"] """The type of schema being defined. Always `auto`.""" diff --git a/src/parallel/types/beta/beta_extract_params.py b/src/parallel/types/beta/beta_extract_params.py index 3dd62d6..657bb72 100644 --- a/src/parallel/types/beta/beta_extract_params.py +++ b/src/parallel/types/beta/beta_extract_params.py @@ -48,6 +48,8 @@ class BetaExtractParams(TypedDict, total=False): class FullContentFullContentSettings(TypedDict, total=False): + """Optional settings for returning full content.""" + max_chars_per_result: Optional[int] """ Optional limit on the number of characters to include in the full content for diff --git a/src/parallel/types/beta/beta_run_input.py b/src/parallel/types/beta/beta_run_input.py index 8bed8c4..690ac46 100644 --- a/src/parallel/types/beta/beta_run_input.py +++ b/src/parallel/types/beta/beta_run_input.py @@ -12,6 +12,8 @@ class BetaRunInput(BaseModel): + """Task run input with additional beta fields.""" + input: Union[str, Dict[str, object]] """Input to the task, either text or a JSON object.""" diff --git a/src/parallel/types/beta/beta_run_input_param.py b/src/parallel/types/beta/beta_run_input_param.py index 553fa3c..e2578c5 100644 --- a/src/parallel/types/beta/beta_run_input_param.py +++ b/src/parallel/types/beta/beta_run_input_param.py @@ -14,6 +14,8 @@ class BetaRunInputParam(TypedDict, total=False): + """Task run input with additional beta fields.""" + input: Required[Union[str, Dict[str, object]]] """Input to the task, either text or a JSON object.""" diff --git a/src/parallel/types/beta/beta_task_run_result.py b/src/parallel/types/beta/beta_task_run_result.py index ede91b9..5bc7cf7 100644 --- a/src/parallel/types/beta/beta_task_run_result.py +++ b/src/parallel/types/beta/beta_task_run_result.py @@ -13,6 +13,8 @@ class OutputBetaTaskRunTextOutput(BaseModel): + """Output from a task that returns text.""" + basis: List[FieldBasis] """Basis for the output. @@ -37,6 +39,8 @@ class OutputBetaTaskRunTextOutput(BaseModel): class OutputBetaTaskRunJsonOutput(BaseModel): + """Output from a task that returns JSON.""" + basis: List[FieldBasis] """Basis for the output. @@ -75,6 +79,8 @@ class OutputBetaTaskRunJsonOutput(BaseModel): class BetaTaskRunResult(BaseModel): + """Result of a beta task run. Available only if beta headers are specified.""" + output: Output """Output from the task conforming to the output schema.""" diff --git a/src/parallel/types/beta/error_event.py b/src/parallel/types/beta/error_event.py index 90e4da5..7ac7abc 100644 --- a/src/parallel/types/beta/error_event.py +++ b/src/parallel/types/beta/error_event.py @@ -9,6 +9,8 @@ class ErrorEvent(BaseModel): + """Event indicating an error.""" + error: ErrorObject """Error.""" diff --git a/src/parallel/types/beta/excerpt_settings_param.py b/src/parallel/types/beta/excerpt_settings_param.py index 52d2abe..43ceb31 100644 --- a/src/parallel/types/beta/excerpt_settings_param.py +++ b/src/parallel/types/beta/excerpt_settings_param.py @@ -9,6 +9,8 @@ class ExcerptSettingsParam(TypedDict, total=False): + """Optional settings for returning relevant excerpts.""" + max_chars_per_result: Optional[int] """Optional upper bound on the total number of characters to include per url. diff --git a/src/parallel/types/beta/extract_error.py b/src/parallel/types/beta/extract_error.py index 3e81daf..0c8a19f 100644 --- a/src/parallel/types/beta/extract_error.py +++ b/src/parallel/types/beta/extract_error.py @@ -8,6 +8,8 @@ class ExtractError(BaseModel): + """Extract error details.""" + content: Optional[str] = None """Content returned for http client or server errors, if any.""" diff --git a/src/parallel/types/beta/extract_response.py b/src/parallel/types/beta/extract_response.py index d3b666a..45717bc 100644 --- a/src/parallel/types/beta/extract_response.py +++ b/src/parallel/types/beta/extract_response.py @@ -12,6 +12,8 @@ class ExtractResponse(BaseModel): + """Fetch result.""" + errors: List[ExtractError] """Extract errors: requested URLs not in the results.""" diff --git a/src/parallel/types/beta/extract_result.py b/src/parallel/types/beta/extract_result.py index 59adca5..8d74038 100644 --- a/src/parallel/types/beta/extract_result.py +++ b/src/parallel/types/beta/extract_result.py @@ -8,6 +8,8 @@ class ExtractResult(BaseModel): + """Extract result for a single URL.""" + url: str """URL associated with the search result.""" diff --git a/src/parallel/types/beta/fetch_policy_param.py b/src/parallel/types/beta/fetch_policy_param.py index 82f9723..5bc4447 100644 --- a/src/parallel/types/beta/fetch_policy_param.py +++ b/src/parallel/types/beta/fetch_policy_param.py @@ -9,6 +9,8 @@ class FetchPolicyParam(TypedDict, total=False): + """Policy for live fetching web results.""" + disable_cache_fallback: bool """ If false, fallback to cached content older than max-age if live fetch fails or diff --git a/src/parallel/types/beta/findall_candidate_match_status_event.py b/src/parallel/types/beta/findall_candidate_match_status_event.py index 590fec4..cc9097e 100644 --- a/src/parallel/types/beta/findall_candidate_match_status_event.py +++ b/src/parallel/types/beta/findall_candidate_match_status_event.py @@ -11,6 +11,8 @@ class Data(BaseModel): + """The candidate whose match status has been updated.""" + candidate_id: str """ID of the candidate.""" @@ -41,6 +43,8 @@ class Data(BaseModel): class FindallCandidateMatchStatusEvent(BaseModel): + """Event containing a candidate whose match status has changed.""" + data: Data """The candidate whose match status has been updated.""" diff --git a/src/parallel/types/beta/findall_create_params.py b/src/parallel/types/beta/findall_create_params.py index 780f17e..2d1faea 100644 --- a/src/parallel/types/beta/findall_create_params.py +++ b/src/parallel/types/beta/findall_create_params.py @@ -45,6 +45,8 @@ class FindallCreateParams(TypedDict, total=False): class MatchCondition(TypedDict, total=False): + """Match condition model for FindAll ingest.""" + description: Required[str] """Detailed description of the match condition. @@ -57,6 +59,8 @@ class MatchCondition(TypedDict, total=False): class ExcludeList(TypedDict, total=False): + """Exclude candidate input model for FindAll run.""" + name: Required[str] """Name of the entity to exclude from results.""" diff --git a/src/parallel/types/beta/findall_enrich_input.py b/src/parallel/types/beta/findall_enrich_input.py index fc6a13f..108181d 100644 --- a/src/parallel/types/beta/findall_enrich_input.py +++ b/src/parallel/types/beta/findall_enrich_input.py @@ -10,6 +10,8 @@ class FindallEnrichInput(BaseModel): + """Input model for FindAll enrich.""" + output_schema: JsonSchema """JSON schema for the enrichment output schema for the FindAll run.""" diff --git a/src/parallel/types/beta/findall_run.py b/src/parallel/types/beta/findall_run.py index 7264227..2fad17c 100644 --- a/src/parallel/types/beta/findall_run.py +++ b/src/parallel/types/beta/findall_run.py @@ -9,6 +9,8 @@ class StatusMetrics(BaseModel): + """Candidate metrics for the FindAll run.""" + generated_candidates_count: Optional[int] = None """Number of candidates that were selected.""" @@ -17,6 +19,8 @@ class StatusMetrics(BaseModel): class Status(BaseModel): + """Status object for the FindAll run.""" + is_active: bool """Whether the FindAll run is active""" @@ -35,6 +39,8 @@ class Status(BaseModel): class FindallRun(BaseModel): + """FindAll run object with status and metadata.""" + findall_id: str """ID of the FindAll run.""" diff --git a/src/parallel/types/beta/findall_run_result.py b/src/parallel/types/beta/findall_run_result.py index 4265765..b6445a1 100644 --- a/src/parallel/types/beta/findall_run_result.py +++ b/src/parallel/types/beta/findall_run_result.py @@ -11,6 +11,12 @@ class Candidate(BaseModel): + """Candidate for a find all run that may end up as a match. + + Contains all the candidate's metadata and the output of the match conditions. + A candidate is a match if all match conditions are satisfied. + """ + candidate_id: str """ID of the candidate.""" @@ -41,6 +47,13 @@ class Candidate(BaseModel): class FindallRunResult(BaseModel): + """Complete FindAll search results. + + Represents a snapshot of a FindAll run, including run metadata and a list of + candidate entities with their match status and details at the time the snapshot was + taken. + """ + candidates: List[Candidate] """All evaluated candidates at the time of the snapshot.""" diff --git a/src/parallel/types/beta/findall_run_status_event.py b/src/parallel/types/beta/findall_run_status_event.py index 8ca47fe..1f3132f 100644 --- a/src/parallel/types/beta/findall_run_status_event.py +++ b/src/parallel/types/beta/findall_run_status_event.py @@ -10,6 +10,8 @@ class FindallRunStatusEvent(BaseModel): + """Event containing status update for FindAll run.""" + data: FindallRun """Updated FindAll run information.""" diff --git a/src/parallel/types/beta/findall_schema.py b/src/parallel/types/beta/findall_schema.py index 5749a29..a65e61b 100644 --- a/src/parallel/types/beta/findall_schema.py +++ b/src/parallel/types/beta/findall_schema.py @@ -10,6 +10,8 @@ class MatchCondition(BaseModel): + """Match condition model for FindAll ingest.""" + description: str """Detailed description of the match condition. @@ -22,6 +24,8 @@ class MatchCondition(BaseModel): class FindallSchema(BaseModel): + """Response model for FindAll ingest.""" + entity_type: str """Type of the entity for the FindAll run.""" diff --git a/src/parallel/types/beta/findall_schema_updated_event.py b/src/parallel/types/beta/findall_schema_updated_event.py index 6401e21..1345db8 100644 --- a/src/parallel/types/beta/findall_schema_updated_event.py +++ b/src/parallel/types/beta/findall_schema_updated_event.py @@ -10,6 +10,8 @@ class FindallSchemaUpdatedEvent(BaseModel): + """Event containing full snapshot of FindAll run state.""" + data: FindallSchema """Updated FindAll schema.""" diff --git a/src/parallel/types/beta/mcp_server.py b/src/parallel/types/beta/mcp_server.py index 192493f..f0d8d12 100644 --- a/src/parallel/types/beta/mcp_server.py +++ b/src/parallel/types/beta/mcp_server.py @@ -9,6 +9,8 @@ class McpServer(BaseModel): + """MCP server configuration.""" + name: str """Name of the MCP server.""" diff --git a/src/parallel/types/beta/mcp_server_param.py b/src/parallel/types/beta/mcp_server_param.py index e29bea8..02052a2 100644 --- a/src/parallel/types/beta/mcp_server_param.py +++ b/src/parallel/types/beta/mcp_server_param.py @@ -11,6 +11,8 @@ class McpServerParam(TypedDict, total=False): + """MCP server configuration.""" + name: Required[str] """Name of the MCP server.""" diff --git a/src/parallel/types/beta/mcp_tool_call.py b/src/parallel/types/beta/mcp_tool_call.py index daa7cca..d04b217 100644 --- a/src/parallel/types/beta/mcp_tool_call.py +++ b/src/parallel/types/beta/mcp_tool_call.py @@ -8,6 +8,8 @@ class McpToolCall(BaseModel): + """Result of an MCP tool call.""" + arguments: str """Arguments used to call the MCP tool.""" diff --git a/src/parallel/types/beta/search_result.py b/src/parallel/types/beta/search_result.py index 440df65..c7dd935 100644 --- a/src/parallel/types/beta/search_result.py +++ b/src/parallel/types/beta/search_result.py @@ -11,6 +11,8 @@ class SearchResult(BaseModel): + """Output for the Search API.""" + results: List[WebSearchResult] """A list of WebSearchResult objects, ordered by decreasing relevance.""" diff --git a/src/parallel/types/beta/task_group.py b/src/parallel/types/beta/task_group.py index 67c0695..ba452dc 100644 --- a/src/parallel/types/beta/task_group.py +++ b/src/parallel/types/beta/task_group.py @@ -11,6 +11,8 @@ class TaskGroup(BaseModel): + """Response object for a task group, including its status and metadata.""" + created_at: Optional[str] = None """Timestamp of the creation of the group, as an RFC 3339 string.""" diff --git a/src/parallel/types/beta/task_group_events_response.py b/src/parallel/types/beta/task_group_events_response.py index 182f855..c1db25b 100644 --- a/src/parallel/types/beta/task_group_events_response.py +++ b/src/parallel/types/beta/task_group_events_response.py @@ -13,6 +13,8 @@ class TaskGroupStatusEvent(BaseModel): + """Event indicating an update to group status.""" + event_id: str """Cursor to resume the event stream.""" diff --git a/src/parallel/types/beta/task_group_run_response.py b/src/parallel/types/beta/task_group_run_response.py index b5b464c..59acedf 100644 --- a/src/parallel/types/beta/task_group_run_response.py +++ b/src/parallel/types/beta/task_group_run_response.py @@ -9,6 +9,8 @@ class TaskGroupRunResponse(BaseModel): + """Response from adding new task runs to a task group.""" + event_cursor: Optional[str] = None """ Cursor for these runs in the event stream at diff --git a/src/parallel/types/beta/task_group_status.py b/src/parallel/types/beta/task_group_status.py index 221b527..0628c5d 100644 --- a/src/parallel/types/beta/task_group_status.py +++ b/src/parallel/types/beta/task_group_status.py @@ -8,6 +8,8 @@ class TaskGroupStatus(BaseModel): + """Status of a task group.""" + is_active: bool """True if at least one run in the group is currently active, i.e. diff --git a/src/parallel/types/beta/task_run_event.py b/src/parallel/types/beta/task_run_event.py index 007ec7c..c4c6c2f 100644 --- a/src/parallel/types/beta/task_run_event.py +++ b/src/parallel/types/beta/task_run_event.py @@ -16,6 +16,11 @@ class TaskRunEvent(BaseModel): + """Event when a task run transitions to a non-active status. + + May indicate completion, cancellation, or failure. + """ + event_id: Optional[str] = None """Cursor to resume the event stream. Always empty for non Task Group runs.""" diff --git a/src/parallel/types/beta/task_run_events_response.py b/src/parallel/types/beta/task_run_events_response.py index e4e47d6..79088f5 100644 --- a/src/parallel/types/beta/task_run_events_response.py +++ b/src/parallel/types/beta/task_run_events_response.py @@ -17,6 +17,8 @@ class TaskRunProgressStatsEventSourceStats(BaseModel): + """Source stats describing progress so far.""" + num_sources_considered: Optional[int] = None """Number of sources considered in processing the task.""" @@ -28,6 +30,8 @@ class TaskRunProgressStatsEventSourceStats(BaseModel): class TaskRunProgressStatsEvent(BaseModel): + """A progress update for a task run.""" + progress_meter: float """Completion percentage of the task run. @@ -42,6 +46,8 @@ class TaskRunProgressStatsEvent(BaseModel): class TaskRunProgressMessageEvent(BaseModel): + """A message for a task run progress update.""" + message: str """Progress update message.""" diff --git a/src/parallel/types/beta/usage_item.py b/src/parallel/types/beta/usage_item.py index 325b27c..b3584bd 100644 --- a/src/parallel/types/beta/usage_item.py +++ b/src/parallel/types/beta/usage_item.py @@ -6,6 +6,8 @@ class UsageItem(BaseModel): + """Usage item for a single operation.""" + count: int """Count of the SKU.""" diff --git a/src/parallel/types/beta/web_search_result.py b/src/parallel/types/beta/web_search_result.py index 54952e2..aaf78ec 100644 --- a/src/parallel/types/beta/web_search_result.py +++ b/src/parallel/types/beta/web_search_result.py @@ -8,6 +8,8 @@ class WebSearchResult(BaseModel): + """A single search result from the web search API.""" + url: str """URL associated with the search result.""" diff --git a/src/parallel/types/beta/webhook.py b/src/parallel/types/beta/webhook.py index afa1b5b..6741b89 100644 --- a/src/parallel/types/beta/webhook.py +++ b/src/parallel/types/beta/webhook.py @@ -9,6 +9,8 @@ class Webhook(BaseModel): + """Webhooks for Task Runs.""" + url: str """URL for the webhook.""" diff --git a/src/parallel/types/beta/webhook_param.py b/src/parallel/types/beta/webhook_param.py index b7e6cd6..90a667d 100644 --- a/src/parallel/types/beta/webhook_param.py +++ b/src/parallel/types/beta/webhook_param.py @@ -9,6 +9,8 @@ class WebhookParam(TypedDict, total=False): + """Webhooks for Task Runs.""" + url: Required[str] """URL for the webhook.""" diff --git a/src/parallel/types/citation.py b/src/parallel/types/citation.py index 2a3abb5..8f01b2c 100644 --- a/src/parallel/types/citation.py +++ b/src/parallel/types/citation.py @@ -8,6 +8,8 @@ class Citation(BaseModel): + """A citation for a task output.""" + url: str """URL of the citation.""" diff --git a/src/parallel/types/field_basis.py b/src/parallel/types/field_basis.py index de4d4a1..df288f3 100644 --- a/src/parallel/types/field_basis.py +++ b/src/parallel/types/field_basis.py @@ -9,6 +9,8 @@ class FieldBasis(BaseModel): + """Citations and reasoning supporting one field of a task output.""" + field: str """Name of the output field.""" diff --git a/src/parallel/types/json_schema.py b/src/parallel/types/json_schema.py index 7bff20b..44e8fd3 100644 --- a/src/parallel/types/json_schema.py +++ b/src/parallel/types/json_schema.py @@ -9,6 +9,8 @@ class JsonSchema(BaseModel): + """JSON schema for a task input or output.""" + json_schema: Dict[str, object] """A JSON Schema object. Only a subset of JSON Schema is supported.""" diff --git a/src/parallel/types/json_schema_param.py b/src/parallel/types/json_schema_param.py index 90bae27..e2599bb 100644 --- a/src/parallel/types/json_schema_param.py +++ b/src/parallel/types/json_schema_param.py @@ -9,6 +9,8 @@ class JsonSchemaParam(TypedDict, total=False): + """JSON schema for a task input or output.""" + json_schema: Required[Dict[str, object]] """A JSON Schema object. Only a subset of JSON Schema is supported.""" diff --git a/src/parallel/types/shared/error_object.py b/src/parallel/types/shared/error_object.py index 52b9656..d328532 100644 --- a/src/parallel/types/shared/error_object.py +++ b/src/parallel/types/shared/error_object.py @@ -8,6 +8,8 @@ class ErrorObject(BaseModel): + """An error message.""" + message: str """Human-readable message.""" diff --git a/src/parallel/types/shared/error_response.py b/src/parallel/types/shared/error_response.py index 0a0fa30..14ebe29 100644 --- a/src/parallel/types/shared/error_response.py +++ b/src/parallel/types/shared/error_response.py @@ -9,6 +9,8 @@ class ErrorResponse(BaseModel): + """Response object used for non-200 status codes.""" + error: ErrorObject """Error.""" diff --git a/src/parallel/types/shared/source_policy.py b/src/parallel/types/shared/source_policy.py index 19daba9..281053c 100644 --- a/src/parallel/types/shared/source_policy.py +++ b/src/parallel/types/shared/source_policy.py @@ -8,6 +8,11 @@ class SourcePolicy(BaseModel): + """Source policy for web search results. + + This policy governs which sources are allowed/disallowed in results. + """ + exclude_domains: Optional[List[str]] = None """List of domains to exclude from results. diff --git a/src/parallel/types/shared/warning.py b/src/parallel/types/shared/warning.py index 84a2b84..e9856ec 100644 --- a/src/parallel/types/shared/warning.py +++ b/src/parallel/types/shared/warning.py @@ -9,6 +9,8 @@ class Warning(BaseModel): + """Human-readable message for a task.""" + message: str """Human-readable message.""" diff --git a/src/parallel/types/shared_params/source_policy.py b/src/parallel/types/shared_params/source_policy.py index 8330dd0..5770257 100644 --- a/src/parallel/types/shared_params/source_policy.py +++ b/src/parallel/types/shared_params/source_policy.py @@ -10,6 +10,11 @@ class SourcePolicy(TypedDict, total=False): + """Source policy for web search results. + + This policy governs which sources are allowed/disallowed in results. + """ + exclude_domains: SequenceNotStr[str] """List of domains to exclude from results. diff --git a/src/parallel/types/task_run.py b/src/parallel/types/task_run.py index 8ac2d93..fceb400 100644 --- a/src/parallel/types/task_run.py +++ b/src/parallel/types/task_run.py @@ -16,6 +16,8 @@ class TaskRun(BaseModel): + """Status of a task run.""" + created_at: Optional[str] = None """Timestamp of the creation of the task, as an RFC 3339 string.""" diff --git a/src/parallel/types/task_run_json_output.py b/src/parallel/types/task_run_json_output.py index d8d78ac..8541b61 100644 --- a/src/parallel/types/task_run_json_output.py +++ b/src/parallel/types/task_run_json_output.py @@ -10,6 +10,8 @@ class TaskRunJsonOutput(BaseModel): + """Output from a task that returns JSON.""" + basis: List[FieldBasis] """Basis for each top-level field in the JSON output. diff --git a/src/parallel/types/task_run_result.py b/src/parallel/types/task_run_result.py index aaf1a95..fb9d39e 100644 --- a/src/parallel/types/task_run_result.py +++ b/src/parallel/types/task_run_result.py @@ -45,6 +45,8 @@ class TaskRunResult(BaseModel): + """Result of a task run.""" + output: Output """Output from the task conforming to the output schema.""" diff --git a/src/parallel/types/task_run_text_output.py b/src/parallel/types/task_run_text_output.py index ef38d7e..5d7e4c6 100644 --- a/src/parallel/types/task_run_text_output.py +++ b/src/parallel/types/task_run_text_output.py @@ -10,6 +10,8 @@ class TaskRunTextOutput(BaseModel): + """Output from a task that returns text.""" + basis: List[FieldBasis] """Basis for the output. The basis has a single field 'output'.""" diff --git a/src/parallel/types/task_spec.py b/src/parallel/types/task_spec.py index fc7aefe..91bddfb 100644 --- a/src/parallel/types/task_spec.py +++ b/src/parallel/types/task_spec.py @@ -16,6 +16,14 @@ class TaskSpec(BaseModel): + """Specification for a task. + + Auto output schemas can be specified by setting `output_schema={"type":"auto"}`. Not + specifying a TaskSpec is the same as setting an auto output schema. + + For convenience bare strings are also accepted as input or output schemas. + """ + output_schema: OutputSchema """JSON schema or text fully describing the desired output from the task. diff --git a/src/parallel/types/task_spec_param.py b/src/parallel/types/task_spec_param.py index ae434bf..e625263 100644 --- a/src/parallel/types/task_spec_param.py +++ b/src/parallel/types/task_spec_param.py @@ -21,6 +21,14 @@ class TaskSpecParam(TypedDict, total=False): + """Specification for a task. + + Auto output schemas can be specified by setting `output_schema={"type":"auto"}`. Not + specifying a TaskSpec is the same as setting an auto output schema. + + For convenience bare strings are also accepted as input or output schemas. + """ + output_schema: Required[OutputSchema] """JSON schema or text fully describing the desired output from the task. diff --git a/src/parallel/types/text_schema.py b/src/parallel/types/text_schema.py index 0c658e8..10b2e8f 100644 --- a/src/parallel/types/text_schema.py +++ b/src/parallel/types/text_schema.py @@ -9,6 +9,8 @@ class TextSchema(BaseModel): + """Text description for a task input or output.""" + description: Optional[str] = None """A text description of the desired output from the task.""" diff --git a/src/parallel/types/text_schema_param.py b/src/parallel/types/text_schema_param.py index d200099..d333015 100644 --- a/src/parallel/types/text_schema_param.py +++ b/src/parallel/types/text_schema_param.py @@ -9,6 +9,8 @@ class TextSchemaParam(TypedDict, total=False): + """Text description for a task input or output.""" + description: Optional[str] """A text description of the desired output from the task.""" From 9bc7dc653a4f75da0c5af3297170a16b1df91875 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Dec 2025 03:18:12 +0000 Subject: [PATCH 10/18] chore(internal): add missing files argument to base client --- src/parallel/_base_client.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/parallel/_base_client.py b/src/parallel/_base_client.py index 97eea99..a298384 100644 --- a/src/parallel/_base_client.py +++ b/src/parallel/_base_client.py @@ -1247,9 +1247,12 @@ def patch( *, cast_to: Type[ResponseT], body: Body | None = None, + files: RequestFiles | None = None, options: RequestOptions = {}, ) -> ResponseT: - opts = FinalRequestOptions.construct(method="patch", url=path, json_data=body, **options) + opts = FinalRequestOptions.construct( + method="patch", url=path, json_data=body, files=to_httpx_files(files), **options + ) return self.request(cast_to, opts) def put( @@ -1767,9 +1770,12 @@ async def patch( *, cast_to: Type[ResponseT], body: Body | None = None, + files: RequestFiles | None = None, options: RequestOptions = {}, ) -> ResponseT: - opts = FinalRequestOptions.construct(method="patch", url=path, json_data=body, **options) + opts = FinalRequestOptions.construct( + method="patch", url=path, json_data=body, files=to_httpx_files(files), **options + ) return await self.request(cast_to, opts) async def put( From 2927603782bc242da5b6d7622963452dd24154e7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 17 Dec 2025 03:31:54 +0000 Subject: [PATCH 11/18] chore: speedup initial import --- src/parallel/_client.py | 134 ++++++++++++++++++++++------- src/parallel/resources/__init__.py | 14 --- 2 files changed, 105 insertions(+), 43 deletions(-) diff --git a/src/parallel/_client.py b/src/parallel/_client.py index 9580c5c..0e076cb 100644 --- a/src/parallel/_client.py +++ b/src/parallel/_client.py @@ -3,7 +3,7 @@ from __future__ import annotations import os -from typing import Any, Mapping +from typing import TYPE_CHECKING, Any, Mapping from typing_extensions import Self, override import httpx @@ -20,8 +20,8 @@ not_given, ) from ._utils import is_given, get_async_library +from ._compat import cached_property from ._version import __version__ -from .resources import task_run from ._streaming import Stream as Stream, AsyncStream as AsyncStream from ._exceptions import ParallelError, APIStatusError from ._base_client import ( @@ -29,7 +29,11 @@ SyncAPIClient, AsyncAPIClient, ) -from .resources.beta import beta + +if TYPE_CHECKING: + from .resources import beta, task_run + from .resources.task_run import TaskRunResource, AsyncTaskRunResource + from .resources.beta.beta import BetaResource, AsyncBetaResource __all__ = [ "Timeout", @@ -44,11 +48,6 @@ class Parallel(SyncAPIClient): - task_run: task_run.TaskRunResource - beta: beta.BetaResource - with_raw_response: ParallelWithRawResponse - with_streaming_response: ParallelWithStreamedResponse - # client options api_key: str @@ -103,10 +102,25 @@ def __init__( _strict_response_validation=_strict_response_validation, ) - self.task_run = task_run.TaskRunResource(self) - self.beta = beta.BetaResource(self) - self.with_raw_response = ParallelWithRawResponse(self) - self.with_streaming_response = ParallelWithStreamedResponse(self) + @cached_property + def task_run(self) -> TaskRunResource: + from .resources.task_run import TaskRunResource + + return TaskRunResource(self) + + @cached_property + def beta(self) -> BetaResource: + from .resources.beta import BetaResource + + return BetaResource(self) + + @cached_property + def with_raw_response(self) -> ParallelWithRawResponse: + return ParallelWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> ParallelWithStreamedResponse: + return ParallelWithStreamedResponse(self) @property @override @@ -214,11 +228,6 @@ def _make_status_error( class AsyncParallel(AsyncAPIClient): - task_run: task_run.AsyncTaskRunResource - beta: beta.AsyncBetaResource - with_raw_response: AsyncParallelWithRawResponse - with_streaming_response: AsyncParallelWithStreamedResponse - # client options api_key: str @@ -273,10 +282,25 @@ def __init__( _strict_response_validation=_strict_response_validation, ) - self.task_run = task_run.AsyncTaskRunResource(self) - self.beta = beta.AsyncBetaResource(self) - self.with_raw_response = AsyncParallelWithRawResponse(self) - self.with_streaming_response = AsyncParallelWithStreamedResponse(self) + @cached_property + def task_run(self) -> AsyncTaskRunResource: + from .resources.task_run import AsyncTaskRunResource + + return AsyncTaskRunResource(self) + + @cached_property + def beta(self) -> AsyncBetaResource: + from .resources.beta import AsyncBetaResource + + return AsyncBetaResource(self) + + @cached_property + def with_raw_response(self) -> AsyncParallelWithRawResponse: + return AsyncParallelWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncParallelWithStreamedResponse: + return AsyncParallelWithStreamedResponse(self) @property @override @@ -384,27 +408,79 @@ def _make_status_error( class ParallelWithRawResponse: + _client: Parallel + def __init__(self, client: Parallel) -> None: - self.task_run = task_run.TaskRunResourceWithRawResponse(client.task_run) - self.beta = beta.BetaResourceWithRawResponse(client.beta) + self._client = client + + @cached_property + def task_run(self) -> task_run.TaskRunResourceWithRawResponse: + from .resources.task_run import TaskRunResourceWithRawResponse + + return TaskRunResourceWithRawResponse(self._client.task_run) + + @cached_property + def beta(self) -> beta.BetaResourceWithRawResponse: + from .resources.beta import BetaResourceWithRawResponse + + return BetaResourceWithRawResponse(self._client.beta) class AsyncParallelWithRawResponse: + _client: AsyncParallel + def __init__(self, client: AsyncParallel) -> None: - self.task_run = task_run.AsyncTaskRunResourceWithRawResponse(client.task_run) - self.beta = beta.AsyncBetaResourceWithRawResponse(client.beta) + self._client = client + + @cached_property + def task_run(self) -> task_run.AsyncTaskRunResourceWithRawResponse: + from .resources.task_run import AsyncTaskRunResourceWithRawResponse + + return AsyncTaskRunResourceWithRawResponse(self._client.task_run) + + @cached_property + def beta(self) -> beta.AsyncBetaResourceWithRawResponse: + from .resources.beta import AsyncBetaResourceWithRawResponse + + return AsyncBetaResourceWithRawResponse(self._client.beta) class ParallelWithStreamedResponse: + _client: Parallel + def __init__(self, client: Parallel) -> None: - self.task_run = task_run.TaskRunResourceWithStreamingResponse(client.task_run) - self.beta = beta.BetaResourceWithStreamingResponse(client.beta) + self._client = client + + @cached_property + def task_run(self) -> task_run.TaskRunResourceWithStreamingResponse: + from .resources.task_run import TaskRunResourceWithStreamingResponse + + return TaskRunResourceWithStreamingResponse(self._client.task_run) + + @cached_property + def beta(self) -> beta.BetaResourceWithStreamingResponse: + from .resources.beta import BetaResourceWithStreamingResponse + + return BetaResourceWithStreamingResponse(self._client.beta) class AsyncParallelWithStreamedResponse: + _client: AsyncParallel + def __init__(self, client: AsyncParallel) -> None: - self.task_run = task_run.AsyncTaskRunResourceWithStreamingResponse(client.task_run) - self.beta = beta.AsyncBetaResourceWithStreamingResponse(client.beta) + self._client = client + + @cached_property + def task_run(self) -> task_run.AsyncTaskRunResourceWithStreamingResponse: + from .resources.task_run import AsyncTaskRunResourceWithStreamingResponse + + return AsyncTaskRunResourceWithStreamingResponse(self._client.task_run) + + @cached_property + def beta(self) -> beta.AsyncBetaResourceWithStreamingResponse: + from .resources.beta import AsyncBetaResourceWithStreamingResponse + + return AsyncBetaResourceWithStreamingResponse(self._client.beta) Client = Parallel diff --git a/src/parallel/resources/__init__.py b/src/parallel/resources/__init__.py index 9d1df4f..6fc7c06 100644 --- a/src/parallel/resources/__init__.py +++ b/src/parallel/resources/__init__.py @@ -1,13 +1,5 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from .beta import ( - BetaResource, - AsyncBetaResource, - BetaResourceWithRawResponse, - AsyncBetaResourceWithRawResponse, - BetaResourceWithStreamingResponse, - AsyncBetaResourceWithStreamingResponse, -) from .task_run import ( TaskRunResource, AsyncTaskRunResource, @@ -24,10 +16,4 @@ "AsyncTaskRunResourceWithRawResponse", "TaskRunResourceWithStreamingResponse", "AsyncTaskRunResourceWithStreamingResponse", - "BetaResource", - "AsyncBetaResource", - "BetaResourceWithRawResponse", - "AsyncBetaResourceWithRawResponse", - "BetaResourceWithStreamingResponse", - "AsyncBetaResourceWithStreamingResponse", ] From b147da50e3d4b13868908c5c40e0ddecc5489e19 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 18 Dec 2025 03:38:55 +0000 Subject: [PATCH 12/18] fix: use async_to_httpx_files in patch method --- src/parallel/_base_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parallel/_base_client.py b/src/parallel/_base_client.py index a298384..d7b9c23 100644 --- a/src/parallel/_base_client.py +++ b/src/parallel/_base_client.py @@ -1774,7 +1774,7 @@ async def patch( options: RequestOptions = {}, ) -> ResponseT: opts = FinalRequestOptions.construct( - method="patch", url=path, json_data=body, files=to_httpx_files(files), **options + method="patch", url=path, json_data=body, files=await async_to_httpx_files(files), **options ) return await self.request(cast_to, opts) From 8b25ed10edef5697bce6bc74a3f628029da28d12 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 19 Dec 2025 03:35:23 +0000 Subject: [PATCH 13/18] chore(internal): add `--fix` argument to lint script --- scripts/lint | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/lint b/scripts/lint index 1a961b7..5deb42d 100755 --- a/scripts/lint +++ b/scripts/lint @@ -4,8 +4,13 @@ set -e cd "$(dirname "$0")/.." -echo "==> Running lints" -rye run lint +if [ "$1" = "--fix" ]; then + echo "==> Running lints with --fix" + rye run fix:ruff +else + echo "==> Running lints" + rye run lint +fi echo "==> Making sure it imports" rye run python -c 'import parallel' From 2eb1adc9884c03202107eb5987b6ea0717dd3a6a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 6 Jan 2026 03:19:06 +0000 Subject: [PATCH 14/18] chore(internal): codegen related update --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 50d0ab1..5083166 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 2025 Parallel +Copyright 2026 Parallel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: From 3641ac619abdf3f0acd9085c515f3bed19c9bdd2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 13 Jan 2026 00:18:14 +0000 Subject: [PATCH 15/18] feat(api): add after_date, update findAll nomenclature --- .stats.yml | 6 +- api.md | 38 ++--- src/parallel/resources/beta/__init__.py | 24 ++-- src/parallel/resources/beta/beta.py | 36 ++--- src/parallel/resources/beta/findall.py | 134 +++++++++--------- src/parallel/types/beta/__init__.py | 26 ++-- .../findall_candidate_match_status_event.py | 4 +- .../types/beta/findall_create_params.py | 4 +- .../types/beta/findall_enrich_input.py | 4 +- .../types/beta/findall_enrich_params.py | 4 +- .../types/beta/findall_events_params.py | 4 +- .../types/beta/findall_events_response.py | 12 +- .../types/beta/findall_extend_params.py | 4 +- .../types/beta/findall_ingest_params.py | 4 +- src/parallel/types/beta/findall_run.py | 4 +- src/parallel/types/beta/findall_run_result.py | 8 +- .../types/beta/findall_run_status_event.py | 8 +- src/parallel/types/beta/findall_schema.py | 8 +- .../beta/findall_schema_updated_event.py | 8 +- src/parallel/types/shared/source_policy.py | 8 ++ .../types/shared_params/source_policy.py | 12 +- tests/api_resources/beta/test_findall.py | 122 ++++++++-------- tests/api_resources/beta/test_task_group.py | 3 + tests/api_resources/beta/test_task_run.py | 3 + tests/api_resources/test_beta.py | 3 + tests/api_resources/test_task_run.py | 3 + 26 files changed, 262 insertions(+), 232 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8098562..9165ad9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 22 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-e6afa27fc86492ffa6ee5f929f2d1eb8166750c3a9652a393aede2ca467c49ef.yml -openapi_spec_hash: 12e9b47405451f5286c199d7ee26c3cc -config_hash: 6a16116c579cf9a3739083c24b10534d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-105d778ad64daf94bc1a8b074c609be5200c570c8a3e9fb646d418d572083dac.yml +openapi_spec_hash: b5d7390ed05ec6f332a1a91266a74ac3 +config_hash: a377da139cf6858ba9350a5a88f5b228 diff --git a/api.md b/api.md index d22709d..e00a252 100644 --- a/api.md +++ b/api.md @@ -103,34 +103,34 @@ Methods: - client.beta.task_group.events(task_group_id, \*\*params) -> TaskGroupEventsResponse - client.beta.task_group.get_runs(task_group_id, \*\*params) -> TaskGroupGetRunsResponse -## Findall +## FindAll Types: ```python from parallel.types.beta import ( - FindallCandidateMatchStatusEvent, - FindallEnrichInput, - FindallExtendInput, - FindallRun, - FindallRunInput, - FindallRunResult, - FindallRunStatusEvent, - FindallSchema, - FindallSchemaUpdatedEvent, + FindAllCandidateMatchStatusEvent, + FindAllEnrichInput, + FindAllExtendInput, + FindAllRun, + FindAllRunInput, + FindAllRunResult, + FindAllRunStatusEvent, + FindAllSchema, + FindAllSchemaUpdatedEvent, IngestInput, - FindallEventsResponse, + FindAllEventsResponse, ) ``` Methods: -- client.beta.findall.create(\*\*params) -> FindallRun -- client.beta.findall.retrieve(findall_id) -> FindallRun +- client.beta.findall.create(\*\*params) -> FindAllRun +- client.beta.findall.retrieve(findall_id) -> FindAllRun - client.beta.findall.cancel(findall_id) -> object -- client.beta.findall.enrich(findall_id, \*\*params) -> FindallSchema -- client.beta.findall.events(findall_id, \*\*params) -> FindallEventsResponse -- client.beta.findall.extend(findall_id, \*\*params) -> FindallSchema -- client.beta.findall.ingest(\*\*params) -> FindallSchema -- client.beta.findall.result(findall_id) -> FindallRunResult -- client.beta.findall.schema(findall_id) -> FindallSchema +- client.beta.findall.enrich(findall_id, \*\*params) -> FindAllSchema +- client.beta.findall.events(findall_id, \*\*params) -> FindAllEventsResponse +- client.beta.findall.extend(findall_id, \*\*params) -> FindAllSchema +- client.beta.findall.ingest(\*\*params) -> FindAllSchema +- client.beta.findall.result(findall_id) -> FindAllRunResult +- client.beta.findall.schema(findall_id) -> FindAllSchema diff --git a/src/parallel/resources/beta/__init__.py b/src/parallel/resources/beta/__init__.py index 167ada0..6cae1b3 100644 --- a/src/parallel/resources/beta/__init__.py +++ b/src/parallel/resources/beta/__init__.py @@ -9,12 +9,12 @@ AsyncBetaResourceWithStreamingResponse, ) from .findall import ( - FindallResource, - AsyncFindallResource, - FindallResourceWithRawResponse, - AsyncFindallResourceWithRawResponse, - FindallResourceWithStreamingResponse, - AsyncFindallResourceWithStreamingResponse, + FindAllResource, + AsyncFindAllResource, + FindAllResourceWithRawResponse, + AsyncFindAllResourceWithRawResponse, + FindAllResourceWithStreamingResponse, + AsyncFindAllResourceWithStreamingResponse, ) from .task_run import ( TaskRunResource, @@ -46,12 +46,12 @@ "AsyncTaskGroupResourceWithRawResponse", "TaskGroupResourceWithStreamingResponse", "AsyncTaskGroupResourceWithStreamingResponse", - "FindallResource", - "AsyncFindallResource", - "FindallResourceWithRawResponse", - "AsyncFindallResourceWithRawResponse", - "FindallResourceWithStreamingResponse", - "AsyncFindallResourceWithStreamingResponse", + "FindAllResource", + "AsyncFindAllResource", + "FindAllResourceWithRawResponse", + "AsyncFindAllResourceWithRawResponse", + "FindAllResourceWithStreamingResponse", + "AsyncFindAllResourceWithStreamingResponse", "BetaResource", "AsyncBetaResource", "BetaResourceWithRawResponse", diff --git a/src/parallel/resources/beta/beta.py b/src/parallel/resources/beta/beta.py index c719dcb..8e4d4e9 100644 --- a/src/parallel/resources/beta/beta.py +++ b/src/parallel/resources/beta/beta.py @@ -9,12 +9,12 @@ import httpx from .findall import ( - FindallResource, - AsyncFindallResource, - FindallResourceWithRawResponse, - AsyncFindallResourceWithRawResponse, - FindallResourceWithStreamingResponse, - AsyncFindallResourceWithStreamingResponse, + FindAllResource, + AsyncFindAllResource, + FindAllResourceWithRawResponse, + AsyncFindAllResourceWithRawResponse, + FindAllResourceWithStreamingResponse, + AsyncFindAllResourceWithStreamingResponse, ) from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given from ..._utils import is_given, maybe_transform, strip_not_given, async_maybe_transform @@ -64,8 +64,8 @@ def task_group(self) -> TaskGroupResource: return TaskGroupResource(self._client) @cached_property - def findall(self) -> FindallResource: - return FindallResource(self._client) + def findall(self) -> FindAllResource: + return FindAllResource(self._client) @cached_property def with_raw_response(self) -> BetaResourceWithRawResponse: @@ -266,8 +266,8 @@ def task_group(self) -> AsyncTaskGroupResource: return AsyncTaskGroupResource(self._client) @cached_property - def findall(self) -> AsyncFindallResource: - return AsyncFindallResource(self._client) + def findall(self) -> AsyncFindAllResource: + return AsyncFindAllResource(self._client) @cached_property def with_raw_response(self) -> AsyncBetaResourceWithRawResponse: @@ -478,8 +478,8 @@ def task_group(self) -> TaskGroupResourceWithRawResponse: return TaskGroupResourceWithRawResponse(self._beta.task_group) @cached_property - def findall(self) -> FindallResourceWithRawResponse: - return FindallResourceWithRawResponse(self._beta.findall) + def findall(self) -> FindAllResourceWithRawResponse: + return FindAllResourceWithRawResponse(self._beta.findall) class AsyncBetaResourceWithRawResponse: @@ -502,8 +502,8 @@ def task_group(self) -> AsyncTaskGroupResourceWithRawResponse: return AsyncTaskGroupResourceWithRawResponse(self._beta.task_group) @cached_property - def findall(self) -> AsyncFindallResourceWithRawResponse: - return AsyncFindallResourceWithRawResponse(self._beta.findall) + def findall(self) -> AsyncFindAllResourceWithRawResponse: + return AsyncFindAllResourceWithRawResponse(self._beta.findall) class BetaResourceWithStreamingResponse: @@ -526,8 +526,8 @@ def task_group(self) -> TaskGroupResourceWithStreamingResponse: return TaskGroupResourceWithStreamingResponse(self._beta.task_group) @cached_property - def findall(self) -> FindallResourceWithStreamingResponse: - return FindallResourceWithStreamingResponse(self._beta.findall) + def findall(self) -> FindAllResourceWithStreamingResponse: + return FindAllResourceWithStreamingResponse(self._beta.findall) class AsyncBetaResourceWithStreamingResponse: @@ -550,5 +550,5 @@ def task_group(self) -> AsyncTaskGroupResourceWithStreamingResponse: return AsyncTaskGroupResourceWithStreamingResponse(self._beta.task_group) @cached_property - def findall(self) -> AsyncFindallResourceWithStreamingResponse: - return AsyncFindallResourceWithStreamingResponse(self._beta.findall) + def findall(self) -> AsyncFindAllResourceWithStreamingResponse: + return AsyncFindAllResourceWithStreamingResponse(self._beta.findall) diff --git a/src/parallel/resources/beta/findall.py b/src/parallel/resources/beta/findall.py index dd87494..5bbf14a 100644 --- a/src/parallel/resources/beta/findall.py +++ b/src/parallel/resources/beta/findall.py @@ -27,37 +27,37 @@ findall_ingest_params, ) from ..._base_client import make_request_options -from ...types.beta.findall_run import FindallRun +from ...types.beta.findall_run import FindAllRun from ...types.json_schema_param import JsonSchemaParam from ...types.beta.webhook_param import WebhookParam -from ...types.beta.findall_schema import FindallSchema +from ...types.beta.findall_schema import FindAllSchema from ...types.beta.mcp_server_param import McpServerParam -from ...types.beta.findall_run_result import FindallRunResult +from ...types.beta.findall_run_result import FindAllRunResult from ...types.beta.parallel_beta_param import ParallelBetaParam -from ...types.beta.findall_events_response import FindallEventsResponse +from ...types.beta.findall_events_response import FindAllEventsResponse -__all__ = ["FindallResource", "AsyncFindallResource"] +__all__ = ["FindAllResource", "AsyncFindAllResource"] -class FindallResource(SyncAPIResource): +class FindAllResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> FindallResourceWithRawResponse: + def with_raw_response(self) -> FindAllResourceWithRawResponse: """ This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/parallel-web/parallel-sdk-python#accessing-raw-response-data-eg-headers """ - return FindallResourceWithRawResponse(self) + return FindAllResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> FindallResourceWithStreamingResponse: + def with_streaming_response(self) -> FindAllResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. For more information, see https://www.github.com/parallel-web/parallel-sdk-python#with_streaming_response """ - return FindallResourceWithStreamingResponse(self) + return FindAllResourceWithStreamingResponse(self) def create( self, @@ -77,7 +77,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> FindallRun: + ) -> FindAllRun: """ Starts a FindAll run. @@ -144,12 +144,12 @@ def create( "metadata": metadata, "webhook": webhook, }, - findall_create_params.FindallCreateParams, + findall_create_params.FindAllCreateParams, ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=FindallRun, + cast_to=FindAllRun, ) def retrieve( @@ -163,7 +163,7 @@ def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> FindallRun: + ) -> FindAllRun: """ Retrieve a FindAll run. @@ -196,7 +196,7 @@ def retrieve( options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=FindallRun, + cast_to=FindAllRun, ) def cancel( @@ -260,7 +260,7 @@ def enrich( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> FindallSchema: + ) -> FindAllSchema: """ Add an enrichment to a FindAll run. @@ -302,12 +302,12 @@ def enrich( "mcp_servers": mcp_servers, "processor": processor, }, - findall_enrich_params.FindallEnrichParams, + findall_enrich_params.FindAllEnrichParams, ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=FindallSchema, + cast_to=FindAllSchema, ) def events( @@ -323,7 +323,7 @@ def events( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> Stream[FindallEventsResponse]: + ) -> Stream[FindAllEventsResponse]: """ Stream events from a FindAll run. @@ -369,12 +369,12 @@ def events( "last_event_id": last_event_id, "api_timeout": api_timeout, }, - findall_events_params.FindallEventsParams, + findall_events_params.FindAllEventsParams, ), ), - cast_to=cast(Any, FindallEventsResponse), # Union types cannot be passed in as arguments in the type system + cast_to=cast(Any, FindAllEventsResponse), # Union types cannot be passed in as arguments in the type system stream=True, - stream_cls=Stream[FindallEventsResponse], + stream_cls=Stream[FindAllEventsResponse], ) def extend( @@ -389,7 +389,7 @@ def extend( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> FindallSchema: + ) -> FindAllSchema: """ Extend a FindAll run by adding additional matches to the current match limit. @@ -424,12 +424,12 @@ def extend( return self._post( f"/v1beta/findall/runs/{findall_id}/extend", body=maybe_transform( - {"additional_match_limit": additional_match_limit}, findall_extend_params.FindallExtendParams + {"additional_match_limit": additional_match_limit}, findall_extend_params.FindAllExtendParams ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=FindallSchema, + cast_to=FindAllSchema, ) def ingest( @@ -443,7 +443,7 @@ def ingest( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> FindallSchema: + ) -> FindAllSchema: """ Transforms a natural language search objective into a structured FindAll spec. @@ -478,11 +478,11 @@ def ingest( extra_headers = {"parallel-beta": "findall-2025-02-01", **(extra_headers or {})} return self._post( "/v1beta/findall/ingest", - body=maybe_transform({"objective": objective}, findall_ingest_params.FindallIngestParams), + body=maybe_transform({"objective": objective}, findall_ingest_params.FindAllIngestParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=FindallSchema, + cast_to=FindAllSchema, ) def result( @@ -496,7 +496,7 @@ def result( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> FindallRunResult: + ) -> FindAllRunResult: """ Retrieve the FindAll run result at the time of the request. @@ -529,7 +529,7 @@ def result( options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=FindallRunResult, + cast_to=FindAllRunResult, ) def schema( @@ -543,7 +543,7 @@ def schema( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> FindallSchema: + ) -> FindAllSchema: """ Get FindAll Run Schema @@ -576,29 +576,29 @@ def schema( options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=FindallSchema, + cast_to=FindAllSchema, ) -class AsyncFindallResource(AsyncAPIResource): +class AsyncFindAllResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncFindallResourceWithRawResponse: + def with_raw_response(self) -> AsyncFindAllResourceWithRawResponse: """ This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/parallel-web/parallel-sdk-python#accessing-raw-response-data-eg-headers """ - return AsyncFindallResourceWithRawResponse(self) + return AsyncFindAllResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncFindallResourceWithStreamingResponse: + def with_streaming_response(self) -> AsyncFindAllResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. For more information, see https://www.github.com/parallel-web/parallel-sdk-python#with_streaming_response """ - return AsyncFindallResourceWithStreamingResponse(self) + return AsyncFindAllResourceWithStreamingResponse(self) async def create( self, @@ -618,7 +618,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> FindallRun: + ) -> FindAllRun: """ Starts a FindAll run. @@ -685,12 +685,12 @@ async def create( "metadata": metadata, "webhook": webhook, }, - findall_create_params.FindallCreateParams, + findall_create_params.FindAllCreateParams, ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=FindallRun, + cast_to=FindAllRun, ) async def retrieve( @@ -704,7 +704,7 @@ async def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> FindallRun: + ) -> FindAllRun: """ Retrieve a FindAll run. @@ -737,7 +737,7 @@ async def retrieve( options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=FindallRun, + cast_to=FindAllRun, ) async def cancel( @@ -801,7 +801,7 @@ async def enrich( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> FindallSchema: + ) -> FindAllSchema: """ Add an enrichment to a FindAll run. @@ -843,12 +843,12 @@ async def enrich( "mcp_servers": mcp_servers, "processor": processor, }, - findall_enrich_params.FindallEnrichParams, + findall_enrich_params.FindAllEnrichParams, ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=FindallSchema, + cast_to=FindAllSchema, ) async def events( @@ -864,7 +864,7 @@ async def events( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncStream[FindallEventsResponse]: + ) -> AsyncStream[FindAllEventsResponse]: """ Stream events from a FindAll run. @@ -910,12 +910,12 @@ async def events( "last_event_id": last_event_id, "api_timeout": api_timeout, }, - findall_events_params.FindallEventsParams, + findall_events_params.FindAllEventsParams, ), ), - cast_to=cast(Any, FindallEventsResponse), # Union types cannot be passed in as arguments in the type system + cast_to=cast(Any, FindAllEventsResponse), # Union types cannot be passed in as arguments in the type system stream=True, - stream_cls=AsyncStream[FindallEventsResponse], + stream_cls=AsyncStream[FindAllEventsResponse], ) async def extend( @@ -930,7 +930,7 @@ async def extend( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> FindallSchema: + ) -> FindAllSchema: """ Extend a FindAll run by adding additional matches to the current match limit. @@ -965,12 +965,12 @@ async def extend( return await self._post( f"/v1beta/findall/runs/{findall_id}/extend", body=await async_maybe_transform( - {"additional_match_limit": additional_match_limit}, findall_extend_params.FindallExtendParams + {"additional_match_limit": additional_match_limit}, findall_extend_params.FindAllExtendParams ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=FindallSchema, + cast_to=FindAllSchema, ) async def ingest( @@ -984,7 +984,7 @@ async def ingest( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> FindallSchema: + ) -> FindAllSchema: """ Transforms a natural language search objective into a structured FindAll spec. @@ -1019,11 +1019,11 @@ async def ingest( extra_headers = {"parallel-beta": "findall-2025-02-01", **(extra_headers or {})} return await self._post( "/v1beta/findall/ingest", - body=await async_maybe_transform({"objective": objective}, findall_ingest_params.FindallIngestParams), + body=await async_maybe_transform({"objective": objective}, findall_ingest_params.FindAllIngestParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=FindallSchema, + cast_to=FindAllSchema, ) async def result( @@ -1037,7 +1037,7 @@ async def result( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> FindallRunResult: + ) -> FindAllRunResult: """ Retrieve the FindAll run result at the time of the request. @@ -1070,7 +1070,7 @@ async def result( options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=FindallRunResult, + cast_to=FindAllRunResult, ) async def schema( @@ -1084,7 +1084,7 @@ async def schema( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> FindallSchema: + ) -> FindAllSchema: """ Get FindAll Run Schema @@ -1117,12 +1117,12 @@ async def schema( options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=FindallSchema, + cast_to=FindAllSchema, ) -class FindallResourceWithRawResponse: - def __init__(self, findall: FindallResource) -> None: +class FindAllResourceWithRawResponse: + def __init__(self, findall: FindAllResource) -> None: self._findall = findall self.create = to_raw_response_wrapper( @@ -1154,8 +1154,8 @@ def __init__(self, findall: FindallResource) -> None: ) -class AsyncFindallResourceWithRawResponse: - def __init__(self, findall: AsyncFindallResource) -> None: +class AsyncFindAllResourceWithRawResponse: + def __init__(self, findall: AsyncFindAllResource) -> None: self._findall = findall self.create = async_to_raw_response_wrapper( @@ -1187,8 +1187,8 @@ def __init__(self, findall: AsyncFindallResource) -> None: ) -class FindallResourceWithStreamingResponse: - def __init__(self, findall: FindallResource) -> None: +class FindAllResourceWithStreamingResponse: + def __init__(self, findall: FindAllResource) -> None: self._findall = findall self.create = to_streamed_response_wrapper( @@ -1220,8 +1220,8 @@ def __init__(self, findall: FindallResource) -> None: ) -class AsyncFindallResourceWithStreamingResponse: - def __init__(self, findall: AsyncFindallResource) -> None: +class AsyncFindAllResourceWithStreamingResponse: + def __init__(self, findall: AsyncFindAllResource) -> None: self._findall = findall self.create = async_to_streamed_response_wrapper( diff --git a/src/parallel/types/beta/__init__.py b/src/parallel/types/beta/__init__.py index 1ef2fe2..269cfe1 100644 --- a/src/parallel/types/beta/__init__.py +++ b/src/parallel/types/beta/__init__.py @@ -7,14 +7,14 @@ from .task_group import TaskGroup as TaskGroup from .usage_item import UsageItem as UsageItem from .error_event import ErrorEvent as ErrorEvent -from .findall_run import FindallRun as FindallRun +from .findall_run import FindAllRun as FindAllRun from .extract_error import ExtractError as ExtractError from .mcp_tool_call import McpToolCall as McpToolCall from .search_result import SearchResult as SearchResult from .webhook_param import WebhookParam as WebhookParam from .beta_run_input import BetaRunInput as BetaRunInput from .extract_result import ExtractResult as ExtractResult -from .findall_schema import FindallSchema as FindallSchema +from .findall_schema import FindAllSchema as FindAllSchema from .task_run_event import TaskRunEvent as TaskRunEvent from .extract_response import ExtractResponse as ExtractResponse from .mcp_server_param import McpServerParam as McpServerParam @@ -22,23 +22,23 @@ 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 .findall_run_result import FindallRunResult as FindallRunResult +from .findall_run_result import FindAllRunResult as FindAllRunResult 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 from .beta_task_run_result import BetaTaskRunResult as BetaTaskRunResult -from .findall_enrich_input import FindallEnrichInput as FindallEnrichInput -from .findall_create_params import FindallCreateParams as FindallCreateParams -from .findall_enrich_params import FindallEnrichParams as FindallEnrichParams -from .findall_events_params import FindallEventsParams as FindallEventsParams -from .findall_extend_params import FindallExtendParams as FindallExtendParams -from .findall_ingest_params import FindallIngestParams as FindallIngestParams +from .findall_enrich_input import FindAllEnrichInput as FindAllEnrichInput +from .findall_create_params import FindAllCreateParams as FindAllCreateParams +from .findall_enrich_params import FindAllEnrichParams as FindAllEnrichParams +from .findall_events_params import FindAllEventsParams as FindAllEventsParams +from .findall_extend_params import FindAllExtendParams as FindAllExtendParams +from .findall_ingest_params import FindAllIngestParams as FindAllIngestParams from .excerpt_settings_param import ExcerptSettingsParam as ExcerptSettingsParam from .task_run_create_params import TaskRunCreateParams as TaskRunCreateParams from .task_run_result_params import TaskRunResultParams as TaskRunResultParams -from .findall_events_response import FindallEventsResponse as FindallEventsResponse +from .findall_events_response import FindAllEventsResponse as FindAllEventsResponse from .task_group_run_response import TaskGroupRunResponse as TaskGroupRunResponse -from .findall_run_status_event import FindallRunStatusEvent as FindallRunStatusEvent +from .findall_run_status_event import FindAllRunStatusEvent as FindAllRunStatusEvent from .task_group_create_params import TaskGroupCreateParams as TaskGroupCreateParams from .task_group_events_params import TaskGroupEventsParams as TaskGroupEventsParams from .task_run_events_response import TaskRunEventsResponse as TaskRunEventsResponse @@ -46,6 +46,6 @@ from .task_group_add_runs_params import TaskGroupAddRunsParams as TaskGroupAddRunsParams from .task_group_events_response import TaskGroupEventsResponse as TaskGroupEventsResponse from .task_group_get_runs_params import TaskGroupGetRunsParams as TaskGroupGetRunsParams -from .findall_schema_updated_event import FindallSchemaUpdatedEvent as FindallSchemaUpdatedEvent +from .findall_schema_updated_event import FindAllSchemaUpdatedEvent as FindAllSchemaUpdatedEvent from .task_group_get_runs_response import TaskGroupGetRunsResponse as TaskGroupGetRunsResponse -from .findall_candidate_match_status_event import FindallCandidateMatchStatusEvent as FindallCandidateMatchStatusEvent +from .findall_candidate_match_status_event import FindAllCandidateMatchStatusEvent as FindAllCandidateMatchStatusEvent diff --git a/src/parallel/types/beta/findall_candidate_match_status_event.py b/src/parallel/types/beta/findall_candidate_match_status_event.py index cc9097e..5f7e3bb 100644 --- a/src/parallel/types/beta/findall_candidate_match_status_event.py +++ b/src/parallel/types/beta/findall_candidate_match_status_event.py @@ -7,7 +7,7 @@ from ..._models import BaseModel from ..field_basis import FieldBasis -__all__ = ["FindallCandidateMatchStatusEvent", "Data"] +__all__ = ["FindAllCandidateMatchStatusEvent", "Data"] class Data(BaseModel): @@ -42,7 +42,7 @@ class Data(BaseModel): """ -class FindallCandidateMatchStatusEvent(BaseModel): +class FindAllCandidateMatchStatusEvent(BaseModel): """Event containing a candidate whose match status has changed.""" data: Data diff --git a/src/parallel/types/beta/findall_create_params.py b/src/parallel/types/beta/findall_create_params.py index 2d1faea..9fb2093 100644 --- a/src/parallel/types/beta/findall_create_params.py +++ b/src/parallel/types/beta/findall_create_params.py @@ -9,10 +9,10 @@ from .webhook_param import WebhookParam from .parallel_beta_param import ParallelBetaParam -__all__ = ["FindallCreateParams", "MatchCondition", "ExcludeList"] +__all__ = ["FindAllCreateParams", "MatchCondition", "ExcludeList"] -class FindallCreateParams(TypedDict, total=False): +class FindAllCreateParams(TypedDict, total=False): entity_type: Required[str] """Type of the entity for the FindAll run.""" diff --git a/src/parallel/types/beta/findall_enrich_input.py b/src/parallel/types/beta/findall_enrich_input.py index 108181d..56aa147 100644 --- a/src/parallel/types/beta/findall_enrich_input.py +++ b/src/parallel/types/beta/findall_enrich_input.py @@ -6,10 +6,10 @@ from .mcp_server import McpServer from ..json_schema import JsonSchema -__all__ = ["FindallEnrichInput"] +__all__ = ["FindAllEnrichInput"] -class FindallEnrichInput(BaseModel): +class FindAllEnrichInput(BaseModel): """Input model for FindAll enrich.""" output_schema: JsonSchema diff --git a/src/parallel/types/beta/findall_enrich_params.py b/src/parallel/types/beta/findall_enrich_params.py index e463d2b..b7b6db7 100644 --- a/src/parallel/types/beta/findall_enrich_params.py +++ b/src/parallel/types/beta/findall_enrich_params.py @@ -10,10 +10,10 @@ from ..json_schema_param import JsonSchemaParam from .parallel_beta_param import ParallelBetaParam -__all__ = ["FindallEnrichParams"] +__all__ = ["FindAllEnrichParams"] -class FindallEnrichParams(TypedDict, total=False): +class FindAllEnrichParams(TypedDict, total=False): output_schema: Required[JsonSchemaParam] """JSON schema for the enrichment output schema for the FindAll run.""" diff --git a/src/parallel/types/beta/findall_events_params.py b/src/parallel/types/beta/findall_events_params.py index 5b44129..1747020 100644 --- a/src/parallel/types/beta/findall_events_params.py +++ b/src/parallel/types/beta/findall_events_params.py @@ -8,10 +8,10 @@ from ..._utils import PropertyInfo from .parallel_beta_param import ParallelBetaParam -__all__ = ["FindallEventsParams"] +__all__ = ["FindAllEventsParams"] -class FindallEventsParams(TypedDict, total=False): +class FindAllEventsParams(TypedDict, total=False): last_event_id: Optional[str] api_timeout: Annotated[Optional[float], PropertyInfo(alias="timeout")] diff --git a/src/parallel/types/beta/findall_events_response.py b/src/parallel/types/beta/findall_events_response.py index eb4c3ed..ba7178c 100644 --- a/src/parallel/types/beta/findall_events_response.py +++ b/src/parallel/types/beta/findall_events_response.py @@ -5,13 +5,13 @@ from ..._utils import PropertyInfo from .error_event import ErrorEvent -from .findall_run_status_event import FindallRunStatusEvent -from .findall_schema_updated_event import FindallSchemaUpdatedEvent -from .findall_candidate_match_status_event import FindallCandidateMatchStatusEvent +from .findall_run_status_event import FindAllRunStatusEvent +from .findall_schema_updated_event import FindAllSchemaUpdatedEvent +from .findall_candidate_match_status_event import FindAllCandidateMatchStatusEvent -__all__ = ["FindallEventsResponse"] +__all__ = ["FindAllEventsResponse"] -FindallEventsResponse: TypeAlias = Annotated[ - Union[FindallSchemaUpdatedEvent, FindallRunStatusEvent, FindallCandidateMatchStatusEvent, ErrorEvent], +FindAllEventsResponse: TypeAlias = Annotated[ + Union[FindAllSchemaUpdatedEvent, FindAllRunStatusEvent, FindAllCandidateMatchStatusEvent, ErrorEvent], PropertyInfo(discriminator="type"), ] diff --git a/src/parallel/types/beta/findall_extend_params.py b/src/parallel/types/beta/findall_extend_params.py index 72577a9..d90226e 100644 --- a/src/parallel/types/beta/findall_extend_params.py +++ b/src/parallel/types/beta/findall_extend_params.py @@ -8,10 +8,10 @@ from ..._utils import PropertyInfo from .parallel_beta_param import ParallelBetaParam -__all__ = ["FindallExtendParams"] +__all__ = ["FindAllExtendParams"] -class FindallExtendParams(TypedDict, total=False): +class FindAllExtendParams(TypedDict, total=False): additional_match_limit: Required[int] """Additional number of matches to find for this FindAll run. diff --git a/src/parallel/types/beta/findall_ingest_params.py b/src/parallel/types/beta/findall_ingest_params.py index 498dece..fbdb3f3 100644 --- a/src/parallel/types/beta/findall_ingest_params.py +++ b/src/parallel/types/beta/findall_ingest_params.py @@ -8,10 +8,10 @@ from ..._utils import PropertyInfo from .parallel_beta_param import ParallelBetaParam -__all__ = ["FindallIngestParams"] +__all__ = ["FindAllIngestParams"] -class FindallIngestParams(TypedDict, total=False): +class FindAllIngestParams(TypedDict, total=False): objective: Required[str] """Natural language objective to create a FindAll run spec.""" diff --git a/src/parallel/types/beta/findall_run.py b/src/parallel/types/beta/findall_run.py index 2fad17c..8f5b1fb 100644 --- a/src/parallel/types/beta/findall_run.py +++ b/src/parallel/types/beta/findall_run.py @@ -5,7 +5,7 @@ from ..._models import BaseModel -__all__ = ["FindallRun", "Status", "StatusMetrics"] +__all__ = ["FindAllRun", "Status", "StatusMetrics"] class StatusMetrics(BaseModel): @@ -38,7 +38,7 @@ class Status(BaseModel): """Reason for termination when FindAll run is in terminal status.""" -class FindallRun(BaseModel): +class FindAllRun(BaseModel): """FindAll run object with status and metadata.""" findall_id: str diff --git a/src/parallel/types/beta/findall_run_result.py b/src/parallel/types/beta/findall_run_result.py index b6445a1..2b413f0 100644 --- a/src/parallel/types/beta/findall_run_result.py +++ b/src/parallel/types/beta/findall_run_result.py @@ -4,10 +4,10 @@ from typing_extensions import Literal from ..._models import BaseModel -from .findall_run import FindallRun +from .findall_run import FindAllRun from ..field_basis import FieldBasis -__all__ = ["FindallRunResult", "Candidate"] +__all__ = ["FindAllRunResult", "Candidate"] class Candidate(BaseModel): @@ -46,7 +46,7 @@ class Candidate(BaseModel): """ -class FindallRunResult(BaseModel): +class FindAllRunResult(BaseModel): """Complete FindAll search results. Represents a snapshot of a FindAll run, including run metadata and a list of @@ -57,7 +57,7 @@ class FindallRunResult(BaseModel): candidates: List[Candidate] """All evaluated candidates at the time of the snapshot.""" - run: FindallRun + run: FindAllRun """FindAll run object.""" last_event_id: Optional[str] = None diff --git a/src/parallel/types/beta/findall_run_status_event.py b/src/parallel/types/beta/findall_run_status_event.py index 1f3132f..48371ca 100644 --- a/src/parallel/types/beta/findall_run_status_event.py +++ b/src/parallel/types/beta/findall_run_status_event.py @@ -4,15 +4,15 @@ from typing_extensions import Literal from ..._models import BaseModel -from .findall_run import FindallRun +from .findall_run import FindAllRun -__all__ = ["FindallRunStatusEvent"] +__all__ = ["FindAllRunStatusEvent"] -class FindallRunStatusEvent(BaseModel): +class FindAllRunStatusEvent(BaseModel): """Event containing status update for FindAll run.""" - data: FindallRun + data: FindAllRun """Updated FindAll run information.""" event_id: str diff --git a/src/parallel/types/beta/findall_schema.py b/src/parallel/types/beta/findall_schema.py index a65e61b..7b9f4df 100644 --- a/src/parallel/types/beta/findall_schema.py +++ b/src/parallel/types/beta/findall_schema.py @@ -4,9 +4,9 @@ from typing_extensions import Literal from ..._models import BaseModel -from .findall_enrich_input import FindallEnrichInput +from .findall_enrich_input import FindAllEnrichInput -__all__ = ["FindallSchema", "MatchCondition"] +__all__ = ["FindAllSchema", "MatchCondition"] class MatchCondition(BaseModel): @@ -23,7 +23,7 @@ class MatchCondition(BaseModel): """Name of the match condition.""" -class FindallSchema(BaseModel): +class FindAllSchema(BaseModel): """Response model for FindAll ingest.""" entity_type: str @@ -35,7 +35,7 @@ class FindallSchema(BaseModel): objective: str """Natural language objective of the FindAll run.""" - enrichments: Optional[List[FindallEnrichInput]] = None + enrichments: Optional[List[FindAllEnrichInput]] = None """List of enrichment inputs for the FindAll run.""" generator: Optional[Literal["base", "core", "pro", "preview"]] = None diff --git a/src/parallel/types/beta/findall_schema_updated_event.py b/src/parallel/types/beta/findall_schema_updated_event.py index 1345db8..50054ad 100644 --- a/src/parallel/types/beta/findall_schema_updated_event.py +++ b/src/parallel/types/beta/findall_schema_updated_event.py @@ -4,15 +4,15 @@ from typing_extensions import Literal from ..._models import BaseModel -from .findall_schema import FindallSchema +from .findall_schema import FindAllSchema -__all__ = ["FindallSchemaUpdatedEvent"] +__all__ = ["FindAllSchemaUpdatedEvent"] -class FindallSchemaUpdatedEvent(BaseModel): +class FindAllSchemaUpdatedEvent(BaseModel): """Event containing full snapshot of FindAll run state.""" - data: FindallSchema + data: FindAllSchema """Updated FindAll schema.""" event_id: str diff --git a/src/parallel/types/shared/source_policy.py b/src/parallel/types/shared/source_policy.py index 281053c..7ea1deb 100644 --- a/src/parallel/types/shared/source_policy.py +++ b/src/parallel/types/shared/source_policy.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import List, Optional +from datetime import date from ..._models import BaseModel @@ -13,6 +14,13 @@ class SourcePolicy(BaseModel): This policy governs which sources are allowed/disallowed in results. """ + after_date: Optional[date] = None + """Optional start date for filtering search results. + + Results will be limited to content published on or after this date. Provided as + an RFC 3339 date string (YYYY-MM-DD). + """ + exclude_domains: Optional[List[str]] = None """List of domains to exclude from results. diff --git a/src/parallel/types/shared_params/source_policy.py b/src/parallel/types/shared_params/source_policy.py index 5770257..c3da049 100644 --- a/src/parallel/types/shared_params/source_policy.py +++ b/src/parallel/types/shared_params/source_policy.py @@ -2,9 +2,12 @@ from __future__ import annotations -from typing_extensions import TypedDict +from typing import Union +from datetime import date +from typing_extensions import Annotated, TypedDict from ..._types import SequenceNotStr +from ..._utils import PropertyInfo __all__ = ["SourcePolicy"] @@ -15,6 +18,13 @@ class SourcePolicy(TypedDict, total=False): This policy governs which sources are allowed/disallowed in results. """ + after_date: Annotated[Union[str, date, None], PropertyInfo(format="iso8601")] + """Optional start date for filtering search results. + + Results will be limited to content published on or after this date. Provided as + an RFC 3339 date string (YYYY-MM-DD). + """ + exclude_domains: SequenceNotStr[str] """List of domains to exclude from results. diff --git a/tests/api_resources/beta/test_findall.py b/tests/api_resources/beta/test_findall.py index 2738d8d..b4bb063 100644 --- a/tests/api_resources/beta/test_findall.py +++ b/tests/api_resources/beta/test_findall.py @@ -10,15 +10,15 @@ from parallel import Parallel, AsyncParallel from tests.utils import assert_matches_type from parallel.types.beta import ( - FindallRun, - FindallSchema, - FindallRunResult, + FindAllRun, + FindAllSchema, + FindAllRunResult, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") -class TestFindall: +class TestFindAll: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize @@ -35,7 +35,7 @@ def test_method_create(self, client: Parallel) -> None: match_limit=0, objective="objective", ) - assert_matches_type(FindallRun, findall, path=["response"]) + assert_matches_type(FindAllRun, findall, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Parallel) -> None: @@ -63,7 +63,7 @@ def test_method_create_with_all_params(self, client: Parallel) -> None: }, betas=["mcp-server-2025-07-17"], ) - assert_matches_type(FindallRun, findall, path=["response"]) + assert_matches_type(FindAllRun, findall, path=["response"]) @parametrize def test_raw_response_create(self, client: Parallel) -> None: @@ -83,7 +83,7 @@ def test_raw_response_create(self, client: Parallel) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = response.parse() - assert_matches_type(FindallRun, findall, path=["response"]) + assert_matches_type(FindAllRun, findall, path=["response"]) @parametrize def test_streaming_response_create(self, client: Parallel) -> None: @@ -103,7 +103,7 @@ def test_streaming_response_create(self, client: Parallel) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = response.parse() - assert_matches_type(FindallRun, findall, path=["response"]) + assert_matches_type(FindAllRun, findall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -112,7 +112,7 @@ def test_method_retrieve(self, client: Parallel) -> None: findall = client.beta.findall.retrieve( findall_id="findall_id", ) - assert_matches_type(FindallRun, findall, path=["response"]) + assert_matches_type(FindAllRun, findall, path=["response"]) @parametrize def test_method_retrieve_with_all_params(self, client: Parallel) -> None: @@ -120,7 +120,7 @@ def test_method_retrieve_with_all_params(self, client: Parallel) -> None: findall_id="findall_id", betas=["mcp-server-2025-07-17"], ) - assert_matches_type(FindallRun, findall, path=["response"]) + assert_matches_type(FindAllRun, findall, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Parallel) -> None: @@ -131,7 +131,7 @@ def test_raw_response_retrieve(self, client: Parallel) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = response.parse() - assert_matches_type(FindallRun, findall, path=["response"]) + assert_matches_type(FindAllRun, findall, path=["response"]) @parametrize def test_streaming_response_retrieve(self, client: Parallel) -> None: @@ -142,7 +142,7 @@ def test_streaming_response_retrieve(self, client: Parallel) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = response.parse() - assert_matches_type(FindallRun, findall, path=["response"]) + assert_matches_type(FindAllRun, findall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -212,7 +212,7 @@ def test_method_enrich(self, client: Parallel) -> None: } }, ) - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) @parametrize def test_method_enrich_with_all_params(self, client: Parallel) -> None: @@ -239,7 +239,7 @@ def test_method_enrich_with_all_params(self, client: Parallel) -> None: processor="processor", betas=["mcp-server-2025-07-17"], ) - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) @parametrize def test_raw_response_enrich(self, client: Parallel) -> None: @@ -258,7 +258,7 @@ def test_raw_response_enrich(self, client: Parallel) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = response.parse() - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) @parametrize def test_streaming_response_enrich(self, client: Parallel) -> None: @@ -277,7 +277,7 @@ def test_streaming_response_enrich(self, client: Parallel) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = response.parse() - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -354,7 +354,7 @@ def test_method_extend(self, client: Parallel) -> None: findall_id="findall_id", additional_match_limit=0, ) - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) @parametrize def test_method_extend_with_all_params(self, client: Parallel) -> None: @@ -363,7 +363,7 @@ def test_method_extend_with_all_params(self, client: Parallel) -> None: additional_match_limit=0, betas=["mcp-server-2025-07-17"], ) - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) @parametrize def test_raw_response_extend(self, client: Parallel) -> None: @@ -375,7 +375,7 @@ def test_raw_response_extend(self, client: Parallel) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = response.parse() - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) @parametrize def test_streaming_response_extend(self, client: Parallel) -> None: @@ -387,7 +387,7 @@ def test_streaming_response_extend(self, client: Parallel) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = response.parse() - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -404,7 +404,7 @@ def test_method_ingest(self, client: Parallel) -> None: findall = client.beta.findall.ingest( objective="Find all AI companies that raised Series A funding in 2024", ) - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) @parametrize def test_method_ingest_with_all_params(self, client: Parallel) -> None: @@ -412,7 +412,7 @@ def test_method_ingest_with_all_params(self, client: Parallel) -> None: objective="Find all AI companies that raised Series A funding in 2024", betas=["mcp-server-2025-07-17"], ) - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) @parametrize def test_raw_response_ingest(self, client: Parallel) -> None: @@ -423,7 +423,7 @@ def test_raw_response_ingest(self, client: Parallel) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = response.parse() - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) @parametrize def test_streaming_response_ingest(self, client: Parallel) -> None: @@ -434,7 +434,7 @@ def test_streaming_response_ingest(self, client: Parallel) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = response.parse() - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -443,7 +443,7 @@ def test_method_result(self, client: Parallel) -> None: findall = client.beta.findall.result( findall_id="findall_id", ) - assert_matches_type(FindallRunResult, findall, path=["response"]) + assert_matches_type(FindAllRunResult, findall, path=["response"]) @parametrize def test_method_result_with_all_params(self, client: Parallel) -> None: @@ -451,7 +451,7 @@ def test_method_result_with_all_params(self, client: Parallel) -> None: findall_id="findall_id", betas=["mcp-server-2025-07-17"], ) - assert_matches_type(FindallRunResult, findall, path=["response"]) + assert_matches_type(FindAllRunResult, findall, path=["response"]) @parametrize def test_raw_response_result(self, client: Parallel) -> None: @@ -462,7 +462,7 @@ def test_raw_response_result(self, client: Parallel) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = response.parse() - assert_matches_type(FindallRunResult, findall, path=["response"]) + assert_matches_type(FindAllRunResult, findall, path=["response"]) @parametrize def test_streaming_response_result(self, client: Parallel) -> None: @@ -473,7 +473,7 @@ def test_streaming_response_result(self, client: Parallel) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = response.parse() - assert_matches_type(FindallRunResult, findall, path=["response"]) + assert_matches_type(FindAllRunResult, findall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -489,7 +489,7 @@ def test_method_schema(self, client: Parallel) -> None: findall = client.beta.findall.schema( findall_id="findall_id", ) - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) @parametrize def test_method_schema_with_all_params(self, client: Parallel) -> None: @@ -497,7 +497,7 @@ def test_method_schema_with_all_params(self, client: Parallel) -> None: findall_id="findall_id", betas=["mcp-server-2025-07-17"], ) - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) @parametrize def test_raw_response_schema(self, client: Parallel) -> None: @@ -508,7 +508,7 @@ def test_raw_response_schema(self, client: Parallel) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = response.parse() - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) @parametrize def test_streaming_response_schema(self, client: Parallel) -> None: @@ -519,7 +519,7 @@ def test_streaming_response_schema(self, client: Parallel) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = response.parse() - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -531,7 +531,7 @@ def test_path_params_schema(self, client: Parallel) -> None: ) -class TestAsyncFindall: +class TestAsyncFindAll: parametrize = pytest.mark.parametrize( "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) @@ -550,7 +550,7 @@ async def test_method_create(self, async_client: AsyncParallel) -> None: match_limit=0, objective="objective", ) - assert_matches_type(FindallRun, findall, path=["response"]) + assert_matches_type(FindAllRun, findall, path=["response"]) @parametrize async def test_method_create_with_all_params(self, async_client: AsyncParallel) -> None: @@ -578,7 +578,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncParallel) }, betas=["mcp-server-2025-07-17"], ) - assert_matches_type(FindallRun, findall, path=["response"]) + assert_matches_type(FindAllRun, findall, path=["response"]) @parametrize async def test_raw_response_create(self, async_client: AsyncParallel) -> None: @@ -598,7 +598,7 @@ async def test_raw_response_create(self, async_client: AsyncParallel) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = await response.parse() - assert_matches_type(FindallRun, findall, path=["response"]) + assert_matches_type(FindAllRun, findall, path=["response"]) @parametrize async def test_streaming_response_create(self, async_client: AsyncParallel) -> None: @@ -618,7 +618,7 @@ async def test_streaming_response_create(self, async_client: AsyncParallel) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = await response.parse() - assert_matches_type(FindallRun, findall, path=["response"]) + assert_matches_type(FindAllRun, findall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -627,7 +627,7 @@ async def test_method_retrieve(self, async_client: AsyncParallel) -> None: findall = await async_client.beta.findall.retrieve( findall_id="findall_id", ) - assert_matches_type(FindallRun, findall, path=["response"]) + assert_matches_type(FindAllRun, findall, path=["response"]) @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncParallel) -> None: @@ -635,7 +635,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncParallel findall_id="findall_id", betas=["mcp-server-2025-07-17"], ) - assert_matches_type(FindallRun, findall, path=["response"]) + assert_matches_type(FindAllRun, findall, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncParallel) -> None: @@ -646,7 +646,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncParallel) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = await response.parse() - assert_matches_type(FindallRun, findall, path=["response"]) + assert_matches_type(FindAllRun, findall, path=["response"]) @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncParallel) -> None: @@ -657,7 +657,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncParallel) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = await response.parse() - assert_matches_type(FindallRun, findall, path=["response"]) + assert_matches_type(FindAllRun, findall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -727,7 +727,7 @@ async def test_method_enrich(self, async_client: AsyncParallel) -> None: } }, ) - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) @parametrize async def test_method_enrich_with_all_params(self, async_client: AsyncParallel) -> None: @@ -754,7 +754,7 @@ async def test_method_enrich_with_all_params(self, async_client: AsyncParallel) processor="processor", betas=["mcp-server-2025-07-17"], ) - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) @parametrize async def test_raw_response_enrich(self, async_client: AsyncParallel) -> None: @@ -773,7 +773,7 @@ async def test_raw_response_enrich(self, async_client: AsyncParallel) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = await response.parse() - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) @parametrize async def test_streaming_response_enrich(self, async_client: AsyncParallel) -> None: @@ -792,7 +792,7 @@ async def test_streaming_response_enrich(self, async_client: AsyncParallel) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = await response.parse() - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -869,7 +869,7 @@ async def test_method_extend(self, async_client: AsyncParallel) -> None: findall_id="findall_id", additional_match_limit=0, ) - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) @parametrize async def test_method_extend_with_all_params(self, async_client: AsyncParallel) -> None: @@ -878,7 +878,7 @@ async def test_method_extend_with_all_params(self, async_client: AsyncParallel) additional_match_limit=0, betas=["mcp-server-2025-07-17"], ) - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) @parametrize async def test_raw_response_extend(self, async_client: AsyncParallel) -> None: @@ -890,7 +890,7 @@ async def test_raw_response_extend(self, async_client: AsyncParallel) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = await response.parse() - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) @parametrize async def test_streaming_response_extend(self, async_client: AsyncParallel) -> None: @@ -902,7 +902,7 @@ async def test_streaming_response_extend(self, async_client: AsyncParallel) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = await response.parse() - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -919,7 +919,7 @@ async def test_method_ingest(self, async_client: AsyncParallel) -> None: findall = await async_client.beta.findall.ingest( objective="Find all AI companies that raised Series A funding in 2024", ) - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) @parametrize async def test_method_ingest_with_all_params(self, async_client: AsyncParallel) -> None: @@ -927,7 +927,7 @@ async def test_method_ingest_with_all_params(self, async_client: AsyncParallel) objective="Find all AI companies that raised Series A funding in 2024", betas=["mcp-server-2025-07-17"], ) - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) @parametrize async def test_raw_response_ingest(self, async_client: AsyncParallel) -> None: @@ -938,7 +938,7 @@ async def test_raw_response_ingest(self, async_client: AsyncParallel) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = await response.parse() - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) @parametrize async def test_streaming_response_ingest(self, async_client: AsyncParallel) -> None: @@ -949,7 +949,7 @@ async def test_streaming_response_ingest(self, async_client: AsyncParallel) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = await response.parse() - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -958,7 +958,7 @@ async def test_method_result(self, async_client: AsyncParallel) -> None: findall = await async_client.beta.findall.result( findall_id="findall_id", ) - assert_matches_type(FindallRunResult, findall, path=["response"]) + assert_matches_type(FindAllRunResult, findall, path=["response"]) @parametrize async def test_method_result_with_all_params(self, async_client: AsyncParallel) -> None: @@ -966,7 +966,7 @@ async def test_method_result_with_all_params(self, async_client: AsyncParallel) findall_id="findall_id", betas=["mcp-server-2025-07-17"], ) - assert_matches_type(FindallRunResult, findall, path=["response"]) + assert_matches_type(FindAllRunResult, findall, path=["response"]) @parametrize async def test_raw_response_result(self, async_client: AsyncParallel) -> None: @@ -977,7 +977,7 @@ async def test_raw_response_result(self, async_client: AsyncParallel) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = await response.parse() - assert_matches_type(FindallRunResult, findall, path=["response"]) + assert_matches_type(FindAllRunResult, findall, path=["response"]) @parametrize async def test_streaming_response_result(self, async_client: AsyncParallel) -> None: @@ -988,7 +988,7 @@ async def test_streaming_response_result(self, async_client: AsyncParallel) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = await response.parse() - assert_matches_type(FindallRunResult, findall, path=["response"]) + assert_matches_type(FindAllRunResult, findall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1004,7 +1004,7 @@ async def test_method_schema(self, async_client: AsyncParallel) -> None: findall = await async_client.beta.findall.schema( findall_id="findall_id", ) - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) @parametrize async def test_method_schema_with_all_params(self, async_client: AsyncParallel) -> None: @@ -1012,7 +1012,7 @@ async def test_method_schema_with_all_params(self, async_client: AsyncParallel) findall_id="findall_id", betas=["mcp-server-2025-07-17"], ) - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) @parametrize async def test_raw_response_schema(self, async_client: AsyncParallel) -> None: @@ -1023,7 +1023,7 @@ async def test_raw_response_schema(self, async_client: AsyncParallel) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = await response.parse() - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) @parametrize async def test_streaming_response_schema(self, async_client: AsyncParallel) -> None: @@ -1034,7 +1034,7 @@ async def test_streaming_response_schema(self, async_client: AsyncParallel) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" findall = await response.parse() - assert_matches_type(FindallSchema, findall, path=["response"]) + assert_matches_type(FindAllSchema, findall, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/beta/test_task_group.py b/tests/api_resources/beta/test_task_group.py index 664b2f7..321e47e 100644 --- a/tests/api_resources/beta/test_task_group.py +++ b/tests/api_resources/beta/test_task_group.py @@ -9,6 +9,7 @@ from parallel import Parallel, AsyncParallel from tests.utils import assert_matches_type +from parallel._utils import parse_date from parallel.types.beta import ( TaskGroup, TaskGroupRunResponse, @@ -123,6 +124,7 @@ def test_method_add_runs_with_all_params(self, client: Parallel) -> None: ], "metadata": {"foo": "string"}, "source_policy": { + "after_date": parse_date("2024-01-01"), "exclude_domains": ["reddit.com", "x.com", ".ai"], "include_domains": ["wikipedia.org", "usa.gov", ".edu"], }, @@ -422,6 +424,7 @@ async def test_method_add_runs_with_all_params(self, async_client: AsyncParallel ], "metadata": {"foo": "string"}, "source_policy": { + "after_date": parse_date("2024-01-01"), "exclude_domains": ["reddit.com", "x.com", ".ai"], "include_domains": ["wikipedia.org", "usa.gov", ".edu"], }, diff --git a/tests/api_resources/beta/test_task_run.py b/tests/api_resources/beta/test_task_run.py index 766ea43..6728cbd 100644 --- a/tests/api_resources/beta/test_task_run.py +++ b/tests/api_resources/beta/test_task_run.py @@ -10,6 +10,7 @@ from parallel import Parallel, AsyncParallel from tests.utils import assert_matches_type from parallel.types import TaskRun +from parallel._utils import parse_date from parallel.types.beta import BetaTaskRunResult base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -43,6 +44,7 @@ def test_method_create_with_all_params(self, client: Parallel) -> None: ], metadata={"foo": "string"}, source_policy={ + "after_date": parse_date("2024-01-01"), "exclude_domains": ["reddit.com", "x.com", ".ai"], "include_domains": ["wikipedia.org", "usa.gov", ".edu"], }, @@ -211,6 +213,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncParallel) ], metadata={"foo": "string"}, source_policy={ + "after_date": parse_date("2024-01-01"), "exclude_domains": ["reddit.com", "x.com", ".ai"], "include_domains": ["wikipedia.org", "usa.gov", ".edu"], }, diff --git a/tests/api_resources/test_beta.py b/tests/api_resources/test_beta.py index e4f1632..02f4f66 100644 --- a/tests/api_resources/test_beta.py +++ b/tests/api_resources/test_beta.py @@ -9,6 +9,7 @@ from parallel import Parallel, AsyncParallel from tests.utils import assert_matches_type +from parallel._utils import parse_date from parallel.types.beta import ( SearchResult, ExtractResponse, @@ -95,6 +96,7 @@ def test_method_search_with_all_params(self, client: Parallel) -> None: processor="base", search_queries=["string"], source_policy={ + "after_date": parse_date("2024-01-01"), "exclude_domains": ["reddit.com", "x.com", ".ai"], "include_domains": ["wikipedia.org", "usa.gov", ".edu"], }, @@ -203,6 +205,7 @@ async def test_method_search_with_all_params(self, async_client: AsyncParallel) processor="base", search_queries=["string"], source_policy={ + "after_date": parse_date("2024-01-01"), "exclude_domains": ["reddit.com", "x.com", ".ai"], "include_domains": ["wikipedia.org", "usa.gov", ".edu"], }, diff --git a/tests/api_resources/test_task_run.py b/tests/api_resources/test_task_run.py index 93d2982..197c31b 100644 --- a/tests/api_resources/test_task_run.py +++ b/tests/api_resources/test_task_run.py @@ -10,6 +10,7 @@ from parallel import Parallel, AsyncParallel from tests.utils import assert_matches_type from parallel.types import TaskRun, TaskRunResult +from parallel._utils import parse_date base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -32,6 +33,7 @@ def test_method_create_with_all_params(self, client: Parallel) -> None: processor="base", metadata={"foo": "string"}, source_policy={ + "after_date": parse_date("2024-01-01"), "exclude_domains": ["reddit.com", "x.com", ".ai"], "include_domains": ["wikipedia.org", "usa.gov", ".edu"], }, @@ -181,6 +183,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncParallel) processor="base", metadata={"foo": "string"}, source_policy={ + "after_date": parse_date("2024-01-01"), "exclude_domains": ["reddit.com", "x.com", ".ai"], "include_domains": ["wikipedia.org", "usa.gov", ".edu"], }, From 71a35c2a4af20bd99bfd2925ed14bd82510c8c5e Mon Sep 17 00:00:00 2001 From: Kumar Saunack Date: Mon, 12 Jan 2026 17:00:34 -0800 Subject: [PATCH 16/18] add alias for old findall objects --- src/parallel/resources/beta/__init__.py | 12 ++ src/parallel/resources/beta/findall.py | 108 ++++++++++++------ src/parallel/types/beta/__init__.py | 54 ++++++--- .../findall_candidate_match_status_event.py | 6 +- .../types/beta/findall_create_params.py | 6 +- .../types/beta/findall_enrich_input.py | 6 +- .../types/beta/findall_enrich_params.py | 6 +- .../types/beta/findall_events_params.py | 6 +- .../types/beta/findall_events_response.py | 6 +- .../types/beta/findall_extend_params.py | 6 +- .../types/beta/findall_ingest_params.py | 6 +- .../types/beta/findall_retrieve_response.py | 4 - src/parallel/types/beta/findall_run.py | 6 +- src/parallel/types/beta/findall_run_result.py | 6 +- .../types/beta/findall_run_status_event.py | 6 +- src/parallel/types/beta/findall_schema.py | 6 +- .../beta/findall_schema_updated_event.py | 6 +- 17 files changed, 188 insertions(+), 68 deletions(-) delete mode 100644 src/parallel/types/beta/findall_retrieve_response.py diff --git a/src/parallel/resources/beta/__init__.py b/src/parallel/resources/beta/__init__.py index 6cae1b3..5488ddb 100644 --- a/src/parallel/resources/beta/__init__.py +++ b/src/parallel/resources/beta/__init__.py @@ -10,11 +10,17 @@ ) from .findall import ( FindAllResource, + FindallResource, AsyncFindAllResource, + AsyncFindallResource, FindAllResourceWithRawResponse, + FindallResourceWithRawResponse, AsyncFindAllResourceWithRawResponse, + AsyncFindallResourceWithRawResponse, FindAllResourceWithStreamingResponse, + FindallResourceWithStreamingResponse, AsyncFindAllResourceWithStreamingResponse, + AsyncFindallResourceWithStreamingResponse, ) from .task_run import ( TaskRunResource, @@ -52,6 +58,12 @@ "AsyncFindAllResourceWithRawResponse", "FindAllResourceWithStreamingResponse", "AsyncFindAllResourceWithStreamingResponse", + "FindallResource", + "AsyncFindallResource", + "FindallResourceWithRawResponse", + "AsyncFindallResourceWithRawResponse", + "FindallResourceWithStreamingResponse", + "AsyncFindallResourceWithStreamingResponse", "BetaResource", "AsyncBetaResource", "BetaResourceWithRawResponse", diff --git a/src/parallel/resources/beta/findall.py b/src/parallel/resources/beta/findall.py index 5bbf14a..b2cf437 100644 --- a/src/parallel/resources/beta/findall.py +++ b/src/parallel/resources/beta/findall.py @@ -36,7 +36,20 @@ from ...types.beta.parallel_beta_param import ParallelBetaParam from ...types.beta.findall_events_response import FindAllEventsResponse -__all__ = ["FindAllResource", "AsyncFindAllResource"] +__all__ = [ + "FindAllResource", + "AsyncFindAllResource", + "FindAllResourceWithRawResponse", + "AsyncFindAllResourceWithRawResponse", + "FindAllResourceWithStreamingResponse", + "AsyncFindAllResourceWithStreamingResponse", + "FindallResource", + "AsyncFindallResource", + "FindallResourceWithRawResponse", + "AsyncFindallResourceWithRawResponse", + "FindallResourceWithStreamingResponse", + "AsyncFindallResourceWithStreamingResponse", +] class FindAllResource(SyncAPIResource): @@ -123,14 +136,14 @@ def create( extra_headers = { **strip_not_given( { - "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-02-01"])) + "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-09-15"])) if is_given(betas) else not_given } ), **(extra_headers or {}), } - extra_headers = {"parallel-beta": "findall-2025-02-01", **(extra_headers or {})} + extra_headers = {"parallel-beta": "findall-2025-09-15", **(extra_headers or {})} return self._post( "/v1beta/findall/runs", body=maybe_transform( @@ -183,14 +196,14 @@ def retrieve( extra_headers = { **strip_not_given( { - "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-02-01"])) + "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-09-15"])) if is_given(betas) else not_given } ), **(extra_headers or {}), } - extra_headers = {"parallel-beta": "findall-2025-02-01", **(extra_headers or {})} + extra_headers = {"parallel-beta": "findall-2025-09-15", **(extra_headers or {})} return self._get( f"/v1beta/findall/runs/{findall_id}", options=make_request_options( @@ -230,14 +243,14 @@ def cancel( extra_headers = { **strip_not_given( { - "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-02-01"])) + "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-09-15"])) if is_given(betas) else not_given } ), **(extra_headers or {}), } - extra_headers = {"parallel-beta": "findall-2025-02-01", **(extra_headers or {})} + extra_headers = {"parallel-beta": "findall-2025-09-15", **(extra_headers or {})} return self._post( f"/v1beta/findall/runs/{findall_id}/cancel", options=make_request_options( @@ -286,14 +299,14 @@ def enrich( extra_headers = { **strip_not_given( { - "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-02-01"])) + "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-09-15"])) if is_given(betas) else not_given } ), **(extra_headers or {}), } - extra_headers = {"parallel-beta": "findall-2025-02-01", **(extra_headers or {})} + extra_headers = {"parallel-beta": "findall-2025-09-15", **(extra_headers or {})} return self._post( f"/v1beta/findall/runs/{findall_id}/enrich", body=maybe_transform( @@ -349,14 +362,14 @@ def events( extra_headers = { **strip_not_given( { - "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-02-01"])) + "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-09-15"])) if is_given(betas) else not_given } ), **(extra_headers or {}), } - extra_headers = {"parallel-beta": "findall-2025-02-01", **(extra_headers or {})} + extra_headers = {"parallel-beta": "findall-2025-09-15", **(extra_headers or {})} return self._get( f"/v1beta/findall/runs/{findall_id}/events", options=make_request_options( @@ -413,14 +426,14 @@ def extend( extra_headers = { **strip_not_given( { - "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-02-01"])) + "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-09-15"])) if is_given(betas) else not_given } ), **(extra_headers or {}), } - extra_headers = {"parallel-beta": "findall-2025-02-01", **(extra_headers or {})} + extra_headers = {"parallel-beta": "findall-2025-09-15", **(extra_headers or {})} return self._post( f"/v1beta/findall/runs/{findall_id}/extend", body=maybe_transform( @@ -468,14 +481,14 @@ def ingest( extra_headers = { **strip_not_given( { - "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-02-01"])) + "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-09-15"])) if is_given(betas) else not_given } ), **(extra_headers or {}), } - extra_headers = {"parallel-beta": "findall-2025-02-01", **(extra_headers or {})} + extra_headers = {"parallel-beta": "findall-2025-09-15", **(extra_headers or {})} return self._post( "/v1beta/findall/ingest", body=maybe_transform({"objective": objective}, findall_ingest_params.FindAllIngestParams), @@ -516,14 +529,14 @@ def result( extra_headers = { **strip_not_given( { - "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-02-01"])) + "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-09-15"])) if is_given(betas) else not_given } ), **(extra_headers or {}), } - extra_headers = {"parallel-beta": "findall-2025-02-01", **(extra_headers or {})} + extra_headers = {"parallel-beta": "findall-2025-09-15", **(extra_headers or {})} return self._get( f"/v1beta/findall/runs/{findall_id}/result", options=make_request_options( @@ -563,14 +576,14 @@ def schema( extra_headers = { **strip_not_given( { - "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-02-01"])) + "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-09-15"])) if is_given(betas) else not_given } ), **(extra_headers or {}), } - extra_headers = {"parallel-beta": "findall-2025-02-01", **(extra_headers or {})} + extra_headers = {"parallel-beta": "findall-2025-09-15", **(extra_headers or {})} return self._get( f"/v1beta/findall/runs/{findall_id}/schema", options=make_request_options( @@ -664,14 +677,14 @@ async def create( extra_headers = { **strip_not_given( { - "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-02-01"])) + "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-09-15"])) if is_given(betas) else not_given } ), **(extra_headers or {}), } - extra_headers = {"parallel-beta": "findall-2025-02-01", **(extra_headers or {})} + extra_headers = {"parallel-beta": "findall-2025-09-15", **(extra_headers or {})} return await self._post( "/v1beta/findall/runs", body=await async_maybe_transform( @@ -724,14 +737,14 @@ async def retrieve( extra_headers = { **strip_not_given( { - "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-02-01"])) + "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-09-15"])) if is_given(betas) else not_given } ), **(extra_headers or {}), } - extra_headers = {"parallel-beta": "findall-2025-02-01", **(extra_headers or {})} + extra_headers = {"parallel-beta": "findall-2025-09-15", **(extra_headers or {})} return await self._get( f"/v1beta/findall/runs/{findall_id}", options=make_request_options( @@ -771,14 +784,14 @@ async def cancel( extra_headers = { **strip_not_given( { - "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-02-01"])) + "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-09-15"])) if is_given(betas) else not_given } ), **(extra_headers or {}), } - extra_headers = {"parallel-beta": "findall-2025-02-01", **(extra_headers or {})} + extra_headers = {"parallel-beta": "findall-2025-09-15", **(extra_headers or {})} return await self._post( f"/v1beta/findall/runs/{findall_id}/cancel", options=make_request_options( @@ -827,14 +840,14 @@ async def enrich( extra_headers = { **strip_not_given( { - "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-02-01"])) + "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-09-15"])) if is_given(betas) else not_given } ), **(extra_headers or {}), } - extra_headers = {"parallel-beta": "findall-2025-02-01", **(extra_headers or {})} + extra_headers = {"parallel-beta": "findall-2025-09-15", **(extra_headers or {})} return await self._post( f"/v1beta/findall/runs/{findall_id}/enrich", body=await async_maybe_transform( @@ -890,14 +903,14 @@ async def events( extra_headers = { **strip_not_given( { - "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-02-01"])) + "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-09-15"])) if is_given(betas) else not_given } ), **(extra_headers or {}), } - extra_headers = {"parallel-beta": "findall-2025-02-01", **(extra_headers or {})} + extra_headers = {"parallel-beta": "findall-2025-09-15", **(extra_headers or {})} return await self._get( f"/v1beta/findall/runs/{findall_id}/events", options=make_request_options( @@ -954,14 +967,14 @@ async def extend( extra_headers = { **strip_not_given( { - "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-02-01"])) + "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-09-15"])) if is_given(betas) else not_given } ), **(extra_headers or {}), } - extra_headers = {"parallel-beta": "findall-2025-02-01", **(extra_headers or {})} + extra_headers = {"parallel-beta": "findall-2025-09-15", **(extra_headers or {})} return await self._post( f"/v1beta/findall/runs/{findall_id}/extend", body=await async_maybe_transform( @@ -1009,14 +1022,14 @@ async def ingest( extra_headers = { **strip_not_given( { - "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-02-01"])) + "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-09-15"])) if is_given(betas) else not_given } ), **(extra_headers or {}), } - extra_headers = {"parallel-beta": "findall-2025-02-01", **(extra_headers or {})} + extra_headers = {"parallel-beta": "findall-2025-09-15", **(extra_headers or {})} return await self._post( "/v1beta/findall/ingest", body=await async_maybe_transform({"objective": objective}, findall_ingest_params.FindAllIngestParams), @@ -1057,14 +1070,14 @@ async def result( extra_headers = { **strip_not_given( { - "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-02-01"])) + "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-09-15"])) if is_given(betas) else not_given } ), **(extra_headers or {}), } - extra_headers = {"parallel-beta": "findall-2025-02-01", **(extra_headers or {})} + extra_headers = {"parallel-beta": "findall-2025-09-15", **(extra_headers or {})} return await self._get( f"/v1beta/findall/runs/{findall_id}/result", options=make_request_options( @@ -1104,14 +1117,14 @@ async def schema( extra_headers = { **strip_not_given( { - "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-02-01"])) + "parallel-beta": ",".join(chain((str(e) for e in betas), ["findall-2025-09-15"])) if is_given(betas) else not_given } ), **(extra_headers or {}), } - extra_headers = {"parallel-beta": "findall-2025-02-01", **(extra_headers or {})} + extra_headers = {"parallel-beta": "findall-2025-09-15", **(extra_headers or {})} return await self._get( f"/v1beta/findall/runs/{findall_id}/schema", options=make_request_options( @@ -1251,3 +1264,24 @@ def __init__(self, findall: AsyncFindAllResource) -> None: self.schema = async_to_streamed_response_wrapper( findall.schema, ) + + +FindallResource = FindAllResource # for backwards compatibility with v0.3.4 +"""This is deprecated, `FindAllResource` should be used instead""" + +AsyncFindallResource = AsyncFindAllResource # for backwards compatibility with v0.3.4 +"""This is deprecated, `AsyncFindAllResource` should be used instead""" + +FindallResourceWithRawResponse = FindAllResourceWithRawResponse # for backwards compatibility with v0.3.4 +"""This is deprecated, `FindAllResourceWithRawResponse` should be used instead""" + +AsyncFindallResourceWithRawResponse = AsyncFindAllResourceWithRawResponse # for backwards compatibility with v0.3.4 +"""This is deprecated, `AsyncFindAllResourceWithRawResponse` should be used instead""" + +FindallResourceWithStreamingResponse = FindAllResourceWithStreamingResponse # for backwards compatibility with v0.3.4 +"""This is deprecated, `FindAllResourceWithStreamingResponse` should be used instead""" + +AsyncFindallResourceWithStreamingResponse = ( + AsyncFindAllResourceWithStreamingResponse # for backwards compatibility with v0.3.4 +) +"""This is deprecated, `AsyncFindAllResourceWithStreamingResponse` should be used instead""" diff --git a/src/parallel/types/beta/__init__.py b/src/parallel/types/beta/__init__.py index 269cfe1..ef052aa 100644 --- a/src/parallel/types/beta/__init__.py +++ b/src/parallel/types/beta/__init__.py @@ -7,14 +7,14 @@ from .task_group import TaskGroup as TaskGroup from .usage_item import UsageItem as UsageItem from .error_event import ErrorEvent as ErrorEvent -from .findall_run import FindAllRun as FindAllRun +from .findall_run import FindAllRun as FindAllRun, FindallRun as FindallRun from .extract_error import ExtractError as ExtractError from .mcp_tool_call import McpToolCall as McpToolCall from .search_result import SearchResult as SearchResult from .webhook_param import WebhookParam as WebhookParam from .beta_run_input import BetaRunInput as BetaRunInput from .extract_result import ExtractResult as ExtractResult -from .findall_schema import FindAllSchema as FindAllSchema +from .findall_schema import FindAllSchema as FindAllSchema, FindallSchema as FindallSchema from .task_run_event import TaskRunEvent as TaskRunEvent from .extract_response import ExtractResponse as ExtractResponse from .mcp_server_param import McpServerParam as McpServerParam @@ -22,30 +22,56 @@ 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 .findall_run_result import FindAllRunResult as FindAllRunResult +from .findall_run_result import FindAllRunResult as FindAllRunResult, FindallRunResult as FindallRunResult 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 from .beta_task_run_result import BetaTaskRunResult as BetaTaskRunResult -from .findall_enrich_input import FindAllEnrichInput as FindAllEnrichInput -from .findall_create_params import FindAllCreateParams as FindAllCreateParams -from .findall_enrich_params import FindAllEnrichParams as FindAllEnrichParams -from .findall_events_params import FindAllEventsParams as FindAllEventsParams -from .findall_extend_params import FindAllExtendParams as FindAllExtendParams -from .findall_ingest_params import FindAllIngestParams as FindAllIngestParams +from .findall_enrich_input import FindAllEnrichInput as FindAllEnrichInput, FindallEnrichInput as FindallEnrichInput +from .findall_create_params import ( + FindAllCreateParams as FindAllCreateParams, + FindallCreateParams as FindallCreateParams, +) +from .findall_enrich_params import ( + FindAllEnrichParams as FindAllEnrichParams, + FindallEnrichParams as FindallEnrichParams, +) +from .findall_events_params import ( + FindAllEventsParams as FindAllEventsParams, + FindallEventsParams as FindallEventsParams, +) +from .findall_extend_params import ( + FindAllExtendParams as FindAllExtendParams, + FindallExtendParams as FindallExtendParams, +) +from .findall_ingest_params import ( + FindAllIngestParams as FindAllIngestParams, + FindallIngestParams as FindallIngestParams, +) from .excerpt_settings_param import ExcerptSettingsParam as ExcerptSettingsParam from .task_run_create_params import TaskRunCreateParams as TaskRunCreateParams from .task_run_result_params import TaskRunResultParams as TaskRunResultParams -from .findall_events_response import FindAllEventsResponse as FindAllEventsResponse +from .findall_events_response import ( + FindAllEventsResponse as FindAllEventsResponse, + FindallEventsResponse as FindallEventsResponse, +) from .task_group_run_response import TaskGroupRunResponse as TaskGroupRunResponse -from .findall_run_status_event import FindAllRunStatusEvent as FindAllRunStatusEvent +from .findall_run_status_event import ( + FindAllRunStatusEvent as FindAllRunStatusEvent, + FindallRunStatusEvent as FindallRunStatusEvent, +) from .task_group_create_params import TaskGroupCreateParams as TaskGroupCreateParams from .task_group_events_params import TaskGroupEventsParams as TaskGroupEventsParams from .task_run_events_response import TaskRunEventsResponse as TaskRunEventsResponse -from .findall_retrieve_response import FindallRetrieveResponse as FindallRetrieveResponse from .task_group_add_runs_params import TaskGroupAddRunsParams as TaskGroupAddRunsParams from .task_group_events_response import TaskGroupEventsResponse as TaskGroupEventsResponse from .task_group_get_runs_params import TaskGroupGetRunsParams as TaskGroupGetRunsParams -from .findall_schema_updated_event import FindAllSchemaUpdatedEvent as FindAllSchemaUpdatedEvent +from .findall_schema_updated_event import ( + FindAllSchemaUpdatedEvent as FindAllSchemaUpdatedEvent, + FindallSchemaUpdatedEvent as FindallSchemaUpdatedEvent, +) from .task_group_get_runs_response import TaskGroupGetRunsResponse as TaskGroupGetRunsResponse -from .findall_candidate_match_status_event import FindAllCandidateMatchStatusEvent as FindAllCandidateMatchStatusEvent +from .findall_candidate_match_status_event import ( + FindAllCandidateMatchStatusEvent as FindAllCandidateMatchStatusEvent, + FindallCandidateMatchStatusEvent as FindallCandidateMatchStatusEvent, +) diff --git a/src/parallel/types/beta/findall_candidate_match_status_event.py b/src/parallel/types/beta/findall_candidate_match_status_event.py index 5f7e3bb..01ebf20 100644 --- a/src/parallel/types/beta/findall_candidate_match_status_event.py +++ b/src/parallel/types/beta/findall_candidate_match_status_event.py @@ -7,7 +7,7 @@ from ..._models import BaseModel from ..field_basis import FieldBasis -__all__ = ["FindAllCandidateMatchStatusEvent", "Data"] +__all__ = ["FindAllCandidateMatchStatusEvent", "FindallCandidateMatchStatusEvent", "Data"] class Data(BaseModel): @@ -66,3 +66,7 @@ class FindAllCandidateMatchStatusEvent(BaseModel): findall.candidate.unmatched, findall.candidate.discarded, findall.candidate.enriched. """ + + +FindallCandidateMatchStatusEvent = FindAllCandidateMatchStatusEvent # for backwards compatibility with v0.3.4 +"""This is deprecated, `FindAllCandidateMatchStatusEvent` should be used instead""" diff --git a/src/parallel/types/beta/findall_create_params.py b/src/parallel/types/beta/findall_create_params.py index 9fb2093..d4dbed2 100644 --- a/src/parallel/types/beta/findall_create_params.py +++ b/src/parallel/types/beta/findall_create_params.py @@ -9,7 +9,7 @@ from .webhook_param import WebhookParam from .parallel_beta_param import ParallelBetaParam -__all__ = ["FindAllCreateParams", "MatchCondition", "ExcludeList"] +__all__ = ["FindAllCreateParams", "FindallCreateParams", "MatchCondition", "ExcludeList"] class FindAllCreateParams(TypedDict, total=False): @@ -66,3 +66,7 @@ class ExcludeList(TypedDict, total=False): url: Required[str] """URL of the entity to exclude from results.""" + + +FindallCreateParams = FindAllCreateParams # for backwards compatibility with v0.3.4 +"""This is deprecated, `FindAllCreateParams` should be used instead""" diff --git a/src/parallel/types/beta/findall_enrich_input.py b/src/parallel/types/beta/findall_enrich_input.py index 56aa147..8b16a9e 100644 --- a/src/parallel/types/beta/findall_enrich_input.py +++ b/src/parallel/types/beta/findall_enrich_input.py @@ -6,7 +6,7 @@ from .mcp_server import McpServer from ..json_schema import JsonSchema -__all__ = ["FindAllEnrichInput"] +__all__ = ["FindAllEnrichInput", "FindallEnrichInput"] class FindAllEnrichInput(BaseModel): @@ -20,3 +20,7 @@ class FindAllEnrichInput(BaseModel): processor: Optional[str] = None """Processor to use for the task.""" + + +FindallEnrichInput = FindAllEnrichInput # for backwards compatibility with v0.3.4 +"""This is deprecated, `FindAllEnrichInput` should be used instead""" diff --git a/src/parallel/types/beta/findall_enrich_params.py b/src/parallel/types/beta/findall_enrich_params.py index b7b6db7..f2e3490 100644 --- a/src/parallel/types/beta/findall_enrich_params.py +++ b/src/parallel/types/beta/findall_enrich_params.py @@ -10,7 +10,7 @@ from ..json_schema_param import JsonSchemaParam from .parallel_beta_param import ParallelBetaParam -__all__ = ["FindAllEnrichParams"] +__all__ = ["FindAllEnrichParams", "FindallEnrichParams"] class FindAllEnrichParams(TypedDict, total=False): @@ -25,3 +25,7 @@ class FindAllEnrichParams(TypedDict, total=False): betas: Annotated[List[ParallelBetaParam], PropertyInfo(alias="parallel-beta")] """Optional header to specify the beta version(s) to enable.""" + + +FindallEnrichParams = FindAllEnrichParams # for backwards compatibility with v0.3.4 +"""This is deprecated, `FindAllEnrichParams` should be used instead""" diff --git a/src/parallel/types/beta/findall_events_params.py b/src/parallel/types/beta/findall_events_params.py index 1747020..f818b1b 100644 --- a/src/parallel/types/beta/findall_events_params.py +++ b/src/parallel/types/beta/findall_events_params.py @@ -8,7 +8,7 @@ from ..._utils import PropertyInfo from .parallel_beta_param import ParallelBetaParam -__all__ = ["FindAllEventsParams"] +__all__ = ["FindAllEventsParams", "FindallEventsParams"] class FindAllEventsParams(TypedDict, total=False): @@ -18,3 +18,7 @@ class FindAllEventsParams(TypedDict, total=False): betas: Annotated[List[ParallelBetaParam], PropertyInfo(alias="parallel-beta")] """Optional header to specify the beta version(s) to enable.""" + + +FindallEventsParams = FindAllEventsParams # for backwards compatibility with v0.3.4 +"""This is deprecated, `FindAllEventsParams` should be used instead""" diff --git a/src/parallel/types/beta/findall_events_response.py b/src/parallel/types/beta/findall_events_response.py index ba7178c..f3cd93e 100644 --- a/src/parallel/types/beta/findall_events_response.py +++ b/src/parallel/types/beta/findall_events_response.py @@ -9,9 +9,13 @@ from .findall_schema_updated_event import FindAllSchemaUpdatedEvent from .findall_candidate_match_status_event import FindAllCandidateMatchStatusEvent -__all__ = ["FindAllEventsResponse"] +__all__ = ["FindAllEventsResponse", "FindallEventsResponse"] FindAllEventsResponse: TypeAlias = Annotated[ Union[FindAllSchemaUpdatedEvent, FindAllRunStatusEvent, FindAllCandidateMatchStatusEvent, ErrorEvent], PropertyInfo(discriminator="type"), ] + + +FindallEventsResponse = FindAllEventsResponse # for backwards compatibility with v0.3.4 +"""This is deprecated, `FindAllEventsResponse` should be used instead""" diff --git a/src/parallel/types/beta/findall_extend_params.py b/src/parallel/types/beta/findall_extend_params.py index d90226e..41b2d88 100644 --- a/src/parallel/types/beta/findall_extend_params.py +++ b/src/parallel/types/beta/findall_extend_params.py @@ -8,7 +8,7 @@ from ..._utils import PropertyInfo from .parallel_beta_param import ParallelBetaParam -__all__ = ["FindAllExtendParams"] +__all__ = ["FindAllExtendParams", "FindallExtendParams"] class FindAllExtendParams(TypedDict, total=False): @@ -21,3 +21,7 @@ class FindAllExtendParams(TypedDict, total=False): betas: Annotated[List[ParallelBetaParam], PropertyInfo(alias="parallel-beta")] """Optional header to specify the beta version(s) to enable.""" + + +FindallExtendParams = FindAllExtendParams # for backwards compatibility with v0.3.4 +"""This is deprecated, `FindAllExtendParams` should be used instead""" diff --git a/src/parallel/types/beta/findall_ingest_params.py b/src/parallel/types/beta/findall_ingest_params.py index fbdb3f3..fec1a52 100644 --- a/src/parallel/types/beta/findall_ingest_params.py +++ b/src/parallel/types/beta/findall_ingest_params.py @@ -8,7 +8,7 @@ from ..._utils import PropertyInfo from .parallel_beta_param import ParallelBetaParam -__all__ = ["FindAllIngestParams"] +__all__ = ["FindAllIngestParams", "FindallIngestParams"] class FindAllIngestParams(TypedDict, total=False): @@ -17,3 +17,7 @@ class FindAllIngestParams(TypedDict, total=False): betas: Annotated[List[ParallelBetaParam], PropertyInfo(alias="parallel-beta")] """Optional header to specify the beta version(s) to enable.""" + + +FindallIngestParams = FindAllIngestParams # for backwards compatibility with v0.3.4 +"""This is deprecated, `FindAllIngestParams` should be used instead""" diff --git a/src/parallel/types/beta/findall_retrieve_response.py b/src/parallel/types/beta/findall_retrieve_response.py deleted file mode 100644 index bad30d6..0000000 --- a/src/parallel/types/beta/findall_retrieve_response.py +++ /dev/null @@ -1,4 +0,0 @@ -from .findall_run import FindallRun - -# for backwards compatibility with v0.3.4 -FindallRetrieveResponse = FindallRun \ No newline at end of file diff --git a/src/parallel/types/beta/findall_run.py b/src/parallel/types/beta/findall_run.py index 8f5b1fb..9cbe080 100644 --- a/src/parallel/types/beta/findall_run.py +++ b/src/parallel/types/beta/findall_run.py @@ -5,7 +5,7 @@ from ..._models import BaseModel -__all__ = ["FindAllRun", "Status", "StatusMetrics"] +__all__ = ["FindAllRun", "FindallRun", "Status", "StatusMetrics"] class StatusMetrics(BaseModel): @@ -61,3 +61,7 @@ class FindAllRun(BaseModel): Timestamp of the latest modification to the FindAll run result, in RFC 3339 format. """ + + +FindallRun = FindAllRun # for backwards compatibility with v0.3.4 +"""This is deprecated, `FindAllRun` should be used instead""" diff --git a/src/parallel/types/beta/findall_run_result.py b/src/parallel/types/beta/findall_run_result.py index 2b413f0..d1851a9 100644 --- a/src/parallel/types/beta/findall_run_result.py +++ b/src/parallel/types/beta/findall_run_result.py @@ -7,7 +7,7 @@ from .findall_run import FindAllRun from ..field_basis import FieldBasis -__all__ = ["FindAllRunResult", "Candidate"] +__all__ = ["FindAllRunResult", "FindallRunResult", "Candidate"] class Candidate(BaseModel): @@ -65,3 +65,7 @@ class FindAllRunResult(BaseModel): This can be used to resume streaming from the last event. """ + + +FindallRunResult = FindAllRunResult # for backwards compatibility with v0.3.4 +"""This is deprecated, `FindAllRunResult` should be used instead""" diff --git a/src/parallel/types/beta/findall_run_status_event.py b/src/parallel/types/beta/findall_run_status_event.py index 48371ca..fe3ce34 100644 --- a/src/parallel/types/beta/findall_run_status_event.py +++ b/src/parallel/types/beta/findall_run_status_event.py @@ -6,7 +6,7 @@ from ..._models import BaseModel from .findall_run import FindAllRun -__all__ = ["FindAllRunStatusEvent"] +__all__ = ["FindAllRunStatusEvent", "FindallRunStatusEvent"] class FindAllRunStatusEvent(BaseModel): @@ -23,3 +23,7 @@ class FindAllRunStatusEvent(BaseModel): type: Literal["findall.status"] """Event type; always 'findall.status'.""" + + +FindallRunStatusEvent = FindAllRunStatusEvent # for backwards compatibility with v0.3.4 +"""This is deprecated, `FindAllRunStatusEvent` should be used instead""" diff --git a/src/parallel/types/beta/findall_schema.py b/src/parallel/types/beta/findall_schema.py index 7b9f4df..d214db7 100644 --- a/src/parallel/types/beta/findall_schema.py +++ b/src/parallel/types/beta/findall_schema.py @@ -6,7 +6,7 @@ from ..._models import BaseModel from .findall_enrich_input import FindAllEnrichInput -__all__ = ["FindAllSchema", "MatchCondition"] +__all__ = ["FindAllSchema", "FindallSchema", "MatchCondition"] class MatchCondition(BaseModel): @@ -43,3 +43,7 @@ class FindAllSchema(BaseModel): match_limit: Optional[int] = None """Max number of candidates to evaluate""" + + +FindallSchema = FindAllSchema # for backwards compatibility with v0.3.4 +"""This is deprecated, `FindAllSchema` should be used instead""" diff --git a/src/parallel/types/beta/findall_schema_updated_event.py b/src/parallel/types/beta/findall_schema_updated_event.py index 50054ad..7eab28c 100644 --- a/src/parallel/types/beta/findall_schema_updated_event.py +++ b/src/parallel/types/beta/findall_schema_updated_event.py @@ -6,7 +6,7 @@ from ..._models import BaseModel from .findall_schema import FindAllSchema -__all__ = ["FindAllSchemaUpdatedEvent"] +__all__ = ["FindAllSchemaUpdatedEvent", "FindallSchemaUpdatedEvent"] class FindAllSchemaUpdatedEvent(BaseModel): @@ -23,3 +23,7 @@ class FindAllSchemaUpdatedEvent(BaseModel): type: Literal["findall.schema.updated"] """Event type; always 'findall.schema.updated'.""" + + +FindallSchemaUpdatedEvent = FindAllSchemaUpdatedEvent # for backwards compatibility with v0.3.4 +"""This is deprecated, `FindAllSchemaUpdatedEvent` should be used instead""" From 16949bfab087cf2f6e6e4f2dc3a503a4a7fa285f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 13 Jan 2026 01:16:11 +0000 Subject: [PATCH 17/18] chore(api): update default headers --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 9165ad9..59e1516 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 22 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-105d778ad64daf94bc1a8b074c609be5200c570c8a3e9fb646d418d572083dac.yml openapi_spec_hash: b5d7390ed05ec6f332a1a91266a74ac3 -config_hash: a377da139cf6858ba9350a5a88f5b228 +config_hash: a398d153133d8884bed4e5256a0ae818 From f7b5064e3e8f2334b8973a58be9eddbab4c4d78b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 13 Jan 2026 01:16:28 +0000 Subject: [PATCH 18/18] release: 0.4.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 30 ++++++++++++++++++++++++++++++ pyproject.toml | 2 +- src/parallel/_version.py | 2 +- 4 files changed, 33 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bf7b733..da59f99 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.3.4" + ".": "0.4.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 63af32c..8dfd0b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,35 @@ # Changelog +## 0.4.0 (2026-01-13) + +Full Changelog: [v0.3.4...v0.4.0](https://github.com/parallel-web/parallel-sdk-python/compare/v0.3.4...v0.4.0) + +### Features + +* **api:** add after_date, update findAll nomenclature ([3641ac6](https://github.com/parallel-web/parallel-sdk-python/commit/3641ac619abdf3f0acd9085c515f3bed19c9bdd2)) +* **api:** Update excerpt settings ([bafa464](https://github.com/parallel-web/parallel-sdk-python/commit/bafa464c3f124690387410b0d17bf8a1253e8e63)) + + +### Bug Fixes + +* ensure streams are always closed ([3251033](https://github.com/parallel-web/parallel-sdk-python/commit/325103322362df0fe730362841dbc0d4b3a60c18)) +* **types:** allow pyright to infer TypedDict types within SequenceNotStr ([f134f9b](https://github.com/parallel-web/parallel-sdk-python/commit/f134f9bf488bdcd80088fc7752b5d33d84fcca66)) +* use async_to_httpx_files in patch method ([b147da5](https://github.com/parallel-web/parallel-sdk-python/commit/b147da50e3d4b13868908c5c40e0ddecc5489e19)) + + +### Chores + +* add missing docstrings ([05118fc](https://github.com/parallel-web/parallel-sdk-python/commit/05118fc081e6907ac0cdde365e5ed364f49b769c)) +* add Python 3.14 classifier and testing ([5588224](https://github.com/parallel-web/parallel-sdk-python/commit/558822483f60eb430a795e0ee5c6ac780c5f56c1)) +* **api:** update default headers ([16949bf](https://github.com/parallel-web/parallel-sdk-python/commit/16949bfab087cf2f6e6e4f2dc3a503a4a7fa285f)) +* **deps:** mypy 1.18.1 has a regression, pin to 1.17 ([e327c6e](https://github.com/parallel-web/parallel-sdk-python/commit/e327c6e2ba27b3dd565c3f36537643889b4c43e8)) +* **docs:** use environment variables for authentication in code snippets ([e44bc95](https://github.com/parallel-web/parallel-sdk-python/commit/e44bc9528e5e16f243aa8dee4633730d2899c72d)) +* **internal:** add `--fix` argument to lint script ([8b25ed1](https://github.com/parallel-web/parallel-sdk-python/commit/8b25ed10edef5697bce6bc74a3f628029da28d12)) +* **internal:** add missing files argument to base client ([9bc7dc6](https://github.com/parallel-web/parallel-sdk-python/commit/9bc7dc653a4f75da0c5af3297170a16b1df91875)) +* **internal:** codegen related update ([2eb1adc](https://github.com/parallel-web/parallel-sdk-python/commit/2eb1adc9884c03202107eb5987b6ea0717dd3a6a)) +* speedup initial import ([2927603](https://github.com/parallel-web/parallel-sdk-python/commit/2927603782bc242da5b6d7622963452dd24154e7)) +* update lockfile ([37bb7a6](https://github.com/parallel-web/parallel-sdk-python/commit/37bb7a6d321646946f52d37455fc5ad1a2458154)) + ## 0.3.4 (2025-11-12) Full Changelog: [v0.3.3...v0.3.4](https://github.com/parallel-web/parallel-sdk-python/compare/v0.3.3...v0.3.4) diff --git a/pyproject.toml b/pyproject.toml index 125393b..d2da7dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "parallel-web" -version = "0.3.4" +version = "0.4.0" description = "The official Python library for the Parallel API" dynamic = ["readme"] license = "MIT" diff --git a/src/parallel/_version.py b/src/parallel/_version.py index 068e596..1d59426 100644 --- a/src/parallel/_version.py +++ b/src/parallel/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "parallel" -__version__ = "0.3.4" # x-release-please-version +__version__ = "0.4.0" # x-release-please-version