parallel-web 0.1.3__tar.gz → 0.2.1__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.
Potentially problematic release.
This version of parallel-web might be problematic. Click here for more details.
- {parallel_web-0.1.3 → parallel_web-0.2.1}/.gitignore +0 -1
- parallel_web-0.2.1/.release-please-manifest.json +3 -0
- parallel_web-0.2.1/CHANGELOG.md +147 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/PKG-INFO +23 -159
- {parallel_web-0.1.3 → parallel_web-0.2.1}/README.md +18 -158
- parallel_web-0.2.1/api.md +94 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/bin/check-release-environment +1 -1
- {parallel_web-0.1.3 → parallel_web-0.2.1}/pyproject.toml +59 -3
- {parallel_web-0.1.3 → parallel_web-0.2.1}/requirements-dev.lock +32 -3
- {parallel_web-0.1.3 → parallel_web-0.2.1}/requirements.lock +29 -2
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/__init__.py +2 -1
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/_base_client.py +37 -5
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/_client.py +9 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/_compat.py +55 -54
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/_files.py +4 -4
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/_models.py +70 -46
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/_types.py +35 -1
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/_utils/__init__.py +9 -2
- parallel_web-0.2.1/src/parallel/_utils/_compat.py +45 -0
- parallel_web-0.2.1/src/parallel/_utils/_datetime_parse.py +136 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/_utils/_transform.py +11 -1
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/_utils/_typing.py +6 -1
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/_utils/_utils.py +0 -1
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/_version.py +1 -1
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/lib/_pydantic.py +4 -3
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/resources/__init__.py +14 -0
- parallel_web-0.2.1/src/parallel/resources/beta/__init__.py +47 -0
- parallel_web-0.2.1/src/parallel/resources/beta/beta.py +301 -0
- parallel_web-0.2.1/src/parallel/resources/beta/task_group.py +632 -0
- parallel_web-0.2.1/src/parallel/resources/beta/task_run.py +499 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/resources/task_run.py +47 -18
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/types/__init__.py +15 -0
- parallel_web-0.2.1/src/parallel/types/auto_schema.py +13 -0
- parallel_web-0.2.1/src/parallel/types/auto_schema_param.py +12 -0
- parallel_web-0.2.1/src/parallel/types/beta/__init__.py +30 -0
- parallel_web-0.2.1/src/parallel/types/beta/beta_run_input.py +63 -0
- parallel_web-0.2.1/src/parallel/types/beta/beta_run_input_param.py +65 -0
- parallel_web-0.2.1/src/parallel/types/beta/beta_search_params.py +48 -0
- parallel_web-0.2.1/src/parallel/types/beta/beta_task_run_result.py +74 -0
- parallel_web-0.2.1/src/parallel/types/beta/error_event.py +16 -0
- parallel_web-0.2.1/src/parallel/types/beta/mcp_server.py +25 -0
- parallel_web-0.2.1/src/parallel/types/beta/mcp_server_param.py +27 -0
- parallel_web-0.2.1/src/parallel/types/beta/mcp_tool_call.py +27 -0
- parallel_web-0.2.1/src/parallel/types/beta/parallel_beta_param.py +12 -0
- parallel_web-0.2.1/src/parallel/types/beta/search_result.py +16 -0
- parallel_web-0.2.1/src/parallel/types/beta/task_group.py +24 -0
- parallel_web-0.2.1/src/parallel/types/beta/task_group_add_runs_params.py +30 -0
- parallel_web-0.2.1/src/parallel/types/beta/task_group_create_params.py +13 -0
- parallel_web-0.2.1/src/parallel/types/beta/task_group_events_params.py +16 -0
- parallel_web-0.2.1/src/parallel/types/beta/task_group_events_response.py +28 -0
- parallel_web-0.2.1/src/parallel/types/beta/task_group_get_runs_params.py +18 -0
- parallel_web-0.2.1/src/parallel/types/beta/task_group_get_runs_response.py +12 -0
- parallel_web-0.2.1/src/parallel/types/beta/task_group_run_response.py +30 -0
- parallel_web-0.2.1/src/parallel/types/beta/task_group_status.py +27 -0
- parallel_web-0.2.1/src/parallel/types/beta/task_run_create_params.py +70 -0
- parallel_web-0.2.1/src/parallel/types/beta/task_run_event.py +32 -0
- parallel_web-0.2.1/src/parallel/types/beta/task_run_events_response.py +58 -0
- parallel_web-0.2.1/src/parallel/types/beta/task_run_result_params.py +18 -0
- parallel_web-0.2.1/src/parallel/types/beta/web_search_result.py +18 -0
- parallel_web-0.2.1/src/parallel/types/beta/webhook.py +16 -0
- parallel_web-0.2.1/src/parallel/types/beta/webhook_param.py +16 -0
- parallel_web-0.2.1/src/parallel/types/citation.py +21 -0
- parallel_web-0.2.1/src/parallel/types/field_basis.py +25 -0
- parallel_web-0.2.1/src/parallel/types/json_schema.py +16 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/types/json_schema_param.py +2 -1
- parallel_web-0.2.1/src/parallel/types/parsed_task_run_result.py +38 -0
- parallel_web-0.2.1/src/parallel/types/shared/__init__.py +6 -0
- parallel_web-0.2.1/src/parallel/types/shared/error_object.py +18 -0
- parallel_web-0.2.1/src/parallel/types/shared/error_response.py +16 -0
- parallel_web-0.2.1/src/parallel/types/shared/source_policy.py +21 -0
- parallel_web-0.2.1/src/parallel/types/shared/warning.py +22 -0
- parallel_web-0.2.1/src/parallel/types/shared_params/__init__.py +3 -0
- parallel_web-0.2.1/src/parallel/types/shared_params/source_policy.py +23 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/types/task_run.py +17 -18
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/types/task_run_create_params.py +12 -3
- parallel_web-0.2.1/src/parallel/types/task_run_json_output.py +46 -0
- parallel_web-0.2.1/src/parallel/types/task_run_result.py +52 -0
- parallel_web-0.2.1/src/parallel/types/task_run_text_output.py +37 -0
- parallel_web-0.2.1/src/parallel/types/task_spec.py +31 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/types/task_spec_param.py +3 -2
- parallel_web-0.2.1/src/parallel/types/text_schema.py +16 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/types/text_schema_param.py +3 -2
- parallel_web-0.2.1/tests/api_resources/beta/__init__.py +1 -0
- parallel_web-0.2.1/tests/api_resources/beta/test_task_group.py +613 -0
- parallel_web-0.2.1/tests/api_resources/beta/test_task_run.py +349 -0
- parallel_web-0.2.1/tests/api_resources/test_beta.py +104 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/tests/api_resources/test_task_run.py +37 -63
- {parallel_web-0.1.3 → parallel_web-0.2.1}/tests/conftest.py +37 -6
- {parallel_web-0.1.3 → parallel_web-0.2.1}/tests/test_client.py +36 -59
- {parallel_web-0.1.3 → parallel_web-0.2.1}/tests/test_models.py +96 -24
- {parallel_web-0.1.3 → parallel_web-0.2.1}/tests/test_transform.py +8 -8
- parallel_web-0.2.1/tests/test_utils/test_datetime_parse.py +110 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/tests/utils.py +13 -5
- parallel_web-0.1.3/.release-please-manifest.json +0 -3
- parallel_web-0.1.3/CHANGELOG.md +0 -84
- parallel_web-0.1.3/api.md +0 -18
- parallel_web-0.1.3/mypy.ini +0 -50
- parallel_web-0.1.3/src/parallel/types/parsed_task_run_result.py +0 -29
- parallel_web-0.1.3/src/parallel/types/task_run_result.py +0 -122
- {parallel_web-0.1.3 → parallel_web-0.2.1}/CONTRIBUTING.md +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/LICENSE +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/SECURITY.md +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/bin/publish-pypi +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/examples/.keep +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/noxfile.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/release-please-config.json +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/_constants.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/_exceptions.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/_qs.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/_resource.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/_response.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/_streaming.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/_utils/_logs.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/_utils/_proxy.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/_utils/_reflection.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/_utils/_resources_proxy.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/_utils/_streams.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/_utils/_sync.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/lib/.keep +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/lib/__init__.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/lib/_parsing/__init__.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/lib/_parsing/_task_run_result.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/lib/_parsing/_task_spec.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/lib/_time.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/py.typed +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/src/parallel/types/task_run_result_params.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/tests/__init__.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/tests/api_resources/__init__.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/tests/sample_file.txt +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/tests/test_deepcopy.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/tests/test_extract_files.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/tests/test_files.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/tests/test_qs.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/tests/test_required_args.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/tests/test_response.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/tests/test_streaming.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/tests/test_utils/test_proxy.py +0 -0
- {parallel_web-0.1.3 → parallel_web-0.2.1}/tests/test_utils/test_typing.py +0 -0
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.2.1 (2025-09-15)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.2.0...v0.2.1](https://github.com/parallel-web/parallel-sdk-python/compare/v0.2.0...v0.2.1)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** Allow nullable text schemas ([dc87604](https://github.com/parallel-web/parallel-sdk-python/commit/dc87604a3c83bf7c30086c4c23c4e689628bc5a7))
|
|
10
|
+
* improve future compat with pydantic v3 ([ea49f26](https://github.com/parallel-web/parallel-sdk-python/commit/ea49f26543681aa59de34577cae1fb8a57b077c5))
|
|
11
|
+
* **types:** replace List[str] with SequenceNotStr in params ([6155c3f](https://github.com/parallel-web/parallel-sdk-python/commit/6155c3f30b46ce9bd39aaadc3dddf275d555e2ba))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Chores
|
|
15
|
+
|
|
16
|
+
* **internal:** codegen related update ([72ec907](https://github.com/parallel-web/parallel-sdk-python/commit/72ec90723bac0b80a9c8e79f7cab985425beedad))
|
|
17
|
+
* **internal:** move mypy configurations to `pyproject.toml` file ([e03d641](https://github.com/parallel-web/parallel-sdk-python/commit/e03d64154278ebd8d844751d4d55e275177cf4f1))
|
|
18
|
+
* **tests:** simplify `get_platform` test ([9862221](https://github.com/parallel-web/parallel-sdk-python/commit/9862221997402f105c75df206004fc8d6e206ce8))
|
|
19
|
+
|
|
20
|
+
## 0.2.0 (2025-09-01)
|
|
21
|
+
|
|
22
|
+
Full Changelog: [v0.1.3...v0.2.0](https://github.com/parallel-web/parallel-sdk-python/compare/v0.1.3...v0.2.0)
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
* **api:** update via SDK Studio ([b048bd7](https://github.com/parallel-web/parallel-sdk-python/commit/b048bd7e1c5a992ae274aa4b6df16a9d5b0f843e))
|
|
27
|
+
* **api:** update via SDK Studio ([b9abf3c](https://github.com/parallel-web/parallel-sdk-python/commit/b9abf3c8b0e22b260149f01b1ef608924eefe735))
|
|
28
|
+
* **api:** update via SDK Studio ([4326698](https://github.com/parallel-web/parallel-sdk-python/commit/43266988c2123fa1aff00bf0b62c355b0c2bf04e))
|
|
29
|
+
* clean up environment call outs ([3a102e9](https://github.com/parallel-web/parallel-sdk-python/commit/3a102e9a05476e4d28c0ac386cd156cc0fe8b5cf))
|
|
30
|
+
* **client:** add support for aiohttp ([4e2aa32](https://github.com/parallel-web/parallel-sdk-python/commit/4e2aa32ad8242745f56e5a8b810d33c362967dad))
|
|
31
|
+
* **client:** support file upload requests ([ec0c2cf](https://github.com/parallel-web/parallel-sdk-python/commit/ec0c2cf30bd24524567232ad0f661facda124203))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
|
|
36
|
+
* add types for backwards compatibility ([c975302](https://github.com/parallel-web/parallel-sdk-python/commit/c975302c0d61d1d6731ccaeb7977c2009cb0b666))
|
|
37
|
+
* avoid newer type syntax ([2ea196d](https://github.com/parallel-web/parallel-sdk-python/commit/2ea196d5d4c7881e61dc848a1387770b4e27e304))
|
|
38
|
+
* **ci:** correct conditional ([99d37f6](https://github.com/parallel-web/parallel-sdk-python/commit/99d37f657a249987ccae60dd0e62f296ab0c1d85))
|
|
39
|
+
* **ci:** release-doctor — report correct token name ([310076b](https://github.com/parallel-web/parallel-sdk-python/commit/310076b2f8a75ed29ba2a1fae0f6e840ec43bb5b))
|
|
40
|
+
* **client:** don't send Content-Type header on GET requests ([f103b4a](https://github.com/parallel-web/parallel-sdk-python/commit/f103b4a72fc25f6a8dd1bda0c8d040aba1f527d1))
|
|
41
|
+
* **parsing:** correctly handle nested discriminated unions ([c9a2300](https://github.com/parallel-web/parallel-sdk-python/commit/c9a23002be2d78a11b5c1b7c901f4ddb32663393))
|
|
42
|
+
* **parsing:** ignore empty metadata ([ab434aa](https://github.com/parallel-web/parallel-sdk-python/commit/ab434aa7bd088fc16279255ae36138ab6dff0730))
|
|
43
|
+
* **parsing:** parse extra field types ([85f5cd4](https://github.com/parallel-web/parallel-sdk-python/commit/85f5cd4191ae168ed443e78a2c7bd747d51404b3))
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
### Chores
|
|
47
|
+
|
|
48
|
+
* **ci:** change upload type ([40dbd3b](https://github.com/parallel-web/parallel-sdk-python/commit/40dbd3b7d5becf0fe54b62a4acd8696957380053))
|
|
49
|
+
* **ci:** only run for pushes and fork pull requests ([d55fbea](https://github.com/parallel-web/parallel-sdk-python/commit/d55fbea54037d2d833ecc281cbddbc8d6700d24d))
|
|
50
|
+
* **internal:** add Sequence related utils ([cb9a7a9](https://github.com/parallel-web/parallel-sdk-python/commit/cb9a7a905ca4a4a9ba35e540f6c47a8bf89c87d2))
|
|
51
|
+
* **internal:** bump pinned h11 dep ([818f1dd](https://github.com/parallel-web/parallel-sdk-python/commit/818f1ddb3ba1be6bfdb9aee1322d6a3d8a98667a))
|
|
52
|
+
* **internal:** change ci workflow machines ([a90da34](https://github.com/parallel-web/parallel-sdk-python/commit/a90da34910585453eac918a5f273749c00d2f743))
|
|
53
|
+
* **internal:** codegen related update ([47ea68b](https://github.com/parallel-web/parallel-sdk-python/commit/47ea68bd44ad52ac1c18e7215c013f408914890c))
|
|
54
|
+
* **internal:** fix ruff target version ([4e5dbda](https://github.com/parallel-web/parallel-sdk-python/commit/4e5dbda03907f45ac31d18d89714e86f26e79866))
|
|
55
|
+
* **internal:** update comment in script ([631b045](https://github.com/parallel-web/parallel-sdk-python/commit/631b045ae2f138e4c8098fafd9466451d61ca82a))
|
|
56
|
+
* **internal:** update pyright exclude list ([8d2fb29](https://github.com/parallel-web/parallel-sdk-python/commit/8d2fb29b5d80a2fa9ee81a6f9510134fb7bab908))
|
|
57
|
+
* **internal:** version bump ([90d26a5](https://github.com/parallel-web/parallel-sdk-python/commit/90d26a5e8db8bd6a27f9bbc96595da87bd7ea0f3))
|
|
58
|
+
* **package:** mark python 3.13 as supported ([6fa54c4](https://github.com/parallel-web/parallel-sdk-python/commit/6fa54c42a17f5e731f5e97214f0212a0828d3cb8))
|
|
59
|
+
* **project:** add settings file for vscode ([acdeda2](https://github.com/parallel-web/parallel-sdk-python/commit/acdeda2f1f95f5bade2da52d5a2aa8560e71369d))
|
|
60
|
+
* **readme:** fix version rendering on pypi ([2bf10b0](https://github.com/parallel-web/parallel-sdk-python/commit/2bf10b073ab7e015b08c106d265a9091752df51a))
|
|
61
|
+
* **readme:** Remove references to methods, update FAQ for beta ([cefefbf](https://github.com/parallel-web/parallel-sdk-python/commit/cefefbfccba78fdabcc925728836d70400d4e5aa))
|
|
62
|
+
* **tests:** skip some failing tests on the latest python versions ([13b1533](https://github.com/parallel-web/parallel-sdk-python/commit/13b153381e9b7c998a7ebef878518222678dfa83))
|
|
63
|
+
* update @stainless-api/prism-cli to v5.15.0 ([56b5aab](https://github.com/parallel-web/parallel-sdk-python/commit/56b5aab87a833c27b8e1a2bc7c4bf2169ee281a8))
|
|
64
|
+
* update github action ([3d90e19](https://github.com/parallel-web/parallel-sdk-python/commit/3d90e196184e540242fb310cc55b0219d20dff45))
|
|
65
|
+
|
|
66
|
+
## 0.1.3 (2025-08-09)
|
|
67
|
+
|
|
68
|
+
Full Changelog: [v0.1.2...v0.1.3](https://github.com/parallel-web/parallel-sdk-python/compare/v0.1.2...v0.1.3)
|
|
69
|
+
|
|
70
|
+
### Chores
|
|
71
|
+
|
|
72
|
+
* **readme:** update descriptions ([3212a0f](https://github.com/parallel-web/parallel-sdk-python/commit/3212a0fc32d744e7df3d0dcedf527b176a73a91b))
|
|
73
|
+
|
|
74
|
+
## 0.1.2 (2025-06-25)
|
|
75
|
+
|
|
76
|
+
Full Changelog: [v0.1.1...v0.1.2](https://github.com/parallel-web/parallel-sdk-python/compare/v0.1.1...v0.1.2)
|
|
77
|
+
|
|
78
|
+
### Features
|
|
79
|
+
|
|
80
|
+
* **api:** add execute method and structured output support ([5e51379](https://github.com/parallel-web/parallel-sdk-python/commit/5e51379e3ff28bdf70a3cc9167d4413bf3e8690c))
|
|
81
|
+
* **api:** update via SDK Studio ([7526908](https://github.com/parallel-web/parallel-sdk-python/commit/752690867c75ee970582fabc05c939a2f619cb3f))
|
|
82
|
+
* **api:** update via SDK Studio ([6698e71](https://github.com/parallel-web/parallel-sdk-python/commit/6698e716bdddcf2146cc802cfaaa26f7ddb4d3dc))
|
|
83
|
+
* **client:** add follow_redirects request option ([deff733](https://github.com/parallel-web/parallel-sdk-python/commit/deff733f189070bb471ebd6cbf92dfd61d19734a))
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
### Bug Fixes
|
|
87
|
+
|
|
88
|
+
* **api:** handle retryable errors ([#2](https://github.com/parallel-web/parallel-sdk-python/issues/2)) ([5317550](https://github.com/parallel-web/parallel-sdk-python/commit/531755070eb4b798a7f0b51153414425a0c293b0))
|
|
89
|
+
* **client:** correctly parse binary response | stream ([9546f27](https://github.com/parallel-web/parallel-sdk-python/commit/9546f276ca2d63cf3c6a9b0eef23f1eed35758fa))
|
|
90
|
+
* **package:** support direct resource imports ([52fe297](https://github.com/parallel-web/parallel-sdk-python/commit/52fe297a34a6a2a473be0f124e2febab1df527fe))
|
|
91
|
+
* **pydantic:** add fields to json schema, better error messages ([38a2ddc](https://github.com/parallel-web/parallel-sdk-python/commit/38a2ddc348ac7acf11f9f75f69900b628e539c1d))
|
|
92
|
+
* **tests:** fix: tests which call HTTP endpoints directly with the example parameters ([bfad009](https://github.com/parallel-web/parallel-sdk-python/commit/bfad009314f4f3ce31265d2be07f091eb7db664a))
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
### Chores
|
|
96
|
+
|
|
97
|
+
* **ci:** enable for pull requests ([0ae47ea](https://github.com/parallel-web/parallel-sdk-python/commit/0ae47eaf080510a886eb40aed7c8189faa940f2c))
|
|
98
|
+
* **ci:** fix installation instructions ([150a642](https://github.com/parallel-web/parallel-sdk-python/commit/150a6429ee584a0c32160be88d9bdcd4eeab4579))
|
|
99
|
+
* **ci:** upload sdks to package manager ([3bd8b36](https://github.com/parallel-web/parallel-sdk-python/commit/3bd8b361b84bad87c0943c2fe71465c92cdea599))
|
|
100
|
+
* **docs:** grammar improvements ([c5b636b](https://github.com/parallel-web/parallel-sdk-python/commit/c5b636bfeb60b02f84f5b9e93687359cd9c5c251))
|
|
101
|
+
* **docs:** remove reference to rye shell ([a64869e](https://github.com/parallel-web/parallel-sdk-python/commit/a64869e70e9c493f2dc3e8618327f28544d36058))
|
|
102
|
+
* **docs:** remove unnecessary param examples ([e15712a](https://github.com/parallel-web/parallel-sdk-python/commit/e15712a074ba66a6b0d225bb3a6979a767c15225))
|
|
103
|
+
* **internal:** avoid errors for isinstance checks on proxies ([4149fb9](https://github.com/parallel-web/parallel-sdk-python/commit/4149fb963b39db2211f404f94bf7b55a57c2556b))
|
|
104
|
+
* **internal:** codegen related update ([6a0bb66](https://github.com/parallel-web/parallel-sdk-python/commit/6a0bb662f5011bbea13f75334eb55c5144b50e8b))
|
|
105
|
+
* **internal:** update conftest.py ([0e08356](https://github.com/parallel-web/parallel-sdk-python/commit/0e0835661e91993042605131065729d006761a5a))
|
|
106
|
+
* **readme:** update badges ([36c14b5](https://github.com/parallel-web/parallel-sdk-python/commit/36c14b529ec8611508b6b7cc9065c67e59e5ecdc))
|
|
107
|
+
* **readme:** update low level api examples ([f17e34e](https://github.com/parallel-web/parallel-sdk-python/commit/f17e34e0e0a6d3205c344c278f1643826938e9d1))
|
|
108
|
+
* **tests:** add tests for httpx client instantiation & proxies ([d84ffff](https://github.com/parallel-web/parallel-sdk-python/commit/d84ffff48a814edc81ef62249353053df6398c90))
|
|
109
|
+
* **tests:** run tests in parallel ([62252c6](https://github.com/parallel-web/parallel-sdk-python/commit/62252c6f1098ad138978b6efa1fc2a9c22961040))
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
### Documentation
|
|
113
|
+
|
|
114
|
+
* **client:** fix httpx.Timeout documentation reference ([17f87ee](https://github.com/parallel-web/parallel-sdk-python/commit/17f87eef5af2b06b3791f9218b7ab4f9098faf9c))
|
|
115
|
+
|
|
116
|
+
## 0.1.1 (2025-04-25)
|
|
117
|
+
|
|
118
|
+
Full Changelog: [v0.1.0...v0.1.1](https://github.com/shapleyai/parallel-sdk-python/compare/v0.1.0...v0.1.1)
|
|
119
|
+
|
|
120
|
+
### Features
|
|
121
|
+
|
|
122
|
+
* **api:** update via SDK Studio ([4cc79c4](https://github.com/shapleyai/parallel-sdk-python/commit/4cc79c4d1edaa9d1d080b81830961252c8b327c1))
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
### Bug Fixes
|
|
126
|
+
|
|
127
|
+
* **pydantic:** add fields to json schema, better error messages ([38a2ddc](https://github.com/shapleyai/parallel-sdk-python/commit/38a2ddc348ac7acf11f9f75f69900b628e539c1d))
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
### Chores
|
|
131
|
+
|
|
132
|
+
* **readme:** update low level api examples ([f17e34e](https://github.com/shapleyai/parallel-sdk-python/commit/f17e34e0e0a6d3205c344c278f1643826938e9d1))
|
|
133
|
+
|
|
134
|
+
## 0.1.0 (2025-04-24)
|
|
135
|
+
|
|
136
|
+
Full Changelog: [v0.0.1-alpha.0...v0.1.0](https://github.com/shapleyai/parallel-sdk-python/compare/v0.0.1-alpha.0...v0.1.0)
|
|
137
|
+
|
|
138
|
+
### Features
|
|
139
|
+
|
|
140
|
+
* **api:** add execute method and structured output support ([5e51379](https://github.com/shapleyai/parallel-sdk-python/commit/5e51379e3ff28bdf70a3cc9167d4413bf3e8690c))
|
|
141
|
+
* **api:** update via SDK Studio ([c393d04](https://github.com/shapleyai/parallel-sdk-python/commit/c393d048bddb554c37eb750ca57c4335243a70ed))
|
|
142
|
+
* **api:** update via SDK Studio ([6698e71](https://github.com/shapleyai/parallel-sdk-python/commit/6698e716bdddcf2146cc802cfaaa26f7ddb4d3dc))
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
### Chores
|
|
146
|
+
|
|
147
|
+
* go live ([061677a](https://github.com/shapleyai/parallel-sdk-python/commit/061677a22549f3dd3d9f4591c9ccfdf71209c12e))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: parallel-web
|
|
3
|
-
Version: 0.1
|
|
3
|
+
Version: 0.2.1
|
|
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
|
|
@@ -18,6 +18,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
22
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
23
|
Classifier: Typing :: Typed
|
|
23
24
|
Requires-Python: >=3.8
|
|
@@ -27,11 +28,15 @@ Requires-Dist: httpx<1,>=0.23.0
|
|
|
27
28
|
Requires-Dist: pydantic<3,>=1.9.0
|
|
28
29
|
Requires-Dist: sniffio
|
|
29
30
|
Requires-Dist: typing-extensions<5,>=4.10
|
|
31
|
+
Provides-Extra: aiohttp
|
|
32
|
+
Requires-Dist: aiohttp; extra == 'aiohttp'
|
|
33
|
+
Requires-Dist: httpx-aiohttp>=0.1.8; extra == 'aiohttp'
|
|
30
34
|
Description-Content-Type: text/markdown
|
|
31
35
|
|
|
32
36
|
# Parallel Python API library
|
|
33
37
|
|
|
34
|
-
|
|
38
|
+
<!-- prettier-ignore -->
|
|
39
|
+
[)](https://pypi.org/project/parallel-web/)
|
|
35
40
|
|
|
36
41
|
The Parallel Python library provides convenient access to the Parallel REST API from any Python 3.8+
|
|
37
42
|
application. The library includes type definitions for all request params and response fields,
|
|
@@ -64,12 +69,12 @@ client = Parallel(
|
|
|
64
69
|
api_key=os.environ.get("PARALLEL_API_KEY"), # This is the default and can be omitted
|
|
65
70
|
)
|
|
66
71
|
|
|
67
|
-
|
|
72
|
+
task_run = client.task_run.create(
|
|
68
73
|
input="France (2023)",
|
|
69
74
|
processor="core",
|
|
70
|
-
output="GDP"
|
|
71
75
|
)
|
|
72
|
-
|
|
76
|
+
task_run_result = client.task_run.result(run_id=task_run.run_id)
|
|
77
|
+
print(task_run_result.output)
|
|
73
78
|
```
|
|
74
79
|
|
|
75
80
|
While you can provide an `api_key` keyword argument,
|
|
@@ -97,12 +102,9 @@ client = AsyncParallel(
|
|
|
97
102
|
|
|
98
103
|
|
|
99
104
|
async def main() -> None:
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
output="GDP"
|
|
104
|
-
)
|
|
105
|
-
print(run_result.output.parsed)
|
|
105
|
+
task_run = await client.task_run.create(input="France (2023)", processor="core")
|
|
106
|
+
run_result = await client.task_run.result(run_id=task_run.run_id)
|
|
107
|
+
print(run_result.output.content)
|
|
106
108
|
|
|
107
109
|
|
|
108
110
|
if __name__ == "__main__":
|
|
@@ -114,128 +116,6 @@ using the asynchronous client, especially for executing multiple Task Runs concu
|
|
|
114
116
|
Functionality between the synchronous and asynchronous clients is identical, including
|
|
115
117
|
the convenience methods.
|
|
116
118
|
|
|
117
|
-
## Convenience methods
|
|
118
|
-
|
|
119
|
-
### Execute
|
|
120
|
-
|
|
121
|
-
The `execute` method provides a single call that combines creating a task run,
|
|
122
|
-
polling until completion, and parsing structured outputs (if specified).
|
|
123
|
-
|
|
124
|
-
If an output type that inherits from `BaseModel` is
|
|
125
|
-
specified in the call to `.execute()`, the response content will be parsed into an
|
|
126
|
-
instance of the provided output type. The parsed output can be accessed via the
|
|
127
|
-
`parsed` property on the output field of the response.
|
|
128
|
-
|
|
129
|
-
```python
|
|
130
|
-
import os
|
|
131
|
-
import asyncio
|
|
132
|
-
from parallel import AsyncParallel
|
|
133
|
-
from pydantic import BaseModel
|
|
134
|
-
|
|
135
|
-
client = AsyncParallel()
|
|
136
|
-
|
|
137
|
-
class SampleOutputStructure(BaseModel):
|
|
138
|
-
output: str
|
|
139
|
-
|
|
140
|
-
async def main() -> None:
|
|
141
|
-
# with pydantic
|
|
142
|
-
run_result = await client.task_run.execute(
|
|
143
|
-
input="France (2023)",
|
|
144
|
-
processor="core",
|
|
145
|
-
output=SampleOutputStructure,
|
|
146
|
-
)
|
|
147
|
-
# parsed output of type SampleOutputStructure
|
|
148
|
-
print(run_result.output.parsed)
|
|
149
|
-
# without pydantic
|
|
150
|
-
run_result = await client.task_run.execute(
|
|
151
|
-
input="France (2023)",
|
|
152
|
-
processor="core",
|
|
153
|
-
output="GDP"
|
|
154
|
-
)
|
|
155
|
-
print(run_result.output.parsed)
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
if __name__ == "__main__":
|
|
159
|
-
asyncio.run(main())
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
The async client lets you create multiple task runs without blocking.
|
|
163
|
-
To submit several at once, call `execute()` and gather the results at the end.
|
|
164
|
-
|
|
165
|
-
```python
|
|
166
|
-
import asyncio
|
|
167
|
-
import os
|
|
168
|
-
|
|
169
|
-
from parallel import AsyncParallel
|
|
170
|
-
from pydantic import BaseModel, Field
|
|
171
|
-
from typing import List
|
|
172
|
-
|
|
173
|
-
class CountryInput(BaseModel):
|
|
174
|
-
country: str = Field(
|
|
175
|
-
description="Name of the country to research. Must be a recognized "
|
|
176
|
-
"sovereign nation (e.g., 'France', 'Japan')."
|
|
177
|
-
)
|
|
178
|
-
year: int = Field(
|
|
179
|
-
description="Year for which to retrieve data. Must be 2000 or later. "
|
|
180
|
-
"Use most recent full-year estimates if year is current."
|
|
181
|
-
)
|
|
182
|
-
|
|
183
|
-
class CountryOutput(BaseModel):
|
|
184
|
-
gdp: str = Field(
|
|
185
|
-
description="GDP in USD for the year, formatted like '$3.1 trillion (2023)'."
|
|
186
|
-
)
|
|
187
|
-
top_exports: List[str] = Field(
|
|
188
|
-
description="Top 3 exported goods/services by value. Use credible sources."
|
|
189
|
-
)
|
|
190
|
-
top_imports: List[str] = Field(
|
|
191
|
-
description="Top 3 imported goods/services by value. Use credible sources."
|
|
192
|
-
)
|
|
193
|
-
|
|
194
|
-
async def main():
|
|
195
|
-
# Initialize the Parallel client
|
|
196
|
-
client = AsyncParallel(api_key=os.environ.get("PARALLEL_API_KEY"))
|
|
197
|
-
|
|
198
|
-
# Prepare structured input
|
|
199
|
-
input_data = [
|
|
200
|
-
CountryInput(country="France", year=2023),
|
|
201
|
-
CountryInput(country="Germany", year=2023),
|
|
202
|
-
CountryInput(country="Italy", year=2023)
|
|
203
|
-
]
|
|
204
|
-
|
|
205
|
-
run_results = await asyncio.gather(*[
|
|
206
|
-
client.task_run.execute(
|
|
207
|
-
input=datum,
|
|
208
|
-
output=CountryOutput,
|
|
209
|
-
processor="core"
|
|
210
|
-
)
|
|
211
|
-
for datum in input_data
|
|
212
|
-
])
|
|
213
|
-
|
|
214
|
-
for run_input, run_result in zip(input_data, run_results):
|
|
215
|
-
print(f"Task run output for {run_input}: {run_result.output.parsed}")
|
|
216
|
-
|
|
217
|
-
if __name__ == "__main__":
|
|
218
|
-
asyncio.run(main())
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
#### `execute()` vs `create()`
|
|
222
|
-
|
|
223
|
-
The `execute` and `create` methods differ slightly in their signatures and
|
|
224
|
-
behavior — `create` requires a Task Spec object that contains the output schema,
|
|
225
|
-
while `execute` accepts an output schema as a top‑level parameter. `execute` is
|
|
226
|
-
also a one‑shot method that combines creation, polling, and parsing for you.
|
|
227
|
-
|
|
228
|
-
Use `create` when you want a run ID immediately and prefer to control polling
|
|
229
|
-
yourself. `execute` is best for one‑shot task execution and for typed inputs and
|
|
230
|
-
outputs — note that no outputs are available until the call finishes. Finally, for
|
|
231
|
-
the output of `execute`, parsed content is available via `run_result.output.parsed`.
|
|
232
|
-
|
|
233
|
-
Both `execute` and `create` validate inputs when appropriate input types are
|
|
234
|
-
provided. For `execute`, validation happens when a pydantic input is provided. For
|
|
235
|
-
`create`, validation occurs when the input schema is specified inside the task spec
|
|
236
|
-
parameter. Additionally, in both calls, the un-parsed result content is accessible via
|
|
237
|
-
the `run_result.output.content`.
|
|
238
|
-
|
|
239
119
|
## Frequently Asked Questions
|
|
240
120
|
|
|
241
121
|
**Does the Task API accept prompts or objectives?**
|
|
@@ -246,9 +126,8 @@ more information, check [our docs](https://docs.parallel.ai/task-api/core-concep
|
|
|
246
126
|
|
|
247
127
|
**Can I access beta parameters or endpoints via the SDK?**
|
|
248
128
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
[low level APIs](https://github.com/parallel-web/parallel-sdk-python/tree/main/#lowlevel-api-access).
|
|
129
|
+
Yes, the SDK supports both beta endpoints and beta header parameters for the Task API.
|
|
130
|
+
All beta parameters are accessible via the `client.beta` namespace in the SDK.
|
|
252
131
|
|
|
253
132
|
**Can I specify a timeout for API calls?**
|
|
254
133
|
|
|
@@ -334,11 +213,7 @@ from parallel import Parallel
|
|
|
334
213
|
client = Parallel()
|
|
335
214
|
|
|
336
215
|
try:
|
|
337
|
-
client.task_run.
|
|
338
|
-
input="France (2023)",
|
|
339
|
-
processor="core",
|
|
340
|
-
output="GDP"
|
|
341
|
-
)
|
|
216
|
+
client.task_run.create(input="France (2023)", processor="core")
|
|
342
217
|
except parallel.APIConnectionError as e:
|
|
343
218
|
print("The server could not be reached")
|
|
344
219
|
print(e.__cause__) # an underlying Exception, likely raised within httpx.
|
|
@@ -381,11 +256,7 @@ client = Parallel(
|
|
|
381
256
|
)
|
|
382
257
|
|
|
383
258
|
# Or, configure per-request:
|
|
384
|
-
client.with_options(max_retries=5).task_run.
|
|
385
|
-
input="France (2023)",
|
|
386
|
-
processor="core",
|
|
387
|
-
output="GDP"
|
|
388
|
-
)
|
|
259
|
+
client.with_options(max_retries=5).task_run.create(input="France (2023)", processor="core")
|
|
389
260
|
```
|
|
390
261
|
|
|
391
262
|
### Timeouts
|
|
@@ -408,11 +279,7 @@ client = Parallel(
|
|
|
408
279
|
)
|
|
409
280
|
|
|
410
281
|
# Override per-request:
|
|
411
|
-
client.with_options(timeout=5.0).task_run.
|
|
412
|
-
input="France (2023)",
|
|
413
|
-
processor="core",
|
|
414
|
-
output="GDP"
|
|
415
|
-
)
|
|
282
|
+
client.with_options(timeout=5.0).task_run.create(input="France (2023)", processor="core")
|
|
416
283
|
```
|
|
417
284
|
|
|
418
285
|
On timeout, an `APITimeoutError` is thrown.
|
|
@@ -453,15 +320,14 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
|
|
|
453
320
|
from parallel import Parallel
|
|
454
321
|
|
|
455
322
|
client = Parallel()
|
|
456
|
-
response = client.task_run.with_raw_response.
|
|
323
|
+
response = client.task_run.with_raw_response.create(
|
|
457
324
|
input="France (2023)",
|
|
458
325
|
processor="core",
|
|
459
|
-
output="GDP"
|
|
460
326
|
)
|
|
461
327
|
print(response.headers.get('X-My-Header'))
|
|
462
328
|
|
|
463
|
-
task_run = response.parse()
|
|
464
|
-
print(task_run.
|
|
329
|
+
task_run = response.parse()
|
|
330
|
+
print(task_run.run_id)
|
|
465
331
|
```
|
|
466
332
|
|
|
467
333
|
These methods return an [`APIResponse`](https://github.com/parallel-web/parallel-sdk-python/tree/main/src/parallel/_response.py) object.
|
|
@@ -475,10 +341,8 @@ The above interface eagerly reads the full response body when you make the reque
|
|
|
475
341
|
To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
|
|
476
342
|
|
|
477
343
|
```python
|
|
478
|
-
with client.task_run.with_streaming_response.
|
|
479
|
-
input="France (2023)",
|
|
480
|
-
processor="core",
|
|
481
|
-
output="GDP"
|
|
344
|
+
with client.task_run.with_streaming_response.create(
|
|
345
|
+
input="France (2023)", processor="core"
|
|
482
346
|
) as response:
|
|
483
347
|
print(response.headers.get("X-My-Header"))
|
|
484
348
|
|