parallel-web 0.4.0__tar.gz → 0.4.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- parallel_web-0.4.2/.release-please-manifest.json +3 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/CHANGELOG.md +39 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/CONTRIBUTING.md +1 -2
- {parallel_web-0.4.0 → parallel_web-0.4.2}/PKG-INFO +3 -2
- {parallel_web-0.4.0 → parallel_web-0.4.2}/README.md +2 -1
- parallel_web-0.4.2/api.md +38 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/pyproject.toml +2 -2
- {parallel_web-0.4.0 → parallel_web-0.4.2}/requirements-dev.lock +10 -10
- {parallel_web-0.4.0 → parallel_web-0.4.2}/requirements.lock +4 -4
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/_base_client.py +139 -13
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/_client.py +30 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/_compat.py +3 -3
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/_models.py +16 -1
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/_response.py +3 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/_streaming.py +8 -3
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/_types.py +9 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/_utils/_compat.py +1 -1
- parallel_web-0.4.2/src/parallel/_utils/_json.py +35 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/_version.py +1 -1
- {parallel_web-0.4.0 → parallel_web-0.4.2/src/parallel/resources/beta}/api.md +0 -37
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/resources/beta/beta.py +144 -30
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/resources/beta/findall.py +8 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/resources/beta/task_group.py +24 -2
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/resources/beta/task_run.py +20 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/resources/task_run.py +20 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/beta_extract_params.py +3 -3
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/beta_run_input.py +3 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/beta_run_input_param.py +3 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/beta_search_params.py +8 -8
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/excerpt_settings_param.py +3 -3
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/findall_run.py +7 -1
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/task_group_add_runs_params.py +5 -1
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/task_run_create_params.py +3 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/task_run.py +7 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/task_run_create_params.py +3 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/tests/api_resources/beta/test_findall.py +10 -10
- {parallel_web-0.4.0 → parallel_web-0.4.2}/tests/api_resources/beta/test_task_group.py +22 -20
- {parallel_web-0.4.0 → parallel_web-0.4.2}/tests/api_resources/beta/test_task_run.py +10 -8
- {parallel_web-0.4.0 → parallel_web-0.4.2}/tests/api_resources/test_beta.py +2 -8
- {parallel_web-0.4.0 → parallel_web-0.4.2}/tests/api_resources/test_task_run.py +2 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/tests/test_client.py +201 -2
- parallel_web-0.4.2/tests/test_utils/test_json.py +126 -0
- parallel_web-0.4.0/.release-please-manifest.json +0 -3
- {parallel_web-0.4.0 → parallel_web-0.4.2}/.gitignore +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/LICENSE +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/SECURITY.md +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/bin/check-release-environment +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/bin/publish-pypi +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/examples/.keep +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/noxfile.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/release-please-config.json +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/__init__.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/_constants.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/_exceptions.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/_files.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/_qs.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/_resource.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/_utils/__init__.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/_utils/_datetime_parse.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/_utils/_logs.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/_utils/_proxy.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/_utils/_reflection.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/_utils/_resources_proxy.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/_utils/_streams.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/_utils/_sync.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/_utils/_transform.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/_utils/_typing.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/_utils/_utils.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/lib/.keep +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/lib/__init__.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/lib/_parsing/__init__.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/lib/_parsing/_task_run_result.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/lib/_parsing/_task_spec.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/lib/_pydantic.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/lib/_time.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/py.typed +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/resources/__init__.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/resources/beta/__init__.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/__init__.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/auto_schema.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/auto_schema_param.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/__init__.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/beta_task_run_result.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/error_event.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/extract_error.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/extract_response.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/extract_result.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/fetch_policy_param.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/findall_candidate_match_status_event.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/findall_create_params.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/findall_enrich_input.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/findall_enrich_params.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/findall_events_params.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/findall_events_response.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/findall_extend_params.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/findall_ingest_params.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/findall_run_result.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/findall_run_status_event.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/findall_schema.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/findall_schema_updated_event.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/mcp_server.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/mcp_server_param.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/mcp_tool_call.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/parallel_beta_param.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/search_result.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/task_group.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/task_group_create_params.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/task_group_events_params.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/task_group_events_response.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/task_group_get_runs_params.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/task_group_get_runs_response.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/task_group_run_response.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/task_group_status.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/task_run_event.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/task_run_events_response.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/task_run_result_params.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/usage_item.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/web_search_result.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/webhook.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/beta/webhook_param.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/citation.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/field_basis.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/json_schema.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/json_schema_param.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/parsed_task_run_result.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/shared/__init__.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/shared/error_object.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/shared/error_response.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/shared/source_policy.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/shared/warning.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/shared_params/__init__.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/shared_params/source_policy.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/task_run_json_output.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/task_run_result.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/task_run_result_params.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/task_run_text_output.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/task_spec.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/task_spec_param.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/text_schema.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/src/parallel/types/text_schema_param.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/tests/__init__.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/tests/api_resources/__init__.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/tests/api_resources/beta/__init__.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/tests/conftest.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/tests/sample_file.txt +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/tests/test_deepcopy.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/tests/test_extract_files.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/tests/test_files.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/tests/test_models.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/tests/test_qs.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/tests/test_required_args.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/tests/test_response.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/tests/test_streaming.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/tests/test_transform.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/tests/test_utils/test_datetime_parse.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/tests/test_utils/test_proxy.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/tests/test_utils/test_typing.py +0 -0
- {parallel_web-0.4.0 → parallel_web-0.4.2}/tests/utils.py +0 -0
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.2 (2026-03-09)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.4.1...v0.4.2](https://github.com/parallel-web/parallel-sdk-python/compare/v0.4.1...v0.4.2)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** add betas back in for search ([23493c6](https://github.com/parallel-web/parallel-sdk-python/commit/23493c6ae666649f7ac2af185bb6caf49b9fefee))
|
|
10
|
+
* **api:** sync openapi spec ([e00288b](https://github.com/parallel-web/parallel-sdk-python/commit/e00288bd8ed2a250c9a0d7935a52fd40b9d1bec5))
|
|
11
|
+
* **client:** add custom JSON encoder for extended type support ([b2c8bf9](https://github.com/parallel-web/parallel-sdk-python/commit/b2c8bf9b8246e2e8f1d53a7c8e238dd19b727a77))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Chores
|
|
15
|
+
|
|
16
|
+
* **ci:** skip uploading artifacts on stainless-internal branches ([bb389c0](https://github.com/parallel-web/parallel-sdk-python/commit/bb389c0078e00e615c1aa650674c006c6e906c81))
|
|
17
|
+
* format all `api.md` files ([b74b93b](https://github.com/parallel-web/parallel-sdk-python/commit/b74b93bf04d678cc283b8f312a3a4c5bb314c468))
|
|
18
|
+
* **internal:** add request options to SSE classes ([00dbc30](https://github.com/parallel-web/parallel-sdk-python/commit/00dbc3027e59adda51eb623d6a724501f70a7720))
|
|
19
|
+
* **internal:** bump dependencies ([f49c841](https://github.com/parallel-web/parallel-sdk-python/commit/f49c841670d88f8fc38e0a17f19242f7570a9aad))
|
|
20
|
+
* **internal:** codegen related update ([1b7c8ff](https://github.com/parallel-web/parallel-sdk-python/commit/1b7c8ff1969c65a422d6bcfcdc01c5b0c477b45b))
|
|
21
|
+
* **internal:** fix lint error on Python 3.14 ([cb3f364](https://github.com/parallel-web/parallel-sdk-python/commit/cb3f3645bc67b98235a732f357d8a24fdf164032))
|
|
22
|
+
* **internal:** make `test_proxy_environment_variables` more resilient ([d3ba149](https://github.com/parallel-web/parallel-sdk-python/commit/d3ba149917deab7ee28a3f38bd7b1f3f4bd2b9c6))
|
|
23
|
+
* **internal:** make `test_proxy_environment_variables` more resilient to env ([1e1d858](https://github.com/parallel-web/parallel-sdk-python/commit/1e1d858e7c21785744d94ceef33e655dcf75eacc))
|
|
24
|
+
* **test:** do not count install time for mock server timeout ([9766097](https://github.com/parallel-web/parallel-sdk-python/commit/9766097052cc86f0081cfe38b25d7dbf90232438))
|
|
25
|
+
* update mock server docs ([028965c](https://github.com/parallel-web/parallel-sdk-python/commit/028965c0b2868051617b266493466f9fc7816705))
|
|
26
|
+
|
|
27
|
+
## 0.4.1 (2026-01-28)
|
|
28
|
+
|
|
29
|
+
Full Changelog: [v0.4.0...v0.4.1](https://github.com/parallel-web/parallel-sdk-python/compare/v0.4.0...v0.4.1)
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
|
|
33
|
+
* **client:** add support for binary request streaming ([1138841](https://github.com/parallel-web/parallel-sdk-python/commit/1138841ae071ae81665158a2407d36502524b8a6))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Chores
|
|
37
|
+
|
|
38
|
+
* **api:** make headers optional ([f99b59d](https://github.com/parallel-web/parallel-sdk-python/commit/f99b59d1ebd829a2c3c62a9a814941f6299f3653))
|
|
39
|
+
* **ci:** upgrade `actions/github-script` ([293c778](https://github.com/parallel-web/parallel-sdk-python/commit/293c778ea739104cc0f153bc099515b5d0d4d339))
|
|
40
|
+
* **internal:** update `actions/checkout` version ([326daf2](https://github.com/parallel-web/parallel-sdk-python/commit/326daf24e43d2a45e077d435db63d72187039207))
|
|
41
|
+
|
|
3
42
|
## 0.4.0 (2026-01-13)
|
|
4
43
|
|
|
5
44
|
Full Changelog: [v0.3.4...v0.4.0](https://github.com/parallel-web/parallel-sdk-python/compare/v0.3.4...v0.4.0)
|
|
@@ -88,8 +88,7 @@ $ pip install ./path-to-wheel-file.whl
|
|
|
88
88
|
Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.
|
|
89
89
|
|
|
90
90
|
```sh
|
|
91
|
-
|
|
92
|
-
$ npx prism mock path/to/your/openapi.yml
|
|
91
|
+
$ ./scripts/mock
|
|
93
92
|
```
|
|
94
93
|
|
|
95
94
|
```sh
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: parallel-web
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: The official Python library for the Parallel API
|
|
5
5
|
Project-URL: Homepage, https://github.com/parallel-web/parallel-sdk-python
|
|
6
6
|
Project-URL: Repository, https://github.com/parallel-web/parallel-sdk-python
|
|
@@ -133,6 +133,7 @@ All beta parameters are accessible via the `client.beta` namespace in the SDK.
|
|
|
133
133
|
|
|
134
134
|
Yes, all methods support a timeout. For more information, see [Timeouts](https://github.com/parallel-web/parallel-sdk-python/tree/main/#timeouts).
|
|
135
135
|
|
|
136
|
+
|
|
136
137
|
**Can I specify retries via the SDK?**
|
|
137
138
|
|
|
138
139
|
Yes, errors can be retried via the SDK — the default retry count is 2. The maximum number
|
|
@@ -327,7 +328,7 @@ response = client.task_run.with_raw_response.create(
|
|
|
327
328
|
print(response.headers.get('X-My-Header'))
|
|
328
329
|
|
|
329
330
|
task_run = response.parse()
|
|
330
|
-
print(task_run.
|
|
331
|
+
print(task_run.interaction_id)
|
|
331
332
|
```
|
|
332
333
|
|
|
333
334
|
These methods return an [`APIResponse`](https://github.com/parallel-web/parallel-sdk-python/tree/main/src/parallel/_response.py) object.
|
|
@@ -98,6 +98,7 @@ All beta parameters are accessible via the `client.beta` namespace in the SDK.
|
|
|
98
98
|
|
|
99
99
|
Yes, all methods support a timeout. For more information, see [Timeouts](#timeouts).
|
|
100
100
|
|
|
101
|
+
|
|
101
102
|
**Can I specify retries via the SDK?**
|
|
102
103
|
|
|
103
104
|
Yes, errors can be retried via the SDK — the default retry count is 2. The maximum number
|
|
@@ -292,7 +293,7 @@ response = client.task_run.with_raw_response.create(
|
|
|
292
293
|
print(response.headers.get('X-My-Header'))
|
|
293
294
|
|
|
294
295
|
task_run = response.parse()
|
|
295
|
-
print(task_run.
|
|
296
|
+
print(task_run.interaction_id)
|
|
296
297
|
```
|
|
297
298
|
|
|
298
299
|
These methods return an [`APIResponse`](https://github.com/parallel-web/parallel-sdk-python/tree/main/src/parallel/_response.py) object.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Shared Types
|
|
2
|
+
|
|
3
|
+
```python
|
|
4
|
+
from parallel.types import ErrorObject, ErrorResponse, SourcePolicy, Warning
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
# TaskRun
|
|
8
|
+
|
|
9
|
+
Types:
|
|
10
|
+
|
|
11
|
+
```python
|
|
12
|
+
from parallel.types import (
|
|
13
|
+
AutoSchema,
|
|
14
|
+
Citation,
|
|
15
|
+
FieldBasis,
|
|
16
|
+
JsonSchema,
|
|
17
|
+
ParsedTaskRunResult,
|
|
18
|
+
RunInput,
|
|
19
|
+
TaskRun,
|
|
20
|
+
TaskRunJsonOutput,
|
|
21
|
+
TaskRunResult,
|
|
22
|
+
TaskRunTextOutput,
|
|
23
|
+
TaskSpec,
|
|
24
|
+
TextSchema,
|
|
25
|
+
)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Methods:
|
|
29
|
+
|
|
30
|
+
- <code title="post /v1/tasks/runs">client.task_run.<a href="./src/parallel/resources/task_run.py">create</a>(\*\*<a href="src/parallel/types/task_run_create_params.py">params</a>) -> <a href="./src/parallel/types/task_run.py">TaskRun</a></code>
|
|
31
|
+
- <code title="get /v1/tasks/runs/{run_id}">client.task_run.<a href="./src/parallel/resources/task_run.py">retrieve</a>(run_id) -> <a href="./src/parallel/types/task_run.py">TaskRun</a></code>
|
|
32
|
+
- <code title="get /v1/tasks/runs/{run_id}/result">client.task_run.<a href="./src/parallel/resources/task_run.py">result</a>(run_id, \*\*<a href="src/parallel/types/task_run_result_params.py">params</a>) -> <a href="./src/parallel/types/task_run_result.py">TaskRunResult</a></code>
|
|
33
|
+
|
|
34
|
+
Convenience methods:
|
|
35
|
+
|
|
36
|
+
- <code title="post /v1/tasks/runs">client.task_run.<a href="./src/parallel/resources/task_run.py">execute</a>(input, processor, output: <a href="./src/parallel/types/task_spec_param.py">OutputSchema</a>) -> <a href="./src/parallel/types/task_run_result.py">TaskRunResult</a></code>
|
|
37
|
+
- <code title="post /v1/tasks/runs">client.task_run.<a href="./src/parallel/resources/task_run.py">execute</a>(input, processor, output: Type[OutputT]) -> <a href="./src/parallel/types/parsed_task_run_result.py">ParsedTaskRunResult[OutputT]</a></code>
|
|
38
|
+
# [Beta](src/parallel/resources/beta/api.md)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "parallel-web"
|
|
3
|
-
version = "0.4.
|
|
3
|
+
version = "0.4.2"
|
|
4
4
|
description = "The official Python library for the Parallel API"
|
|
5
5
|
dynamic = ["readme"]
|
|
6
6
|
license = "MIT"
|
|
@@ -70,7 +70,7 @@ format = { chain = [
|
|
|
70
70
|
# run formatting again to fix any inconsistencies when imports are stripped
|
|
71
71
|
"format:ruff",
|
|
72
72
|
]}
|
|
73
|
-
"format:docs" = "python scripts/utils/ruffen-docs.py README.md api.md"
|
|
73
|
+
"format:docs" = "bash -c 'python scripts/utils/ruffen-docs.py README.md $(find . -type f -name api.md)'"
|
|
74
74
|
"format:ruff" = "ruff format"
|
|
75
75
|
|
|
76
76
|
"lint" = { chain = [
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
-e file:.
|
|
13
13
|
aiohappyeyeballs==2.6.1
|
|
14
14
|
# via aiohttp
|
|
15
|
-
aiohttp==3.13.
|
|
15
|
+
aiohttp==3.13.3
|
|
16
16
|
# via httpx-aiohttp
|
|
17
17
|
# via parallel-web
|
|
18
18
|
aiosignal==1.4.0
|
|
19
19
|
# via aiohttp
|
|
20
20
|
annotated-types==0.7.0
|
|
21
21
|
# via pydantic
|
|
22
|
-
anyio==4.12.
|
|
22
|
+
anyio==4.12.1
|
|
23
23
|
# via httpx
|
|
24
24
|
# via parallel-web
|
|
25
25
|
argcomplete==3.6.3
|
|
@@ -31,7 +31,7 @@ attrs==25.4.0
|
|
|
31
31
|
# via nox
|
|
32
32
|
backports-asyncio-runner==1.2.0
|
|
33
33
|
# via pytest-asyncio
|
|
34
|
-
certifi==
|
|
34
|
+
certifi==2026.1.4
|
|
35
35
|
# via httpcore
|
|
36
36
|
# via httpx
|
|
37
37
|
colorama==0.4.6
|
|
@@ -64,7 +64,7 @@ httpx==0.28.1
|
|
|
64
64
|
# via httpx-aiohttp
|
|
65
65
|
# via parallel-web
|
|
66
66
|
# via respx
|
|
67
|
-
httpx-aiohttp==0.1.
|
|
67
|
+
httpx-aiohttp==0.1.12
|
|
68
68
|
# via parallel-web
|
|
69
69
|
humanize==4.13.0
|
|
70
70
|
# via nox
|
|
@@ -72,7 +72,7 @@ idna==3.11
|
|
|
72
72
|
# via anyio
|
|
73
73
|
# via httpx
|
|
74
74
|
# via yarl
|
|
75
|
-
importlib-metadata==8.7.
|
|
75
|
+
importlib-metadata==8.7.1
|
|
76
76
|
iniconfig==2.1.0
|
|
77
77
|
# via pytest
|
|
78
78
|
markdown-it-py==3.0.0
|
|
@@ -85,14 +85,14 @@ multidict==6.7.0
|
|
|
85
85
|
mypy==1.17.0
|
|
86
86
|
mypy-extensions==1.1.0
|
|
87
87
|
# via mypy
|
|
88
|
-
nodeenv==1.
|
|
88
|
+
nodeenv==1.10.0
|
|
89
89
|
# via pyright
|
|
90
90
|
nox==2025.11.12
|
|
91
91
|
packaging==25.0
|
|
92
92
|
# via dependency-groups
|
|
93
93
|
# via nox
|
|
94
94
|
# via pytest
|
|
95
|
-
pathspec==0.
|
|
95
|
+
pathspec==1.0.3
|
|
96
96
|
# via mypy
|
|
97
97
|
platformdirs==4.4.0
|
|
98
98
|
# via virtualenv
|
|
@@ -118,13 +118,13 @@ python-dateutil==2.9.0.post0
|
|
|
118
118
|
# via time-machine
|
|
119
119
|
respx==0.22.0
|
|
120
120
|
rich==14.2.0
|
|
121
|
-
ruff==0.14.
|
|
121
|
+
ruff==0.14.13
|
|
122
122
|
six==1.17.0
|
|
123
123
|
# via python-dateutil
|
|
124
124
|
sniffio==1.3.1
|
|
125
125
|
# via parallel-web
|
|
126
126
|
time-machine==2.19.0
|
|
127
|
-
tomli==2.
|
|
127
|
+
tomli==2.4.0
|
|
128
128
|
# via dependency-groups
|
|
129
129
|
# via mypy
|
|
130
130
|
# via nox
|
|
@@ -144,7 +144,7 @@ typing-extensions==4.15.0
|
|
|
144
144
|
# via virtualenv
|
|
145
145
|
typing-inspection==0.4.2
|
|
146
146
|
# via pydantic
|
|
147
|
-
virtualenv==20.
|
|
147
|
+
virtualenv==20.36.1
|
|
148
148
|
# via nox
|
|
149
149
|
yarl==1.22.0
|
|
150
150
|
# via aiohttp
|
|
@@ -12,21 +12,21 @@
|
|
|
12
12
|
-e file:.
|
|
13
13
|
aiohappyeyeballs==2.6.1
|
|
14
14
|
# via aiohttp
|
|
15
|
-
aiohttp==3.13.
|
|
15
|
+
aiohttp==3.13.3
|
|
16
16
|
# via httpx-aiohttp
|
|
17
17
|
# via parallel-web
|
|
18
18
|
aiosignal==1.4.0
|
|
19
19
|
# via aiohttp
|
|
20
20
|
annotated-types==0.7.0
|
|
21
21
|
# via pydantic
|
|
22
|
-
anyio==4.12.
|
|
22
|
+
anyio==4.12.1
|
|
23
23
|
# via httpx
|
|
24
24
|
# via parallel-web
|
|
25
25
|
async-timeout==5.0.1
|
|
26
26
|
# via aiohttp
|
|
27
27
|
attrs==25.4.0
|
|
28
28
|
# via aiohttp
|
|
29
|
-
certifi==
|
|
29
|
+
certifi==2026.1.4
|
|
30
30
|
# via httpcore
|
|
31
31
|
# via httpx
|
|
32
32
|
distro==1.9.0
|
|
@@ -43,7 +43,7 @@ httpcore==1.0.9
|
|
|
43
43
|
httpx==0.28.1
|
|
44
44
|
# via httpx-aiohttp
|
|
45
45
|
# via parallel-web
|
|
46
|
-
httpx-aiohttp==0.1.
|
|
46
|
+
httpx-aiohttp==0.1.12
|
|
47
47
|
# via parallel-web
|
|
48
48
|
idna==3.11
|
|
49
49
|
# via anyio
|
|
@@ -9,6 +9,7 @@ import asyncio
|
|
|
9
9
|
import inspect
|
|
10
10
|
import logging
|
|
11
11
|
import platform
|
|
12
|
+
import warnings
|
|
12
13
|
import email.utils
|
|
13
14
|
from types import TracebackType
|
|
14
15
|
from random import random
|
|
@@ -51,9 +52,11 @@ from ._types import (
|
|
|
51
52
|
ResponseT,
|
|
52
53
|
AnyMapping,
|
|
53
54
|
PostParser,
|
|
55
|
+
BinaryTypes,
|
|
54
56
|
RequestFiles,
|
|
55
57
|
HttpxSendArgs,
|
|
56
58
|
RequestOptions,
|
|
59
|
+
AsyncBinaryTypes,
|
|
57
60
|
HttpxRequestFiles,
|
|
58
61
|
ModelBuilderProtocol,
|
|
59
62
|
not_given,
|
|
@@ -83,6 +86,7 @@ from ._exceptions import (
|
|
|
83
86
|
APIConnectionError,
|
|
84
87
|
APIResponseValidationError,
|
|
85
88
|
)
|
|
89
|
+
from ._utils._json import openapi_dumps
|
|
86
90
|
|
|
87
91
|
log: logging.Logger = logging.getLogger(__name__)
|
|
88
92
|
|
|
@@ -477,8 +481,19 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
|
477
481
|
retries_taken: int = 0,
|
|
478
482
|
) -> httpx.Request:
|
|
479
483
|
if log.isEnabledFor(logging.DEBUG):
|
|
480
|
-
log.debug(
|
|
481
|
-
|
|
484
|
+
log.debug(
|
|
485
|
+
"Request options: %s",
|
|
486
|
+
model_dump(
|
|
487
|
+
options,
|
|
488
|
+
exclude_unset=True,
|
|
489
|
+
# Pydantic v1 can't dump every type we support in content, so we exclude it for now.
|
|
490
|
+
exclude={
|
|
491
|
+
"content",
|
|
492
|
+
}
|
|
493
|
+
if PYDANTIC_V1
|
|
494
|
+
else {},
|
|
495
|
+
),
|
|
496
|
+
)
|
|
482
497
|
kwargs: dict[str, Any] = {}
|
|
483
498
|
|
|
484
499
|
json_data = options.json_data
|
|
@@ -532,10 +547,18 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
|
532
547
|
is_body_allowed = options.method.lower() != "get"
|
|
533
548
|
|
|
534
549
|
if is_body_allowed:
|
|
535
|
-
if
|
|
550
|
+
if options.content is not None and json_data is not None:
|
|
551
|
+
raise TypeError("Passing both `content` and `json_data` is not supported")
|
|
552
|
+
if options.content is not None and files is not None:
|
|
553
|
+
raise TypeError("Passing both `content` and `files` is not supported")
|
|
554
|
+
if options.content is not None:
|
|
555
|
+
kwargs["content"] = options.content
|
|
556
|
+
elif isinstance(json_data, bytes):
|
|
536
557
|
kwargs["content"] = json_data
|
|
537
|
-
|
|
538
|
-
|
|
558
|
+
elif not files:
|
|
559
|
+
# Don't set content when JSON is sent as multipart/form-data,
|
|
560
|
+
# since httpx's content param overrides other body arguments
|
|
561
|
+
kwargs["content"] = openapi_dumps(json_data) if is_given(json_data) and json_data is not None else None
|
|
539
562
|
kwargs["files"] = files
|
|
540
563
|
else:
|
|
541
564
|
headers.pop("Content-Type", None)
|
|
@@ -1194,6 +1217,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
1194
1217
|
*,
|
|
1195
1218
|
cast_to: Type[ResponseT],
|
|
1196
1219
|
body: Body | None = None,
|
|
1220
|
+
content: BinaryTypes | None = None,
|
|
1197
1221
|
options: RequestOptions = {},
|
|
1198
1222
|
files: RequestFiles | None = None,
|
|
1199
1223
|
stream: Literal[False] = False,
|
|
@@ -1206,6 +1230,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
1206
1230
|
*,
|
|
1207
1231
|
cast_to: Type[ResponseT],
|
|
1208
1232
|
body: Body | None = None,
|
|
1233
|
+
content: BinaryTypes | None = None,
|
|
1209
1234
|
options: RequestOptions = {},
|
|
1210
1235
|
files: RequestFiles | None = None,
|
|
1211
1236
|
stream: Literal[True],
|
|
@@ -1219,6 +1244,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
1219
1244
|
*,
|
|
1220
1245
|
cast_to: Type[ResponseT],
|
|
1221
1246
|
body: Body | None = None,
|
|
1247
|
+
content: BinaryTypes | None = None,
|
|
1222
1248
|
options: RequestOptions = {},
|
|
1223
1249
|
files: RequestFiles | None = None,
|
|
1224
1250
|
stream: bool,
|
|
@@ -1231,13 +1257,25 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
1231
1257
|
*,
|
|
1232
1258
|
cast_to: Type[ResponseT],
|
|
1233
1259
|
body: Body | None = None,
|
|
1260
|
+
content: BinaryTypes | None = None,
|
|
1234
1261
|
options: RequestOptions = {},
|
|
1235
1262
|
files: RequestFiles | None = None,
|
|
1236
1263
|
stream: bool = False,
|
|
1237
1264
|
stream_cls: type[_StreamT] | None = None,
|
|
1238
1265
|
) -> ResponseT | _StreamT:
|
|
1266
|
+
if body is not None and content is not None:
|
|
1267
|
+
raise TypeError("Passing both `body` and `content` is not supported")
|
|
1268
|
+
if files is not None and content is not None:
|
|
1269
|
+
raise TypeError("Passing both `files` and `content` is not supported")
|
|
1270
|
+
if isinstance(body, bytes):
|
|
1271
|
+
warnings.warn(
|
|
1272
|
+
"Passing raw bytes as `body` is deprecated and will be removed in a future version. "
|
|
1273
|
+
"Please pass raw bytes via the `content` parameter instead.",
|
|
1274
|
+
DeprecationWarning,
|
|
1275
|
+
stacklevel=2,
|
|
1276
|
+
)
|
|
1239
1277
|
opts = FinalRequestOptions.construct(
|
|
1240
|
-
method="post", url=path, json_data=body, files=to_httpx_files(files), **options
|
|
1278
|
+
method="post", url=path, json_data=body, content=content, files=to_httpx_files(files), **options
|
|
1241
1279
|
)
|
|
1242
1280
|
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
|
|
1243
1281
|
|
|
@@ -1247,11 +1285,23 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
1247
1285
|
*,
|
|
1248
1286
|
cast_to: Type[ResponseT],
|
|
1249
1287
|
body: Body | None = None,
|
|
1288
|
+
content: BinaryTypes | None = None,
|
|
1250
1289
|
files: RequestFiles | None = None,
|
|
1251
1290
|
options: RequestOptions = {},
|
|
1252
1291
|
) -> ResponseT:
|
|
1292
|
+
if body is not None and content is not None:
|
|
1293
|
+
raise TypeError("Passing both `body` and `content` is not supported")
|
|
1294
|
+
if files is not None and content is not None:
|
|
1295
|
+
raise TypeError("Passing both `files` and `content` is not supported")
|
|
1296
|
+
if isinstance(body, bytes):
|
|
1297
|
+
warnings.warn(
|
|
1298
|
+
"Passing raw bytes as `body` is deprecated and will be removed in a future version. "
|
|
1299
|
+
"Please pass raw bytes via the `content` parameter instead.",
|
|
1300
|
+
DeprecationWarning,
|
|
1301
|
+
stacklevel=2,
|
|
1302
|
+
)
|
|
1253
1303
|
opts = FinalRequestOptions.construct(
|
|
1254
|
-
method="patch", url=path, json_data=body, files=to_httpx_files(files), **options
|
|
1304
|
+
method="patch", url=path, json_data=body, content=content, files=to_httpx_files(files), **options
|
|
1255
1305
|
)
|
|
1256
1306
|
return self.request(cast_to, opts)
|
|
1257
1307
|
|
|
@@ -1261,11 +1311,23 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
1261
1311
|
*,
|
|
1262
1312
|
cast_to: Type[ResponseT],
|
|
1263
1313
|
body: Body | None = None,
|
|
1314
|
+
content: BinaryTypes | None = None,
|
|
1264
1315
|
files: RequestFiles | None = None,
|
|
1265
1316
|
options: RequestOptions = {},
|
|
1266
1317
|
) -> ResponseT:
|
|
1318
|
+
if body is not None and content is not None:
|
|
1319
|
+
raise TypeError("Passing both `body` and `content` is not supported")
|
|
1320
|
+
if files is not None and content is not None:
|
|
1321
|
+
raise TypeError("Passing both `files` and `content` is not supported")
|
|
1322
|
+
if isinstance(body, bytes):
|
|
1323
|
+
warnings.warn(
|
|
1324
|
+
"Passing raw bytes as `body` is deprecated and will be removed in a future version. "
|
|
1325
|
+
"Please pass raw bytes via the `content` parameter instead.",
|
|
1326
|
+
DeprecationWarning,
|
|
1327
|
+
stacklevel=2,
|
|
1328
|
+
)
|
|
1267
1329
|
opts = FinalRequestOptions.construct(
|
|
1268
|
-
method="put", url=path, json_data=body, files=to_httpx_files(files), **options
|
|
1330
|
+
method="put", url=path, json_data=body, content=content, files=to_httpx_files(files), **options
|
|
1269
1331
|
)
|
|
1270
1332
|
return self.request(cast_to, opts)
|
|
1271
1333
|
|
|
@@ -1275,9 +1337,19 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
1275
1337
|
*,
|
|
1276
1338
|
cast_to: Type[ResponseT],
|
|
1277
1339
|
body: Body | None = None,
|
|
1340
|
+
content: BinaryTypes | None = None,
|
|
1278
1341
|
options: RequestOptions = {},
|
|
1279
1342
|
) -> ResponseT:
|
|
1280
|
-
|
|
1343
|
+
if body is not None and content is not None:
|
|
1344
|
+
raise TypeError("Passing both `body` and `content` is not supported")
|
|
1345
|
+
if isinstance(body, bytes):
|
|
1346
|
+
warnings.warn(
|
|
1347
|
+
"Passing raw bytes as `body` is deprecated and will be removed in a future version. "
|
|
1348
|
+
"Please pass raw bytes via the `content` parameter instead.",
|
|
1349
|
+
DeprecationWarning,
|
|
1350
|
+
stacklevel=2,
|
|
1351
|
+
)
|
|
1352
|
+
opts = FinalRequestOptions.construct(method="delete", url=path, json_data=body, content=content, **options)
|
|
1281
1353
|
return self.request(cast_to, opts)
|
|
1282
1354
|
|
|
1283
1355
|
def get_api_list(
|
|
@@ -1717,6 +1789,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1717
1789
|
*,
|
|
1718
1790
|
cast_to: Type[ResponseT],
|
|
1719
1791
|
body: Body | None = None,
|
|
1792
|
+
content: AsyncBinaryTypes | None = None,
|
|
1720
1793
|
files: RequestFiles | None = None,
|
|
1721
1794
|
options: RequestOptions = {},
|
|
1722
1795
|
stream: Literal[False] = False,
|
|
@@ -1729,6 +1802,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1729
1802
|
*,
|
|
1730
1803
|
cast_to: Type[ResponseT],
|
|
1731
1804
|
body: Body | None = None,
|
|
1805
|
+
content: AsyncBinaryTypes | None = None,
|
|
1732
1806
|
files: RequestFiles | None = None,
|
|
1733
1807
|
options: RequestOptions = {},
|
|
1734
1808
|
stream: Literal[True],
|
|
@@ -1742,6 +1816,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1742
1816
|
*,
|
|
1743
1817
|
cast_to: Type[ResponseT],
|
|
1744
1818
|
body: Body | None = None,
|
|
1819
|
+
content: AsyncBinaryTypes | None = None,
|
|
1745
1820
|
files: RequestFiles | None = None,
|
|
1746
1821
|
options: RequestOptions = {},
|
|
1747
1822
|
stream: bool,
|
|
@@ -1754,13 +1829,25 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1754
1829
|
*,
|
|
1755
1830
|
cast_to: Type[ResponseT],
|
|
1756
1831
|
body: Body | None = None,
|
|
1832
|
+
content: AsyncBinaryTypes | None = None,
|
|
1757
1833
|
files: RequestFiles | None = None,
|
|
1758
1834
|
options: RequestOptions = {},
|
|
1759
1835
|
stream: bool = False,
|
|
1760
1836
|
stream_cls: type[_AsyncStreamT] | None = None,
|
|
1761
1837
|
) -> ResponseT | _AsyncStreamT:
|
|
1838
|
+
if body is not None and content is not None:
|
|
1839
|
+
raise TypeError("Passing both `body` and `content` is not supported")
|
|
1840
|
+
if files is not None and content is not None:
|
|
1841
|
+
raise TypeError("Passing both `files` and `content` is not supported")
|
|
1842
|
+
if isinstance(body, bytes):
|
|
1843
|
+
warnings.warn(
|
|
1844
|
+
"Passing raw bytes as `body` is deprecated and will be removed in a future version. "
|
|
1845
|
+
"Please pass raw bytes via the `content` parameter instead.",
|
|
1846
|
+
DeprecationWarning,
|
|
1847
|
+
stacklevel=2,
|
|
1848
|
+
)
|
|
1762
1849
|
opts = FinalRequestOptions.construct(
|
|
1763
|
-
method="post", url=path, json_data=body, files=await async_to_httpx_files(files), **options
|
|
1850
|
+
method="post", url=path, json_data=body, content=content, files=await async_to_httpx_files(files), **options
|
|
1764
1851
|
)
|
|
1765
1852
|
return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)
|
|
1766
1853
|
|
|
@@ -1770,11 +1857,28 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1770
1857
|
*,
|
|
1771
1858
|
cast_to: Type[ResponseT],
|
|
1772
1859
|
body: Body | None = None,
|
|
1860
|
+
content: AsyncBinaryTypes | None = None,
|
|
1773
1861
|
files: RequestFiles | None = None,
|
|
1774
1862
|
options: RequestOptions = {},
|
|
1775
1863
|
) -> ResponseT:
|
|
1864
|
+
if body is not None and content is not None:
|
|
1865
|
+
raise TypeError("Passing both `body` and `content` is not supported")
|
|
1866
|
+
if files is not None and content is not None:
|
|
1867
|
+
raise TypeError("Passing both `files` and `content` is not supported")
|
|
1868
|
+
if isinstance(body, bytes):
|
|
1869
|
+
warnings.warn(
|
|
1870
|
+
"Passing raw bytes as `body` is deprecated and will be removed in a future version. "
|
|
1871
|
+
"Please pass raw bytes via the `content` parameter instead.",
|
|
1872
|
+
DeprecationWarning,
|
|
1873
|
+
stacklevel=2,
|
|
1874
|
+
)
|
|
1776
1875
|
opts = FinalRequestOptions.construct(
|
|
1777
|
-
method="patch",
|
|
1876
|
+
method="patch",
|
|
1877
|
+
url=path,
|
|
1878
|
+
json_data=body,
|
|
1879
|
+
content=content,
|
|
1880
|
+
files=await async_to_httpx_files(files),
|
|
1881
|
+
**options,
|
|
1778
1882
|
)
|
|
1779
1883
|
return await self.request(cast_to, opts)
|
|
1780
1884
|
|
|
@@ -1784,11 +1888,23 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1784
1888
|
*,
|
|
1785
1889
|
cast_to: Type[ResponseT],
|
|
1786
1890
|
body: Body | None = None,
|
|
1891
|
+
content: AsyncBinaryTypes | None = None,
|
|
1787
1892
|
files: RequestFiles | None = None,
|
|
1788
1893
|
options: RequestOptions = {},
|
|
1789
1894
|
) -> ResponseT:
|
|
1895
|
+
if body is not None and content is not None:
|
|
1896
|
+
raise TypeError("Passing both `body` and `content` is not supported")
|
|
1897
|
+
if files is not None and content is not None:
|
|
1898
|
+
raise TypeError("Passing both `files` and `content` is not supported")
|
|
1899
|
+
if isinstance(body, bytes):
|
|
1900
|
+
warnings.warn(
|
|
1901
|
+
"Passing raw bytes as `body` is deprecated and will be removed in a future version. "
|
|
1902
|
+
"Please pass raw bytes via the `content` parameter instead.",
|
|
1903
|
+
DeprecationWarning,
|
|
1904
|
+
stacklevel=2,
|
|
1905
|
+
)
|
|
1790
1906
|
opts = FinalRequestOptions.construct(
|
|
1791
|
-
method="put", url=path, json_data=body, files=await async_to_httpx_files(files), **options
|
|
1907
|
+
method="put", url=path, json_data=body, content=content, files=await async_to_httpx_files(files), **options
|
|
1792
1908
|
)
|
|
1793
1909
|
return await self.request(cast_to, opts)
|
|
1794
1910
|
|
|
@@ -1798,9 +1914,19 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1798
1914
|
*,
|
|
1799
1915
|
cast_to: Type[ResponseT],
|
|
1800
1916
|
body: Body | None = None,
|
|
1917
|
+
content: AsyncBinaryTypes | None = None,
|
|
1801
1918
|
options: RequestOptions = {},
|
|
1802
1919
|
) -> ResponseT:
|
|
1803
|
-
|
|
1920
|
+
if body is not None and content is not None:
|
|
1921
|
+
raise TypeError("Passing both `body` and `content` is not supported")
|
|
1922
|
+
if isinstance(body, bytes):
|
|
1923
|
+
warnings.warn(
|
|
1924
|
+
"Passing raw bytes as `body` is deprecated and will be removed in a future version. "
|
|
1925
|
+
"Please pass raw bytes via the `content` parameter instead.",
|
|
1926
|
+
DeprecationWarning,
|
|
1927
|
+
stacklevel=2,
|
|
1928
|
+
)
|
|
1929
|
+
opts = FinalRequestOptions.construct(method="delete", url=path, json_data=body, content=content, **options)
|
|
1804
1930
|
return await self.request(cast_to, opts)
|
|
1805
1931
|
|
|
1806
1932
|
def get_api_list(
|
|
@@ -104,6 +104,11 @@ class Parallel(SyncAPIClient):
|
|
|
104
104
|
|
|
105
105
|
@cached_property
|
|
106
106
|
def task_run(self) -> TaskRunResource:
|
|
107
|
+
"""The Task API executes web research and extraction tasks.
|
|
108
|
+
|
|
109
|
+
Clients submit a natural-language objective with an optional input schema; the service plans retrieval, fetches relevant URLs, and returns outputs that conform to a provided or inferred JSON schema. Supports deep research style queries and can return rich structured JSON outputs. Processors trade-off between cost, latency, and quality. Each processor supports calibrated confidences.
|
|
110
|
+
- Output metadata: citations, excerpts, reasoning, and confidence per field
|
|
111
|
+
"""
|
|
107
112
|
from .resources.task_run import TaskRunResource
|
|
108
113
|
|
|
109
114
|
return TaskRunResource(self)
|
|
@@ -284,6 +289,11 @@ class AsyncParallel(AsyncAPIClient):
|
|
|
284
289
|
|
|
285
290
|
@cached_property
|
|
286
291
|
def task_run(self) -> AsyncTaskRunResource:
|
|
292
|
+
"""The Task API executes web research and extraction tasks.
|
|
293
|
+
|
|
294
|
+
Clients submit a natural-language objective with an optional input schema; the service plans retrieval, fetches relevant URLs, and returns outputs that conform to a provided or inferred JSON schema. Supports deep research style queries and can return rich structured JSON outputs. Processors trade-off between cost, latency, and quality. Each processor supports calibrated confidences.
|
|
295
|
+
- Output metadata: citations, excerpts, reasoning, and confidence per field
|
|
296
|
+
"""
|
|
287
297
|
from .resources.task_run import AsyncTaskRunResource
|
|
288
298
|
|
|
289
299
|
return AsyncTaskRunResource(self)
|
|
@@ -415,6 +425,11 @@ class ParallelWithRawResponse:
|
|
|
415
425
|
|
|
416
426
|
@cached_property
|
|
417
427
|
def task_run(self) -> task_run.TaskRunResourceWithRawResponse:
|
|
428
|
+
"""The Task API executes web research and extraction tasks.
|
|
429
|
+
|
|
430
|
+
Clients submit a natural-language objective with an optional input schema; the service plans retrieval, fetches relevant URLs, and returns outputs that conform to a provided or inferred JSON schema. Supports deep research style queries and can return rich structured JSON outputs. Processors trade-off between cost, latency, and quality. Each processor supports calibrated confidences.
|
|
431
|
+
- Output metadata: citations, excerpts, reasoning, and confidence per field
|
|
432
|
+
"""
|
|
418
433
|
from .resources.task_run import TaskRunResourceWithRawResponse
|
|
419
434
|
|
|
420
435
|
return TaskRunResourceWithRawResponse(self._client.task_run)
|
|
@@ -434,6 +449,11 @@ class AsyncParallelWithRawResponse:
|
|
|
434
449
|
|
|
435
450
|
@cached_property
|
|
436
451
|
def task_run(self) -> task_run.AsyncTaskRunResourceWithRawResponse:
|
|
452
|
+
"""The Task API executes web research and extraction tasks.
|
|
453
|
+
|
|
454
|
+
Clients submit a natural-language objective with an optional input schema; the service plans retrieval, fetches relevant URLs, and returns outputs that conform to a provided or inferred JSON schema. Supports deep research style queries and can return rich structured JSON outputs. Processors trade-off between cost, latency, and quality. Each processor supports calibrated confidences.
|
|
455
|
+
- Output metadata: citations, excerpts, reasoning, and confidence per field
|
|
456
|
+
"""
|
|
437
457
|
from .resources.task_run import AsyncTaskRunResourceWithRawResponse
|
|
438
458
|
|
|
439
459
|
return AsyncTaskRunResourceWithRawResponse(self._client.task_run)
|
|
@@ -453,6 +473,11 @@ class ParallelWithStreamedResponse:
|
|
|
453
473
|
|
|
454
474
|
@cached_property
|
|
455
475
|
def task_run(self) -> task_run.TaskRunResourceWithStreamingResponse:
|
|
476
|
+
"""The Task API executes web research and extraction tasks.
|
|
477
|
+
|
|
478
|
+
Clients submit a natural-language objective with an optional input schema; the service plans retrieval, fetches relevant URLs, and returns outputs that conform to a provided or inferred JSON schema. Supports deep research style queries and can return rich structured JSON outputs. Processors trade-off between cost, latency, and quality. Each processor supports calibrated confidences.
|
|
479
|
+
- Output metadata: citations, excerpts, reasoning, and confidence per field
|
|
480
|
+
"""
|
|
456
481
|
from .resources.task_run import TaskRunResourceWithStreamingResponse
|
|
457
482
|
|
|
458
483
|
return TaskRunResourceWithStreamingResponse(self._client.task_run)
|
|
@@ -472,6 +497,11 @@ class AsyncParallelWithStreamedResponse:
|
|
|
472
497
|
|
|
473
498
|
@cached_property
|
|
474
499
|
def task_run(self) -> task_run.AsyncTaskRunResourceWithStreamingResponse:
|
|
500
|
+
"""The Task API executes web research and extraction tasks.
|
|
501
|
+
|
|
502
|
+
Clients submit a natural-language objective with an optional input schema; the service plans retrieval, fetches relevant URLs, and returns outputs that conform to a provided or inferred JSON schema. Supports deep research style queries and can return rich structured JSON outputs. Processors trade-off between cost, latency, and quality. Each processor supports calibrated confidences.
|
|
503
|
+
- Output metadata: citations, excerpts, reasoning, and confidence per field
|
|
504
|
+
"""
|
|
475
505
|
from .resources.task_run import AsyncTaskRunResourceWithStreamingResponse
|
|
476
506
|
|
|
477
507
|
return AsyncTaskRunResourceWithStreamingResponse(self._client.task_run)
|