parallel-web 0.3.2__tar.gz → 0.3.4__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.3.4/.release-please-manifest.json +3 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/CHANGELOG.md +45 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/PKG-INFO +4 -5
- {parallel_web-0.3.2 → parallel_web-0.3.4}/README.md +2 -2
- {parallel_web-0.3.2 → parallel_web-0.3.4}/api.md +34 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/pyproject.toml +3 -4
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/_models.py +37 -15
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/_streaming.py +4 -6
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/_utils/_sync.py +3 -31
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/_utils/_utils.py +1 -1
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/_version.py +1 -1
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/resources/beta/__init__.py +14 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/resources/beta/beta.py +75 -14
- parallel_web-0.3.4/src/parallel/resources/beta/findall.py +1262 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/__init__.py +15 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/beta_extract_params.py +1 -5
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/beta_search_params.py +18 -5
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/excerpt_settings_param.py +4 -4
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/extract_response.py +9 -1
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/extract_result.py +4 -3
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/fetch_policy_param.py +2 -8
- parallel_web-0.3.4/src/parallel/types/beta/findall_candidate_match_status_event.py +68 -0
- parallel_web-0.3.4/src/parallel/types/beta/findall_create_params.py +61 -0
- parallel_web-0.3.4/src/parallel/types/beta/findall_enrich_input.py +20 -0
- parallel_web-0.3.4/src/parallel/types/beta/findall_enrich_params.py +27 -0
- parallel_web-0.3.4/src/parallel/types/beta/findall_events_params.py +20 -0
- parallel_web-0.3.4/src/parallel/types/beta/findall_events_response.py +17 -0
- parallel_web-0.3.4/src/parallel/types/beta/findall_extend_params.py +23 -0
- parallel_web-0.3.4/src/parallel/types/beta/findall_ingest_params.py +19 -0
- parallel_web-0.3.4/src/parallel/types/beta/findall_retrieve_response.py +262 -0
- parallel_web-0.3.4/src/parallel/types/beta/findall_run.py +53 -0
- parallel_web-0.3.4/src/parallel/types/beta/findall_run_result.py +54 -0
- parallel_web-0.3.4/src/parallel/types/beta/findall_run_status_event.py +23 -0
- parallel_web-0.3.4/src/parallel/types/beta/findall_schema.py +41 -0
- parallel_web-0.3.4/src/parallel/types/beta/findall_schema_updated_event.py +23 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/parallel_beta_param.py +8 -1
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/search_result.py +9 -1
- parallel_web-0.3.4/src/parallel/types/beta/usage_item.py +13 -0
- parallel_web-0.3.4/src/parallel/types/beta/web_search_result.py +21 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/shared/source_policy.py +6 -2
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/shared_params/source_policy.py +6 -2
- parallel_web-0.3.4/tests/api_resources/beta/test_findall.py +1047 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/tests/api_resources/beta/test_task_group.py +4 -4
- {parallel_web-0.3.2 → parallel_web-0.3.4}/tests/api_resources/beta/test_task_run.py +4 -4
- {parallel_web-0.3.2 → parallel_web-0.3.4}/tests/api_resources/test_beta.py +26 -9
- {parallel_web-0.3.2 → parallel_web-0.3.4}/tests/api_resources/test_task_run.py +4 -4
- {parallel_web-0.3.2 → parallel_web-0.3.4}/tests/test_client.py +198 -164
- {parallel_web-0.3.2 → parallel_web-0.3.4}/tests/test_models.py +4 -4
- parallel_web-0.3.2/.release-please-manifest.json +0 -3
- parallel_web-0.3.2/src/parallel/types/beta/web_search_result.py +0 -18
- {parallel_web-0.3.2 → parallel_web-0.3.4}/.gitignore +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/CONTRIBUTING.md +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/LICENSE +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/SECURITY.md +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/bin/check-release-environment +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/bin/publish-pypi +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/examples/.keep +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/noxfile.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/release-please-config.json +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/requirements-dev.lock +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/requirements.lock +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/__init__.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/_base_client.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/_client.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/_compat.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/_constants.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/_exceptions.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/_files.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/_qs.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/_resource.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/_response.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/_types.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/_utils/__init__.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/_utils/_compat.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/_utils/_datetime_parse.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/_utils/_logs.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/_utils/_proxy.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/_utils/_reflection.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/_utils/_resources_proxy.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/_utils/_streams.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/_utils/_transform.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/_utils/_typing.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/lib/.keep +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/lib/__init__.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/lib/_parsing/__init__.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/lib/_parsing/_task_run_result.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/lib/_parsing/_task_spec.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/lib/_pydantic.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/lib/_time.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/py.typed +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/resources/__init__.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/resources/beta/task_group.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/resources/beta/task_run.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/resources/task_run.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/__init__.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/auto_schema.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/auto_schema_param.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/beta_run_input.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/beta_run_input_param.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/beta_task_run_result.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/error_event.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/extract_error.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/mcp_server.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/mcp_server_param.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/mcp_tool_call.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/task_group.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/task_group_add_runs_params.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/task_group_create_params.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/task_group_events_params.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/task_group_events_response.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/task_group_get_runs_params.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/task_group_get_runs_response.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/task_group_run_response.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/task_group_status.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/task_run_create_params.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/task_run_event.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/task_run_events_response.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/task_run_result_params.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/webhook.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/beta/webhook_param.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/citation.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/field_basis.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/json_schema.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/json_schema_param.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/parsed_task_run_result.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/shared/__init__.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/shared/error_object.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/shared/error_response.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/shared/warning.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/shared_params/__init__.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/task_run.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/task_run_create_params.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/task_run_json_output.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/task_run_result.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/task_run_result_params.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/task_run_text_output.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/task_spec.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/task_spec_param.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/text_schema.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/src/parallel/types/text_schema_param.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/tests/__init__.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/tests/api_resources/__init__.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/tests/api_resources/beta/__init__.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/tests/conftest.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/tests/sample_file.txt +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/tests/test_deepcopy.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/tests/test_extract_files.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/tests/test_files.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/tests/test_qs.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/tests/test_required_args.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/tests/test_response.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/tests/test_streaming.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/tests/test_transform.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/tests/test_utils/test_datetime_parse.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/tests/test_utils/test_proxy.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/tests/test_utils/test_typing.py +0 -0
- {parallel_web-0.3.2 → parallel_web-0.3.4}/tests/utils.py +0 -0
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.4 (2025-11-12)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.3.3...v0.3.4](https://github.com/parallel-web/parallel-sdk-python/compare/v0.3.3...v0.3.4)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** FindAll sdk updates ([e07fd1e](https://github.com/parallel-web/parallel-sdk-python/commit/e07fd1e75f5562f471454d5ab4d7ecb4334f42ad))
|
|
10
|
+
* **api:** manual updates ([f9957bf](https://github.com/parallel-web/parallel-sdk-python/commit/f9957bf3721b8efe0138c8f8bd96a929419087a1))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* compat with Python 3.14 ([a63f4ee](https://github.com/parallel-web/parallel-sdk-python/commit/a63f4eeeb7d7193765d4dbcac1781e67615a5580))
|
|
16
|
+
* **compat:** update signatures of `model_dump` and `model_dump_json` for Pydantic v1 ([cf9de5f](https://github.com/parallel-web/parallel-sdk-python/commit/cf9de5f7a8c1f6e026c441b24aad6e5712d7845b))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Chores
|
|
20
|
+
|
|
21
|
+
* **package:** drop Python 3.8 support ([ba0bf24](https://github.com/parallel-web/parallel-sdk-python/commit/ba0bf24b6476e341fc497a70e6fdfb890b0923a4))
|
|
22
|
+
|
|
23
|
+
## 0.3.3 (2025-11-06)
|
|
24
|
+
|
|
25
|
+
Full Changelog: [v0.3.2...v0.3.3](https://github.com/parallel-web/parallel-sdk-python/compare/v0.3.2...v0.3.3)
|
|
26
|
+
|
|
27
|
+
### Features
|
|
28
|
+
|
|
29
|
+
* **api:** add fetch_policy and mode to /v1beta/search ([1d7200a](https://github.com/parallel-web/parallel-sdk-python/commit/1d7200a56264719ea109e352c3ef0a02609495fd))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
* **api:** add back /v1/tasks/runs?=beta ([bdecee5](https://github.com/parallel-web/parallel-sdk-python/commit/bdecee5bfd3811751c340ef4ac38e76cdf264c29))
|
|
35
|
+
* **api:** Make beta headers optional in /v1beta/extract ([bc9e1c2](https://github.com/parallel-web/parallel-sdk-python/commit/bc9e1c205267203806d09cf52c0a30482fff40b8))
|
|
36
|
+
* **api:** re-add deprecated max_chars_per_result ([e0976a1](https://github.com/parallel-web/parallel-sdk-python/commit/e0976a12f85f88c82d40ee8129963c483d53cf3b))
|
|
37
|
+
* **api:** re-add deprecated processor to /v1beta/extract ([d656151](https://github.com/parallel-web/parallel-sdk-python/commit/d6561513ed508f4337b650269090c55eea00d7f9))
|
|
38
|
+
* **api:** remove full_content from /v1beta/search output ([c13d6db](https://github.com/parallel-web/parallel-sdk-python/commit/c13d6db25c054a91d0a4c0fa0ad09c051cf0a92a))
|
|
39
|
+
* **client:** close streams without requiring full consumption ([e6ba5dc](https://github.com/parallel-web/parallel-sdk-python/commit/e6ba5dc8bb4cc3ad283540e46375e799e5a10cea))
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Chores
|
|
43
|
+
|
|
44
|
+
* **internal/tests:** avoid race condition with implicit client cleanup ([4ec359d](https://github.com/parallel-web/parallel-sdk-python/commit/4ec359dbc78ec6bf64780fcf7499d684205442a8))
|
|
45
|
+
* **internal:** grammar fix (it's -> its) ([fd8a351](https://github.com/parallel-web/parallel-sdk-python/commit/fd8a3518051b452c6e9aff121592c67f60e1be13))
|
|
46
|
+
* **lint:** reorder imports ([901e4f1](https://github.com/parallel-web/parallel-sdk-python/commit/901e4f1a5597a662764ce9d4a890d3075f484984))
|
|
47
|
+
|
|
3
48
|
## 0.3.2 (2025-10-22)
|
|
4
49
|
|
|
5
50
|
Full Changelog: [v0.3.1...v0.3.2](https://github.com/parallel-web/parallel-sdk-python/compare/v0.3.1...v0.3.2)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: parallel-web
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
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
|
|
@@ -13,7 +13,6 @@ Classifier: Operating System :: Microsoft :: Windows
|
|
|
13
13
|
Classifier: Operating System :: OS Independent
|
|
14
14
|
Classifier: Operating System :: POSIX
|
|
15
15
|
Classifier: Operating System :: POSIX :: Linux
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.9
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.11
|
|
@@ -21,7 +20,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
21
20
|
Classifier: Programming Language :: Python :: 3.13
|
|
22
21
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
23
22
|
Classifier: Typing :: Typed
|
|
24
|
-
Requires-Python: >=3.
|
|
23
|
+
Requires-Python: >=3.9
|
|
25
24
|
Requires-Dist: anyio<5,>=3.5.0
|
|
26
25
|
Requires-Dist: distro<2,>=1.7.0
|
|
27
26
|
Requires-Dist: httpx<1,>=0.23.0
|
|
@@ -38,7 +37,7 @@ Description-Content-Type: text/markdown
|
|
|
38
37
|
<!-- prettier-ignore -->
|
|
39
38
|
[)](https://pypi.org/project/parallel-web/)
|
|
40
39
|
|
|
41
|
-
The Parallel Python library provides convenient access to the Parallel REST API from any Python 3.
|
|
40
|
+
The Parallel Python library provides convenient access to the Parallel REST API from any Python 3.9+
|
|
42
41
|
application. The library includes type definitions for all request params and response fields,
|
|
43
42
|
and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
|
|
44
43
|
It is strongly encouraged to use the asynchronous client for best performance.
|
|
@@ -453,7 +452,7 @@ print(parallel.__version__)
|
|
|
453
452
|
|
|
454
453
|
## Requirements
|
|
455
454
|
|
|
456
|
-
Python 3.
|
|
455
|
+
Python 3.9 or higher.
|
|
457
456
|
|
|
458
457
|
## Contributing
|
|
459
458
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<!-- prettier-ignore -->
|
|
4
4
|
[)](https://pypi.org/project/parallel-web/)
|
|
5
5
|
|
|
6
|
-
The Parallel Python library provides convenient access to the Parallel REST API from any Python 3.
|
|
6
|
+
The Parallel Python library provides convenient access to the Parallel REST API from any Python 3.9+
|
|
7
7
|
application. The library includes type definitions for all request params and response fields,
|
|
8
8
|
and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
|
|
9
9
|
It is strongly encouraged to use the asynchronous client for best performance.
|
|
@@ -418,7 +418,7 @@ print(parallel.__version__)
|
|
|
418
418
|
|
|
419
419
|
## Requirements
|
|
420
420
|
|
|
421
|
-
Python 3.
|
|
421
|
+
Python 3.9 or higher.
|
|
422
422
|
|
|
423
423
|
## Contributing
|
|
424
424
|
|
|
@@ -47,6 +47,7 @@ from parallel.types.beta import (
|
|
|
47
47
|
ExtractResult,
|
|
48
48
|
FetchPolicy,
|
|
49
49
|
SearchResult,
|
|
50
|
+
UsageItem,
|
|
50
51
|
WebSearchResult,
|
|
51
52
|
)
|
|
52
53
|
```
|
|
@@ -101,3 +102,36 @@ Methods:
|
|
|
101
102
|
- <code title="post /v1beta/tasks/groups/{taskgroup_id}/runs">client.beta.task_group.<a href="./src/parallel/resources/beta/task_group.py">add_runs</a>(task_group_id, \*\*<a href="src/parallel/types/beta/task_group_add_runs_params.py">params</a>) -> <a href="./src/parallel/types/beta/task_group_run_response.py">TaskGroupRunResponse</a></code>
|
|
102
103
|
- <code title="get /v1beta/tasks/groups/{taskgroup_id}/events">client.beta.task_group.<a href="./src/parallel/resources/beta/task_group.py">events</a>(task_group_id, \*\*<a href="src/parallel/types/beta/task_group_events_params.py">params</a>) -> <a href="./src/parallel/types/beta/task_group_events_response.py">TaskGroupEventsResponse</a></code>
|
|
103
104
|
- <code title="get /v1beta/tasks/groups/{taskgroup_id}/runs">client.beta.task_group.<a href="./src/parallel/resources/beta/task_group.py">get_runs</a>(task_group_id, \*\*<a href="src/parallel/types/beta/task_group_get_runs_params.py">params</a>) -> <a href="./src/parallel/types/beta/task_group_get_runs_response.py">TaskGroupGetRunsResponse</a></code>
|
|
105
|
+
|
|
106
|
+
## Findall
|
|
107
|
+
|
|
108
|
+
Types:
|
|
109
|
+
|
|
110
|
+
```python
|
|
111
|
+
from parallel.types.beta import (
|
|
112
|
+
FindallCandidateMatchStatusEvent,
|
|
113
|
+
FindallEnrichInput,
|
|
114
|
+
FindallExtendInput,
|
|
115
|
+
FindallRun,
|
|
116
|
+
FindallRunInput,
|
|
117
|
+
FindallRunResult,
|
|
118
|
+
FindallRunStatusEvent,
|
|
119
|
+
FindallSchema,
|
|
120
|
+
FindallSchemaUpdatedEvent,
|
|
121
|
+
IngestInput,
|
|
122
|
+
FindallRetrieveResponse,
|
|
123
|
+
FindallEventsResponse,
|
|
124
|
+
)
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Methods:
|
|
128
|
+
|
|
129
|
+
- <code title="post /v1beta/findall/runs">client.beta.findall.<a href="./src/parallel/resources/beta/findall.py">create</a>(\*\*<a href="src/parallel/types/beta/findall_create_params.py">params</a>) -> <a href="./src/parallel/types/beta/findall_run.py">FindallRun</a></code>
|
|
130
|
+
- <code title="get /v1beta/findall/runs/{findall_id}">client.beta.findall.<a href="./src/parallel/resources/beta/findall.py">retrieve</a>(findall_id) -> <a href="./src/parallel/types/beta/findall_retrieve_response.py">FindallRetrieveResponse</a></code>
|
|
131
|
+
- <code title="post /v1beta/findall/runs/{findall_id}/cancel">client.beta.findall.<a href="./src/parallel/resources/beta/findall.py">cancel</a>(findall_id) -> object</code>
|
|
132
|
+
- <code title="post /v1beta/findall/runs/{findall_id}/enrich">client.beta.findall.<a href="./src/parallel/resources/beta/findall.py">enrich</a>(findall_id, \*\*<a href="src/parallel/types/beta/findall_enrich_params.py">params</a>) -> <a href="./src/parallel/types/beta/findall_schema.py">FindallSchema</a></code>
|
|
133
|
+
- <code title="get /v1beta/findall/runs/{findall_id}/events">client.beta.findall.<a href="./src/parallel/resources/beta/findall.py">events</a>(findall_id, \*\*<a href="src/parallel/types/beta/findall_events_params.py">params</a>) -> <a href="./src/parallel/types/beta/findall_events_response.py">FindallEventsResponse</a></code>
|
|
134
|
+
- <code title="post /v1beta/findall/runs/{findall_id}/extend">client.beta.findall.<a href="./src/parallel/resources/beta/findall.py">extend</a>(findall_id, \*\*<a href="src/parallel/types/beta/findall_extend_params.py">params</a>) -> <a href="./src/parallel/types/beta/findall_schema.py">FindallSchema</a></code>
|
|
135
|
+
- <code title="post /v1beta/findall/ingest">client.beta.findall.<a href="./src/parallel/resources/beta/findall.py">ingest</a>(\*\*<a href="src/parallel/types/beta/findall_ingest_params.py">params</a>) -> <a href="./src/parallel/types/beta/findall_schema.py">FindallSchema</a></code>
|
|
136
|
+
- <code title="get /v1beta/findall/runs/{findall_id}/result">client.beta.findall.<a href="./src/parallel/resources/beta/findall.py">result</a>(findall_id) -> <a href="./src/parallel/types/beta/findall_run_result.py">FindallRunResult</a></code>
|
|
137
|
+
- <code title="get /v1beta/findall/runs/{findall_id}/schema">client.beta.findall.<a href="./src/parallel/resources/beta/findall.py">schema</a>(findall_id) -> <a href="./src/parallel/types/beta/findall_schema.py">FindallSchema</a></code>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "parallel-web"
|
|
3
|
-
version = "0.3.
|
|
3
|
+
version = "0.3.4"
|
|
4
4
|
description = "The official Python library for the Parallel API"
|
|
5
5
|
dynamic = ["readme"]
|
|
6
6
|
license = "MIT"
|
|
@@ -15,11 +15,10 @@ dependencies = [
|
|
|
15
15
|
"distro>=1.7.0, <2",
|
|
16
16
|
"sniffio",
|
|
17
17
|
]
|
|
18
|
-
requires-python = ">= 3.
|
|
18
|
+
requires-python = ">= 3.9"
|
|
19
19
|
classifiers = [
|
|
20
20
|
"Typing :: Typed",
|
|
21
21
|
"Intended Audience :: Developers",
|
|
22
|
-
"Programming Language :: Python :: 3.8",
|
|
23
22
|
"Programming Language :: Python :: 3.9",
|
|
24
23
|
"Programming Language :: Python :: 3.10",
|
|
25
24
|
"Programming Language :: Python :: 3.11",
|
|
@@ -142,7 +141,7 @@ filterwarnings = [
|
|
|
142
141
|
# there are a couple of flags that are still disabled by
|
|
143
142
|
# default in strict mode as they are experimental and niche.
|
|
144
143
|
typeCheckingMode = "strict"
|
|
145
|
-
pythonVersion = "3.
|
|
144
|
+
pythonVersion = "3.9"
|
|
146
145
|
|
|
147
146
|
exclude = [
|
|
148
147
|
"_dev",
|
|
@@ -2,6 +2,7 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
4
|
import inspect
|
|
5
|
+
import weakref
|
|
5
6
|
from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, Optional, cast
|
|
6
7
|
from datetime import date, datetime
|
|
7
8
|
from typing_extensions import (
|
|
@@ -256,15 +257,16 @@ class BaseModel(pydantic.BaseModel):
|
|
|
256
257
|
mode: Literal["json", "python"] | str = "python",
|
|
257
258
|
include: IncEx | None = None,
|
|
258
259
|
exclude: IncEx | None = None,
|
|
260
|
+
context: Any | None = None,
|
|
259
261
|
by_alias: bool | None = None,
|
|
260
262
|
exclude_unset: bool = False,
|
|
261
263
|
exclude_defaults: bool = False,
|
|
262
264
|
exclude_none: bool = False,
|
|
265
|
+
exclude_computed_fields: bool = False,
|
|
263
266
|
round_trip: bool = False,
|
|
264
267
|
warnings: bool | Literal["none", "warn", "error"] = True,
|
|
265
|
-
context: dict[str, Any] | None = None,
|
|
266
|
-
serialize_as_any: bool = False,
|
|
267
268
|
fallback: Callable[[Any], Any] | None = None,
|
|
269
|
+
serialize_as_any: bool = False,
|
|
268
270
|
) -> dict[str, Any]:
|
|
269
271
|
"""Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump
|
|
270
272
|
|
|
@@ -272,16 +274,24 @@ class BaseModel(pydantic.BaseModel):
|
|
|
272
274
|
|
|
273
275
|
Args:
|
|
274
276
|
mode: The mode in which `to_python` should run.
|
|
275
|
-
If mode is 'json', the
|
|
276
|
-
If mode is 'python', the
|
|
277
|
-
include: A
|
|
278
|
-
exclude: A
|
|
277
|
+
If mode is 'json', the output will only contain JSON serializable types.
|
|
278
|
+
If mode is 'python', the output may contain non-JSON-serializable Python objects.
|
|
279
|
+
include: A set of fields to include in the output.
|
|
280
|
+
exclude: A set of fields to exclude from the output.
|
|
281
|
+
context: Additional context to pass to the serializer.
|
|
279
282
|
by_alias: Whether to use the field's alias in the dictionary key if defined.
|
|
280
|
-
exclude_unset: Whether to exclude fields that
|
|
281
|
-
exclude_defaults: Whether to exclude fields that are set to their default value
|
|
282
|
-
exclude_none: Whether to exclude fields that have a value of `None
|
|
283
|
-
|
|
284
|
-
|
|
283
|
+
exclude_unset: Whether to exclude fields that have not been explicitly set.
|
|
284
|
+
exclude_defaults: Whether to exclude fields that are set to their default value.
|
|
285
|
+
exclude_none: Whether to exclude fields that have a value of `None`.
|
|
286
|
+
exclude_computed_fields: Whether to exclude computed fields.
|
|
287
|
+
While this can be useful for round-tripping, it is usually recommended to use the dedicated
|
|
288
|
+
`round_trip` parameter instead.
|
|
289
|
+
round_trip: If True, dumped values should be valid as input for non-idempotent types such as Json[T].
|
|
290
|
+
warnings: How to handle serialization errors. False/"none" ignores them, True/"warn" logs errors,
|
|
291
|
+
"error" raises a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError].
|
|
292
|
+
fallback: A function to call when an unknown value is encountered. If not provided,
|
|
293
|
+
a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError] error is raised.
|
|
294
|
+
serialize_as_any: Whether to serialize fields with duck-typing serialization behavior.
|
|
285
295
|
|
|
286
296
|
Returns:
|
|
287
297
|
A dictionary representation of the model.
|
|
@@ -298,6 +308,8 @@ class BaseModel(pydantic.BaseModel):
|
|
|
298
308
|
raise ValueError("serialize_as_any is only supported in Pydantic v2")
|
|
299
309
|
if fallback is not None:
|
|
300
310
|
raise ValueError("fallback is only supported in Pydantic v2")
|
|
311
|
+
if exclude_computed_fields != False:
|
|
312
|
+
raise ValueError("exclude_computed_fields is only supported in Pydantic v2")
|
|
301
313
|
dumped = super().dict( # pyright: ignore[reportDeprecated]
|
|
302
314
|
include=include,
|
|
303
315
|
exclude=exclude,
|
|
@@ -314,15 +326,17 @@ class BaseModel(pydantic.BaseModel):
|
|
|
314
326
|
self,
|
|
315
327
|
*,
|
|
316
328
|
indent: int | None = None,
|
|
329
|
+
ensure_ascii: bool = False,
|
|
317
330
|
include: IncEx | None = None,
|
|
318
331
|
exclude: IncEx | None = None,
|
|
332
|
+
context: Any | None = None,
|
|
319
333
|
by_alias: bool | None = None,
|
|
320
334
|
exclude_unset: bool = False,
|
|
321
335
|
exclude_defaults: bool = False,
|
|
322
336
|
exclude_none: bool = False,
|
|
337
|
+
exclude_computed_fields: bool = False,
|
|
323
338
|
round_trip: bool = False,
|
|
324
339
|
warnings: bool | Literal["none", "warn", "error"] = True,
|
|
325
|
-
context: dict[str, Any] | None = None,
|
|
326
340
|
fallback: Callable[[Any], Any] | None = None,
|
|
327
341
|
serialize_as_any: bool = False,
|
|
328
342
|
) -> str:
|
|
@@ -354,6 +368,10 @@ class BaseModel(pydantic.BaseModel):
|
|
|
354
368
|
raise ValueError("serialize_as_any is only supported in Pydantic v2")
|
|
355
369
|
if fallback is not None:
|
|
356
370
|
raise ValueError("fallback is only supported in Pydantic v2")
|
|
371
|
+
if ensure_ascii != False:
|
|
372
|
+
raise ValueError("ensure_ascii is only supported in Pydantic v2")
|
|
373
|
+
if exclude_computed_fields != False:
|
|
374
|
+
raise ValueError("exclude_computed_fields is only supported in Pydantic v2")
|
|
357
375
|
return super().json( # type: ignore[reportDeprecated]
|
|
358
376
|
indent=indent,
|
|
359
377
|
include=include,
|
|
@@ -573,6 +591,9 @@ class CachedDiscriminatorType(Protocol):
|
|
|
573
591
|
__discriminator__: DiscriminatorDetails
|
|
574
592
|
|
|
575
593
|
|
|
594
|
+
DISCRIMINATOR_CACHE: weakref.WeakKeyDictionary[type, DiscriminatorDetails] = weakref.WeakKeyDictionary()
|
|
595
|
+
|
|
596
|
+
|
|
576
597
|
class DiscriminatorDetails:
|
|
577
598
|
field_name: str
|
|
578
599
|
"""The name of the discriminator field in the variant class, e.g.
|
|
@@ -615,8 +636,9 @@ class DiscriminatorDetails:
|
|
|
615
636
|
|
|
616
637
|
|
|
617
638
|
def _build_discriminated_union_meta(*, union: type, meta_annotations: tuple[Any, ...]) -> DiscriminatorDetails | None:
|
|
618
|
-
|
|
619
|
-
|
|
639
|
+
cached = DISCRIMINATOR_CACHE.get(union)
|
|
640
|
+
if cached is not None:
|
|
641
|
+
return cached
|
|
620
642
|
|
|
621
643
|
discriminator_field_name: str | None = None
|
|
622
644
|
|
|
@@ -669,7 +691,7 @@ def _build_discriminated_union_meta(*, union: type, meta_annotations: tuple[Any,
|
|
|
669
691
|
discriminator_field=discriminator_field_name,
|
|
670
692
|
discriminator_alias=discriminator_alias,
|
|
671
693
|
)
|
|
672
|
-
|
|
694
|
+
DISCRIMINATOR_CACHE.setdefault(union, details)
|
|
673
695
|
return details
|
|
674
696
|
|
|
675
697
|
|
|
@@ -57,9 +57,8 @@ class Stream(Generic[_T]):
|
|
|
57
57
|
for sse in iterator:
|
|
58
58
|
yield process_data(data=sse.json(), cast_to=cast_to, response=response)
|
|
59
59
|
|
|
60
|
-
#
|
|
61
|
-
|
|
62
|
-
...
|
|
60
|
+
# As we might not fully consume the response stream, we need to close it explicitly
|
|
61
|
+
response.close()
|
|
63
62
|
|
|
64
63
|
def __enter__(self) -> Self:
|
|
65
64
|
return self
|
|
@@ -121,9 +120,8 @@ class AsyncStream(Generic[_T]):
|
|
|
121
120
|
async for sse in iterator:
|
|
122
121
|
yield process_data(data=sse.json(), cast_to=cast_to, response=response)
|
|
123
122
|
|
|
124
|
-
#
|
|
125
|
-
|
|
126
|
-
...
|
|
123
|
+
# As we might not fully consume the response stream, we need to close it explicitly
|
|
124
|
+
await response.aclose()
|
|
127
125
|
|
|
128
126
|
async def __aenter__(self) -> Self:
|
|
129
127
|
return self
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
import sys
|
|
4
3
|
import asyncio
|
|
5
4
|
import functools
|
|
6
|
-
import
|
|
7
|
-
from typing import Any, TypeVar, Callable, Awaitable
|
|
5
|
+
from typing import TypeVar, Callable, Awaitable
|
|
8
6
|
from typing_extensions import ParamSpec
|
|
9
7
|
|
|
10
8
|
import anyio
|
|
@@ -15,34 +13,11 @@ T_Retval = TypeVar("T_Retval")
|
|
|
15
13
|
T_ParamSpec = ParamSpec("T_ParamSpec")
|
|
16
14
|
|
|
17
15
|
|
|
18
|
-
if sys.version_info >= (3, 9):
|
|
19
|
-
_asyncio_to_thread = asyncio.to_thread
|
|
20
|
-
else:
|
|
21
|
-
# backport of https://docs.python.org/3/library/asyncio-task.html#asyncio.to_thread
|
|
22
|
-
# for Python 3.8 support
|
|
23
|
-
async def _asyncio_to_thread(
|
|
24
|
-
func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs
|
|
25
|
-
) -> Any:
|
|
26
|
-
"""Asynchronously run function *func* in a separate thread.
|
|
27
|
-
|
|
28
|
-
Any *args and **kwargs supplied for this function are directly passed
|
|
29
|
-
to *func*. Also, the current :class:`contextvars.Context` is propagated,
|
|
30
|
-
allowing context variables from the main thread to be accessed in the
|
|
31
|
-
separate thread.
|
|
32
|
-
|
|
33
|
-
Returns a coroutine that can be awaited to get the eventual result of *func*.
|
|
34
|
-
"""
|
|
35
|
-
loop = asyncio.events.get_running_loop()
|
|
36
|
-
ctx = contextvars.copy_context()
|
|
37
|
-
func_call = functools.partial(ctx.run, func, *args, **kwargs)
|
|
38
|
-
return await loop.run_in_executor(None, func_call)
|
|
39
|
-
|
|
40
|
-
|
|
41
16
|
async def to_thread(
|
|
42
17
|
func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs
|
|
43
18
|
) -> T_Retval:
|
|
44
19
|
if sniffio.current_async_library() == "asyncio":
|
|
45
|
-
return await
|
|
20
|
+
return await asyncio.to_thread(func, *args, **kwargs)
|
|
46
21
|
|
|
47
22
|
return await anyio.to_thread.run_sync(
|
|
48
23
|
functools.partial(func, *args, **kwargs),
|
|
@@ -53,10 +28,7 @@ async def to_thread(
|
|
|
53
28
|
def asyncify(function: Callable[T_ParamSpec, T_Retval]) -> Callable[T_ParamSpec, Awaitable[T_Retval]]:
|
|
54
29
|
"""
|
|
55
30
|
Take a blocking function and create an async one that receives the same
|
|
56
|
-
positional and keyword arguments.
|
|
57
|
-
asyncio.to_thread to run the function in a separate thread. For python version
|
|
58
|
-
3.8, it uses locally defined copy of the asyncio.to_thread function which was
|
|
59
|
-
introduced in python 3.9.
|
|
31
|
+
positional and keyword arguments.
|
|
60
32
|
|
|
61
33
|
Usage:
|
|
62
34
|
|
|
@@ -133,7 +133,7 @@ def is_given(obj: _T | NotGiven | Omit) -> TypeGuard[_T]:
|
|
|
133
133
|
# Type safe methods for narrowing types with TypeVars.
|
|
134
134
|
# The default narrowing for isinstance(obj, dict) is dict[unknown, unknown],
|
|
135
135
|
# however this cause Pyright to rightfully report errors. As we know we don't
|
|
136
|
-
# care about the contained types we can safely use `object` in
|
|
136
|
+
# care about the contained types we can safely use `object` in its place.
|
|
137
137
|
#
|
|
138
138
|
# There are two separate functions defined, `is_*` and `is_*_t` for different use cases.
|
|
139
139
|
# `is_*` is for when you're dealing with an unknown input
|
|
@@ -8,6 +8,14 @@ from .beta import (
|
|
|
8
8
|
BetaResourceWithStreamingResponse,
|
|
9
9
|
AsyncBetaResourceWithStreamingResponse,
|
|
10
10
|
)
|
|
11
|
+
from .findall import (
|
|
12
|
+
FindallResource,
|
|
13
|
+
AsyncFindallResource,
|
|
14
|
+
FindallResourceWithRawResponse,
|
|
15
|
+
AsyncFindallResourceWithRawResponse,
|
|
16
|
+
FindallResourceWithStreamingResponse,
|
|
17
|
+
AsyncFindallResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
11
19
|
from .task_run import (
|
|
12
20
|
TaskRunResource,
|
|
13
21
|
AsyncTaskRunResource,
|
|
@@ -38,6 +46,12 @@ __all__ = [
|
|
|
38
46
|
"AsyncTaskGroupResourceWithRawResponse",
|
|
39
47
|
"TaskGroupResourceWithStreamingResponse",
|
|
40
48
|
"AsyncTaskGroupResourceWithStreamingResponse",
|
|
49
|
+
"FindallResource",
|
|
50
|
+
"AsyncFindallResource",
|
|
51
|
+
"FindallResourceWithRawResponse",
|
|
52
|
+
"AsyncFindallResourceWithRawResponse",
|
|
53
|
+
"FindallResourceWithStreamingResponse",
|
|
54
|
+
"AsyncFindallResourceWithStreamingResponse",
|
|
41
55
|
"BetaResource",
|
|
42
56
|
"AsyncBetaResource",
|
|
43
57
|
"BetaResourceWithRawResponse",
|