parallel-web 0.6.0__tar.gz → 1.0.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.
- parallel_web-1.0.1/.release-please-manifest.json +3 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/CHANGELOG.md +36 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/PKG-INFO +69 -90
- {parallel_web-0.6.0 → parallel_web-1.0.1}/README.md +68 -89
- {parallel_web-0.6.0 → parallel_web-1.0.1}/api.md +7 -5
- {parallel_web-0.6.0 → parallel_web-1.0.1}/pyproject.toml +1 -6
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/_files.py +1 -1
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/_models.py +80 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/_version.py +1 -1
- parallel_web-1.0.1/src/parallel/resources/beta/__init__.py +33 -0
- parallel_web-1.0.1/src/parallel/resources/beta/api.md +41 -0
- parallel_web-1.0.1/src/parallel/resources/beta/beta.py +120 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/resources/beta/findall.py +126 -154
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/advanced_extract_settings_param.py +0 -6
- parallel_web-1.0.1/src/parallel/types/beta/__init__.py +25 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/beta/findall_candidate_match_status_event.py +1 -9
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/beta/findall_create_params.py +1 -9
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/beta/findall_enrich_input.py +1 -5
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/beta/findall_enrich_params.py +1 -5
- parallel_web-0.6.0/src/parallel/types/beta/findall_candidates_params.py → parallel_web-1.0.1/src/parallel/types/beta/findall_entity_search_params.py +4 -4
- parallel_web-1.0.1/src/parallel/types/beta/findall_entity_search_response.py +26 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/beta/findall_events_params.py +1 -5
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/beta/findall_events_response.py +1 -4
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/beta/findall_extend_params.py +1 -5
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/beta/findall_ingest_params.py +1 -5
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/beta/findall_run.py +1 -13
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/beta/findall_run_result.py +1 -9
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/beta/findall_run_status_event.py +1 -5
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/beta/findall_schema.py +1 -5
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/beta/findall_schema_updated_event.py +1 -5
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/excerpt_settings_param.py +1 -1
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/parsed_task_run_result.py +0 -7
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/run_input.py +0 -5
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/run_input_param.py +0 -5
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/task_run_create_params.py +0 -5
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/task_run_events_response.py +0 -7
- parallel_web-1.0.1/src/parallel/types/task_run_result.py +27 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/task_spec_param.py +2 -2
- {parallel_web-0.6.0 → parallel_web-1.0.1}/tests/api_resources/beta/test_findall.py +87 -87
- {parallel_web-0.6.0 → parallel_web-1.0.1}/tests/test_models.py +57 -3
- parallel_web-0.6.0/.release-please-manifest.json +0 -3
- parallel_web-0.6.0/src/parallel/resources/beta/__init__.py +0 -73
- parallel_web-0.6.0/src/parallel/resources/beta/api.md +0 -107
- parallel_web-0.6.0/src/parallel/resources/beta/beta.py +0 -743
- parallel_web-0.6.0/src/parallel/resources/beta/task_group.py +0 -744
- parallel_web-0.6.0/src/parallel/resources/beta/task_run.py +0 -596
- parallel_web-0.6.0/src/parallel/types/beta/__init__.py +0 -86
- parallel_web-0.6.0/src/parallel/types/beta/beta_extract_params.py +0 -68
- parallel_web-0.6.0/src/parallel/types/beta/beta_run_input.py +0 -8
- parallel_web-0.6.0/src/parallel/types/beta/beta_run_input_param.py +0 -7
- parallel_web-0.6.0/src/parallel/types/beta/beta_search_params.py +0 -82
- parallel_web-0.6.0/src/parallel/types/beta/beta_task_run_result.py +0 -31
- parallel_web-0.6.0/src/parallel/types/beta/error_event.py +0 -8
- parallel_web-0.6.0/src/parallel/types/beta/excerpt_settings_param.py +0 -27
- parallel_web-0.6.0/src/parallel/types/beta/extract_error.py +0 -7
- parallel_web-0.6.0/src/parallel/types/beta/extract_response.py +0 -30
- parallel_web-0.6.0/src/parallel/types/beta/extract_result.py +0 -26
- parallel_web-0.6.0/src/parallel/types/beta/fetch_policy_param.py +0 -7
- parallel_web-0.6.0/src/parallel/types/beta/findall_candidates_response.py +0 -29
- parallel_web-0.6.0/src/parallel/types/beta/full_content_settings_param.py +0 -7
- parallel_web-0.6.0/src/parallel/types/beta/mcp_server.py +0 -8
- parallel_web-0.6.0/src/parallel/types/beta/mcp_server_param.py +0 -7
- parallel_web-0.6.0/src/parallel/types/beta/mcp_tool_call.py +0 -8
- parallel_web-0.6.0/src/parallel/types/beta/search_result.py +0 -26
- parallel_web-0.6.0/src/parallel/types/beta/task_group.py +0 -14
- parallel_web-0.6.0/src/parallel/types/beta/task_group_add_runs_params.py +0 -36
- parallel_web-0.6.0/src/parallel/types/beta/task_group_events_params.py +0 -16
- parallel_web-0.6.0/src/parallel/types/beta/task_group_events_response.py +0 -15
- parallel_web-0.6.0/src/parallel/types/beta/task_group_get_runs_response.py +0 -12
- parallel_web-0.6.0/src/parallel/types/beta/task_group_run_response.py +0 -7
- parallel_web-0.6.0/src/parallel/types/beta/task_group_status.py +0 -7
- parallel_web-0.6.0/src/parallel/types/beta/task_group_status_event.py +0 -7
- parallel_web-0.6.0/src/parallel/types/beta/task_run_create_params.py +0 -76
- parallel_web-0.6.0/src/parallel/types/beta/task_run_event.py +0 -11
- parallel_web-0.6.0/src/parallel/types/beta/task_run_events_response.py +0 -24
- parallel_web-0.6.0/src/parallel/types/beta/task_run_result_params.py +0 -18
- parallel_web-0.6.0/src/parallel/types/beta/usage_item.py +0 -7
- parallel_web-0.6.0/src/parallel/types/beta/web_search_result.py +0 -23
- parallel_web-0.6.0/src/parallel/types/beta/webhook.py +0 -8
- parallel_web-0.6.0/src/parallel/types/beta/webhook_param.py +0 -7
- parallel_web-0.6.0/src/parallel/types/task_group_create_params.py +0 -13
- parallel_web-0.6.0/src/parallel/types/task_group_get_runs_params.py +0 -18
- parallel_web-0.6.0/src/parallel/types/task_run_result.py +0 -53
- parallel_web-0.6.0/tests/api_resources/beta/test_task_group.py +0 -665
- parallel_web-0.6.0/tests/api_resources/beta/test_task_run.py +0 -385
- parallel_web-0.6.0/tests/api_resources/test_beta.py +0 -261
- {parallel_web-0.6.0 → parallel_web-1.0.1}/.gitignore +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/CONTRIBUTING.md +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/LICENSE +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/SECURITY.md +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/bin/check-release-environment +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/bin/publish-pypi +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/examples/.keep +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/noxfile.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/release-please-config.json +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/requirements-dev.lock +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/requirements.lock +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/__init__.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/_base_client.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/_client.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/_compat.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/_constants.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/_exceptions.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/_qs.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/_resource.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/_response.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/_streaming.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/_types.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/_utils/__init__.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/_utils/_compat.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/_utils/_datetime_parse.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/_utils/_json.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/_utils/_logs.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/_utils/_path.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/_utils/_proxy.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/_utils/_reflection.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/_utils/_resources_proxy.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/_utils/_streams.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/_utils/_sync.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/_utils/_transform.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/_utils/_typing.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/_utils/_utils.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/lib/.keep +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/lib/__init__.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/lib/_parsing/__init__.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/lib/_parsing/_task_run_result.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/lib/_parsing/_task_spec.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/lib/_pydantic.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/lib/_time.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/py.typed +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/resources/__init__.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/resources/monitor.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/resources/task_group.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/resources/task_run.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/__init__.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/advanced_monitor_settings.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/advanced_monitor_settings_param.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/advanced_search_settings_param.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/auto_schema.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/auto_schema_param.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/beta/findall_candidate.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/beta/findall_candidate_metrics.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/beta/findall_run_status.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/beta/match_condition.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/beta/match_condition_param.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/beta/parallel_beta_param.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/citation.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/client_extract_params.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/client_search_params.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/error_event.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/extract_error.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/extract_response.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/extract_result.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/fetch_policy_param.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/field_basis.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/full_content_settings_param.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/json_schema.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/json_schema_param.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/mcp_server.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/mcp_server_param.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/mcp_tool_call.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/monitor.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/monitor_completion_event.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/monitor_create_params.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/monitor_error_event.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/monitor_event_stream_event.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/monitor_event_stream_response_settings.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/monitor_event_stream_settings_param.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/monitor_events_params.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/monitor_list_params.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/monitor_snapshot_event.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/monitor_snapshot_output.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/monitor_snapshot_response_settings.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/monitor_snapshot_settings_param.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/monitor_update_params.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/monitor_webhook.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/monitor_webhook_param.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/paginated_monitor_events.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/paginated_monitor_response.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/search_result.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/shared/__init__.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/shared/error_object.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/shared/error_response.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/shared/source_policy.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/shared/warning.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/shared_params/__init__.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/shared_params/source_policy.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/task_advanced_settings.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/task_advanced_settings_param.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/task_group.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/task_group_add_runs_params.py +0 -0
- {parallel_web-0.6.0/src/parallel/types/beta → parallel_web-1.0.1/src/parallel/types}/task_group_create_params.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/task_group_events_params.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/task_group_events_response.py +0 -0
- {parallel_web-0.6.0/src/parallel/types/beta → parallel_web-1.0.1/src/parallel/types}/task_group_get_runs_params.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/task_group_get_runs_response.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/task_group_run_response.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/task_group_status.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/task_group_status_event.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/task_run.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/task_run_event.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/task_run_json_output.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/task_run_progress_message_event.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/task_run_progress_stats_event.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/task_run_result_params.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/task_run_source_stats.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/task_run_text_output.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/task_spec.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/text_schema.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/text_schema_param.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/update_monitor_event_stream_settings_param.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/usage_item.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/web_search_result.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/webhook.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/src/parallel/types/webhook_param.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/tests/__init__.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/tests/api_resources/__init__.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/tests/api_resources/beta/__init__.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/tests/api_resources/test_client.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/tests/api_resources/test_monitor.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/tests/api_resources/test_task_group.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/tests/api_resources/test_task_run.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/tests/conftest.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/tests/sample_file.txt +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/tests/test_client.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/tests/test_extract_files.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/tests/test_files.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/tests/test_qs.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/tests/test_required_args.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/tests/test_response.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/tests/test_streaming.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/tests/test_transform.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/tests/test_utils/test_datetime_parse.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/tests/test_utils/test_json.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/tests/test_utils/test_path.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/tests/test_utils/test_proxy.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/tests/test_utils/test_typing.py +0 -0
- {parallel_web-0.6.0 → parallel_web-1.0.1}/tests/utils.py +0 -0
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.1 (2026-06-03)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.0.0...v1.0.1](https://github.com/parallel-web/parallel-sdk-python/compare/v1.0.0...v1.0.1)
|
|
6
|
+
|
|
7
|
+
### Chores
|
|
8
|
+
|
|
9
|
+
* remove undocumented backwards-compat alias shims ([e5a2ad8](https://github.com/parallel-web/parallel-sdk-python/commit/e5a2ad80cdd6e4f708c3ec05c9df8b8ede79a772))
|
|
10
|
+
* **types:** drop redundant NotRequired on task_spec input_schema ([b356c22](https://github.com/parallel-web/parallel-sdk-python/commit/b356c22e718ab1a95a40b6b37917a5b8bcbb091a))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Documentation
|
|
14
|
+
|
|
15
|
+
* regenerate api.md from spec (drop hand-maintained patch) ([05d2897](https://github.com/parallel-web/parallel-sdk-python/commit/05d28970ff8b3efc77b1c4ef60beecc654a52385))
|
|
16
|
+
* regenerate README from spec (drop hand-maintained patch) ([c7ed169](https://github.com/parallel-web/parallel-sdk-python/commit/c7ed169c66a60485b309147fb7aa1b6d2e551766))
|
|
17
|
+
|
|
18
|
+
## 1.0.0 (2026-06-02)
|
|
19
|
+
|
|
20
|
+
Full Changelog: [v0.6.0...v1.0.0](https://github.com/parallel-web/parallel-sdk-python/compare/v0.6.0...v1.0.0)
|
|
21
|
+
|
|
22
|
+
### ⚠ BREAKING CHANGES
|
|
23
|
+
|
|
24
|
+
* **api:** clean up beta features
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
28
|
+
* **api:** 1.0.0 changes ([f399080](https://github.com/parallel-web/parallel-sdk-python/commit/f3990800a98eefef82f21902406d90073c050de1))
|
|
29
|
+
* **api:** Add parallel_beta typing back ([004ce9f](https://github.com/parallel-web/parallel-sdk-python/commit/004ce9f53eaabe12e676f9f6ae3d0a000dfeabc2))
|
|
30
|
+
* **api:** clean up beta features ([f533161](https://github.com/parallel-web/parallel-sdk-python/commit/f53316197d11be2900710b447007c07f9c89e427))
|
|
31
|
+
* **api:** Remove beta: tasks, task groups, search, and extract from SDK ([b7bcade](https://github.com/parallel-web/parallel-sdk-python/commit/b7bcade5a866ea8ef08de244b251c140b17f18f2))
|
|
32
|
+
* **internal/types:** support eagerly validating pydantic iterators ([6c148b4](https://github.com/parallel-web/parallel-sdk-python/commit/6c148b449af221b634c8dd77c3846401c2d092b8))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
|
|
37
|
+
* **client:** add missing f-string prefix in file type error message ([6fa3eac](https://github.com/parallel-web/parallel-sdk-python/commit/6fa3eaca98c7d94d0a98596227ab2f10968cea86))
|
|
38
|
+
|
|
3
39
|
## 0.6.0 (2026-05-06)
|
|
4
40
|
|
|
5
41
|
Full Changelog: [v0.5.1...v0.6.0](https://github.com/parallel-web/parallel-sdk-python/compare/v0.5.1...v0.6.0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: parallel-web
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 1.0.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
|
|
@@ -41,14 +41,12 @@ Description-Content-Type: text/markdown
|
|
|
41
41
|
The Parallel Python library provides convenient access to the Parallel REST API from any Python 3.9+
|
|
42
42
|
application. The library includes type definitions for all request params and response fields,
|
|
43
43
|
and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
|
|
44
|
-
It is strongly encouraged to use the asynchronous client for best performance.
|
|
45
44
|
|
|
46
45
|
It is generated with [Stainless](https://www.stainless.com/).
|
|
47
46
|
|
|
48
47
|
## Documentation
|
|
49
48
|
|
|
50
|
-
The REST API documentation can be found
|
|
51
|
-
The full API of this Python library can be found in [api.md](https://github.com/parallel-web/parallel-sdk-python/tree/main/api.md).
|
|
49
|
+
The REST API documentation can be found on [docs.parallel.ai](https://docs.parallel.ai). The full API of this library can be found in [api.md](https://github.com/parallel-web/parallel-sdk-python/tree/main/api.md).
|
|
52
50
|
|
|
53
51
|
## Installation
|
|
54
52
|
|
|
@@ -70,11 +68,10 @@ client = Parallel(
|
|
|
70
68
|
)
|
|
71
69
|
|
|
72
70
|
task_run = client.task_run.create(
|
|
73
|
-
input="France
|
|
74
|
-
processor="
|
|
71
|
+
input="What was the GDP of France in 2023?",
|
|
72
|
+
processor="base",
|
|
75
73
|
)
|
|
76
|
-
|
|
77
|
-
print(task_run_result.output)
|
|
74
|
+
print(task_run.interaction_id)
|
|
78
75
|
```
|
|
79
76
|
|
|
80
77
|
While you can provide an `api_key` keyword argument,
|
|
@@ -82,11 +79,6 @@ we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)
|
|
|
82
79
|
to add `PARALLEL_API_KEY="My API Key"` to your `.env` file
|
|
83
80
|
so that your API Key is not stored in source control.
|
|
84
81
|
|
|
85
|
-
The API also supports typed inputs and outputs via Pydantic objects. See the relevant
|
|
86
|
-
section on [convenience methods](https://github.com/parallel-web/parallel-sdk-python/tree/main/#convenience-methods).
|
|
87
|
-
|
|
88
|
-
For information on what tasks are and how to specify them, see [our docs](https://docs.parallel.ai/task-api/core-concepts/specify-a-task).
|
|
89
|
-
|
|
90
82
|
## Async usage
|
|
91
83
|
|
|
92
84
|
Simply import `AsyncParallel` instead of `Parallel` and use `await` with each API call:
|
|
@@ -102,102 +94,79 @@ client = AsyncParallel(
|
|
|
102
94
|
|
|
103
95
|
|
|
104
96
|
async def main() -> None:
|
|
105
|
-
task_run = await client.task_run.create(
|
|
106
|
-
|
|
107
|
-
|
|
97
|
+
task_run = await client.task_run.create(
|
|
98
|
+
input="What was the GDP of France in 2023?",
|
|
99
|
+
processor="base",
|
|
100
|
+
)
|
|
101
|
+
print(task_run.interaction_id)
|
|
108
102
|
|
|
109
103
|
|
|
110
|
-
|
|
111
|
-
asyncio.run(main())
|
|
104
|
+
asyncio.run(main())
|
|
112
105
|
```
|
|
113
106
|
|
|
114
|
-
|
|
115
|
-
using the asynchronous client, especially for executing multiple Task Runs concurrently.
|
|
116
|
-
Functionality between the synchronous and asynchronous clients is identical, including
|
|
117
|
-
the convenience methods.
|
|
107
|
+
Functionality between the synchronous and asynchronous clients is otherwise identical.
|
|
118
108
|
|
|
119
|
-
|
|
109
|
+
### With aiohttp
|
|
120
110
|
|
|
121
|
-
|
|
111
|
+
By default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.
|
|
122
112
|
|
|
123
|
-
|
|
124
|
-
the Task API. Instead, provide any directives or instructions via the schemas. For
|
|
125
|
-
more information, check [our docs](https://docs.parallel.ai/task-api/core-concepts/specify-a-task).
|
|
113
|
+
You can enable this by installing `aiohttp`:
|
|
126
114
|
|
|
127
|
-
|
|
115
|
+
```sh
|
|
116
|
+
# install from PyPI
|
|
117
|
+
pip install parallel-web[aiohttp]
|
|
118
|
+
```
|
|
128
119
|
|
|
129
|
-
|
|
130
|
-
All beta parameters are accessible via the `client.beta` namespace in the SDK.
|
|
120
|
+
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
|
|
131
121
|
|
|
132
|
-
|
|
122
|
+
```python
|
|
123
|
+
import os
|
|
124
|
+
import asyncio
|
|
125
|
+
from parallel import DefaultAioHttpClient
|
|
126
|
+
from parallel import AsyncParallel
|
|
133
127
|
|
|
134
|
-
Yes, all methods support a timeout. For more information, see [Timeouts](https://github.com/parallel-web/parallel-sdk-python/tree/main/#timeouts).
|
|
135
128
|
|
|
129
|
+
async def main() -> None:
|
|
130
|
+
async with AsyncParallel(
|
|
131
|
+
api_key=os.environ.get("PARALLEL_API_KEY"), # This is the default and can be omitted
|
|
132
|
+
http_client=DefaultAioHttpClient(),
|
|
133
|
+
) as client:
|
|
134
|
+
task_run = await client.task_run.create(
|
|
135
|
+
input="What was the GDP of France in 2023?",
|
|
136
|
+
processor="base",
|
|
137
|
+
)
|
|
138
|
+
print(task_run.interaction_id)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
asyncio.run(main())
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Using types
|
|
136
145
|
|
|
137
|
-
|
|
146
|
+
Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:
|
|
138
147
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
are automatically retried and how to configure retry settings, see [Retries](https://github.com/parallel-web/parallel-sdk-python/tree/main/#retries).
|
|
148
|
+
- Serializing back into JSON, `model.to_json()`
|
|
149
|
+
- Converting to a dictionary, `model.to_dict()`
|
|
142
150
|
|
|
143
|
-
|
|
151
|
+
Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.
|
|
144
152
|
|
|
145
|
-
|
|
153
|
+
## Nested params
|
|
154
|
+
|
|
155
|
+
Nested parameters are dictionaries, typed using `TypedDict`, for example:
|
|
146
156
|
|
|
147
157
|
```python
|
|
148
158
|
from parallel import Parallel
|
|
149
|
-
from parallel.types import TaskSpecParam
|
|
150
159
|
|
|
151
160
|
client = Parallel()
|
|
152
161
|
|
|
153
162
|
task_run = client.task_run.create(
|
|
154
|
-
input=
|
|
155
|
-
processor="
|
|
156
|
-
|
|
157
|
-
"output_schema": {
|
|
158
|
-
"json_schema": {
|
|
159
|
-
"additionalProperties": False,
|
|
160
|
-
"properties": {
|
|
161
|
-
"gdp": {
|
|
162
|
-
"description": "GDP in USD for the year",
|
|
163
|
-
"type": "string",
|
|
164
|
-
}
|
|
165
|
-
},
|
|
166
|
-
"required": ["gdp"],
|
|
167
|
-
"type": "object",
|
|
168
|
-
},
|
|
169
|
-
"type": "json",
|
|
170
|
-
},
|
|
171
|
-
"input_schema": {
|
|
172
|
-
"json_schema": {
|
|
173
|
-
"additionalProperties": False,
|
|
174
|
-
"properties": {
|
|
175
|
-
"country": {
|
|
176
|
-
"description": "Name of the country to research",
|
|
177
|
-
"type": "string",
|
|
178
|
-
},
|
|
179
|
-
"year": {
|
|
180
|
-
"description": "Year for which to retrieve information",
|
|
181
|
-
"type": "integer",
|
|
182
|
-
},
|
|
183
|
-
},
|
|
184
|
-
"required": ["country", "year"],
|
|
185
|
-
"type": "object",
|
|
186
|
-
},
|
|
187
|
-
"type": "json",
|
|
188
|
-
},
|
|
189
|
-
},
|
|
163
|
+
input="What was the GDP of France in 2023?",
|
|
164
|
+
processor="base",
|
|
165
|
+
advanced_settings={},
|
|
190
166
|
)
|
|
191
|
-
|
|
192
|
-
run_result = client.task_run.result(task_run.run_id)
|
|
193
|
-
print(run_result.output.content)
|
|
167
|
+
print(task_run.advanced_settings)
|
|
194
168
|
```
|
|
195
169
|
|
|
196
|
-
For more information, please check out the relevant section in our docs:
|
|
197
|
-
|
|
198
|
-
- [Task Spec](https://docs.parallel.ai/task-api/core-concepts/specify-a-task)
|
|
199
|
-
- [Task Runs](https://docs.parallel.ai/task-api/core-concepts/execute-task-run)
|
|
200
|
-
|
|
201
170
|
## Handling errors
|
|
202
171
|
|
|
203
172
|
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `parallel.APIConnectionError` is raised.
|
|
@@ -214,7 +183,10 @@ from parallel import Parallel
|
|
|
214
183
|
client = Parallel()
|
|
215
184
|
|
|
216
185
|
try:
|
|
217
|
-
client.task_run.create(
|
|
186
|
+
client.task_run.create(
|
|
187
|
+
input="What was the GDP of France in 2023?",
|
|
188
|
+
processor="base",
|
|
189
|
+
)
|
|
218
190
|
except parallel.APIConnectionError as e:
|
|
219
191
|
print("The server could not be reached")
|
|
220
192
|
print(e.__cause__) # an underlying Exception, likely raised within httpx.
|
|
@@ -257,7 +229,10 @@ client = Parallel(
|
|
|
257
229
|
)
|
|
258
230
|
|
|
259
231
|
# Or, configure per-request:
|
|
260
|
-
client.with_options(max_retries=5).task_run.create(
|
|
232
|
+
client.with_options(max_retries=5).task_run.create(
|
|
233
|
+
input="What was the GDP of France in 2023?",
|
|
234
|
+
processor="base",
|
|
235
|
+
)
|
|
261
236
|
```
|
|
262
237
|
|
|
263
238
|
### Timeouts
|
|
@@ -280,7 +255,10 @@ client = Parallel(
|
|
|
280
255
|
)
|
|
281
256
|
|
|
282
257
|
# Override per-request:
|
|
283
|
-
client.with_options(timeout=5.0).task_run.create(
|
|
258
|
+
client.with_options(timeout=5.0).task_run.create(
|
|
259
|
+
input="What was the GDP of France in 2023?",
|
|
260
|
+
processor="base",
|
|
261
|
+
)
|
|
284
262
|
```
|
|
285
263
|
|
|
286
264
|
On timeout, an `APITimeoutError` is thrown.
|
|
@@ -322,12 +300,12 @@ from parallel import Parallel
|
|
|
322
300
|
|
|
323
301
|
client = Parallel()
|
|
324
302
|
response = client.task_run.with_raw_response.create(
|
|
325
|
-
input="France
|
|
326
|
-
processor="
|
|
303
|
+
input="What was the GDP of France in 2023?",
|
|
304
|
+
processor="base",
|
|
327
305
|
)
|
|
328
306
|
print(response.headers.get('X-My-Header'))
|
|
329
307
|
|
|
330
|
-
task_run = response.parse()
|
|
308
|
+
task_run = response.parse() # get the object that `task_run.create()` would have returned
|
|
331
309
|
print(task_run.interaction_id)
|
|
332
310
|
```
|
|
333
311
|
|
|
@@ -343,7 +321,8 @@ To stream the response body, use `.with_streaming_response` instead, which requi
|
|
|
343
321
|
|
|
344
322
|
```python
|
|
345
323
|
with client.task_run.with_streaming_response.create(
|
|
346
|
-
input="France
|
|
324
|
+
input="What was the GDP of France in 2023?",
|
|
325
|
+
processor="base",
|
|
347
326
|
) as response:
|
|
348
327
|
print(response.headers.get("X-My-Header"))
|
|
349
328
|
|
|
@@ -6,14 +6,12 @@
|
|
|
6
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
|
-
It is strongly encouraged to use the asynchronous client for best performance.
|
|
10
9
|
|
|
11
10
|
It is generated with [Stainless](https://www.stainless.com/).
|
|
12
11
|
|
|
13
12
|
## Documentation
|
|
14
13
|
|
|
15
|
-
The REST API documentation can be found
|
|
16
|
-
The full API of this Python library can be found in [api.md](api.md).
|
|
14
|
+
The REST API documentation can be found on [docs.parallel.ai](https://docs.parallel.ai). The full API of this library can be found in [api.md](api.md).
|
|
17
15
|
|
|
18
16
|
## Installation
|
|
19
17
|
|
|
@@ -35,11 +33,10 @@ client = Parallel(
|
|
|
35
33
|
)
|
|
36
34
|
|
|
37
35
|
task_run = client.task_run.create(
|
|
38
|
-
input="France
|
|
39
|
-
processor="
|
|
36
|
+
input="What was the GDP of France in 2023?",
|
|
37
|
+
processor="base",
|
|
40
38
|
)
|
|
41
|
-
|
|
42
|
-
print(task_run_result.output)
|
|
39
|
+
print(task_run.interaction_id)
|
|
43
40
|
```
|
|
44
41
|
|
|
45
42
|
While you can provide an `api_key` keyword argument,
|
|
@@ -47,11 +44,6 @@ we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)
|
|
|
47
44
|
to add `PARALLEL_API_KEY="My API Key"` to your `.env` file
|
|
48
45
|
so that your API Key is not stored in source control.
|
|
49
46
|
|
|
50
|
-
The API also supports typed inputs and outputs via Pydantic objects. See the relevant
|
|
51
|
-
section on [convenience methods](#convenience-methods).
|
|
52
|
-
|
|
53
|
-
For information on what tasks are and how to specify them, see [our docs](https://docs.parallel.ai/task-api/core-concepts/specify-a-task).
|
|
54
|
-
|
|
55
47
|
## Async usage
|
|
56
48
|
|
|
57
49
|
Simply import `AsyncParallel` instead of `Parallel` and use `await` with each API call:
|
|
@@ -67,102 +59,79 @@ client = AsyncParallel(
|
|
|
67
59
|
|
|
68
60
|
|
|
69
61
|
async def main() -> None:
|
|
70
|
-
task_run = await client.task_run.create(
|
|
71
|
-
|
|
72
|
-
|
|
62
|
+
task_run = await client.task_run.create(
|
|
63
|
+
input="What was the GDP of France in 2023?",
|
|
64
|
+
processor="base",
|
|
65
|
+
)
|
|
66
|
+
print(task_run.interaction_id)
|
|
73
67
|
|
|
74
68
|
|
|
75
|
-
|
|
76
|
-
asyncio.run(main())
|
|
69
|
+
asyncio.run(main())
|
|
77
70
|
```
|
|
78
71
|
|
|
79
|
-
|
|
80
|
-
using the asynchronous client, especially for executing multiple Task Runs concurrently.
|
|
81
|
-
Functionality between the synchronous and asynchronous clients is identical, including
|
|
82
|
-
the convenience methods.
|
|
72
|
+
Functionality between the synchronous and asynchronous clients is otherwise identical.
|
|
83
73
|
|
|
84
|
-
|
|
74
|
+
### With aiohttp
|
|
85
75
|
|
|
86
|
-
|
|
76
|
+
By default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.
|
|
87
77
|
|
|
88
|
-
|
|
89
|
-
the Task API. Instead, provide any directives or instructions via the schemas. For
|
|
90
|
-
more information, check [our docs](https://docs.parallel.ai/task-api/core-concepts/specify-a-task).
|
|
78
|
+
You can enable this by installing `aiohttp`:
|
|
91
79
|
|
|
92
|
-
|
|
80
|
+
```sh
|
|
81
|
+
# install from PyPI
|
|
82
|
+
pip install parallel-web[aiohttp]
|
|
83
|
+
```
|
|
93
84
|
|
|
94
|
-
|
|
95
|
-
All beta parameters are accessible via the `client.beta` namespace in the SDK.
|
|
85
|
+
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
|
|
96
86
|
|
|
97
|
-
|
|
87
|
+
```python
|
|
88
|
+
import os
|
|
89
|
+
import asyncio
|
|
90
|
+
from parallel import DefaultAioHttpClient
|
|
91
|
+
from parallel import AsyncParallel
|
|
98
92
|
|
|
99
|
-
Yes, all methods support a timeout. For more information, see [Timeouts](#timeouts).
|
|
100
93
|
|
|
94
|
+
async def main() -> None:
|
|
95
|
+
async with AsyncParallel(
|
|
96
|
+
api_key=os.environ.get("PARALLEL_API_KEY"), # This is the default and can be omitted
|
|
97
|
+
http_client=DefaultAioHttpClient(),
|
|
98
|
+
) as client:
|
|
99
|
+
task_run = await client.task_run.create(
|
|
100
|
+
input="What was the GDP of France in 2023?",
|
|
101
|
+
processor="base",
|
|
102
|
+
)
|
|
103
|
+
print(task_run.interaction_id)
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
asyncio.run(main())
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Using types
|
|
101
110
|
|
|
102
|
-
|
|
111
|
+
Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:
|
|
103
112
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
are automatically retried and how to configure retry settings, see [Retries](#retries).
|
|
113
|
+
- Serializing back into JSON, `model.to_json()`
|
|
114
|
+
- Converting to a dictionary, `model.to_dict()`
|
|
107
115
|
|
|
108
|
-
|
|
116
|
+
Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.
|
|
109
117
|
|
|
110
|
-
|
|
118
|
+
## Nested params
|
|
119
|
+
|
|
120
|
+
Nested parameters are dictionaries, typed using `TypedDict`, for example:
|
|
111
121
|
|
|
112
122
|
```python
|
|
113
123
|
from parallel import Parallel
|
|
114
|
-
from parallel.types import TaskSpecParam
|
|
115
124
|
|
|
116
125
|
client = Parallel()
|
|
117
126
|
|
|
118
127
|
task_run = client.task_run.create(
|
|
119
|
-
input=
|
|
120
|
-
processor="
|
|
121
|
-
|
|
122
|
-
"output_schema": {
|
|
123
|
-
"json_schema": {
|
|
124
|
-
"additionalProperties": False,
|
|
125
|
-
"properties": {
|
|
126
|
-
"gdp": {
|
|
127
|
-
"description": "GDP in USD for the year",
|
|
128
|
-
"type": "string",
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
"required": ["gdp"],
|
|
132
|
-
"type": "object",
|
|
133
|
-
},
|
|
134
|
-
"type": "json",
|
|
135
|
-
},
|
|
136
|
-
"input_schema": {
|
|
137
|
-
"json_schema": {
|
|
138
|
-
"additionalProperties": False,
|
|
139
|
-
"properties": {
|
|
140
|
-
"country": {
|
|
141
|
-
"description": "Name of the country to research",
|
|
142
|
-
"type": "string",
|
|
143
|
-
},
|
|
144
|
-
"year": {
|
|
145
|
-
"description": "Year for which to retrieve information",
|
|
146
|
-
"type": "integer",
|
|
147
|
-
},
|
|
148
|
-
},
|
|
149
|
-
"required": ["country", "year"],
|
|
150
|
-
"type": "object",
|
|
151
|
-
},
|
|
152
|
-
"type": "json",
|
|
153
|
-
},
|
|
154
|
-
},
|
|
128
|
+
input="What was the GDP of France in 2023?",
|
|
129
|
+
processor="base",
|
|
130
|
+
advanced_settings={},
|
|
155
131
|
)
|
|
156
|
-
|
|
157
|
-
run_result = client.task_run.result(task_run.run_id)
|
|
158
|
-
print(run_result.output.content)
|
|
132
|
+
print(task_run.advanced_settings)
|
|
159
133
|
```
|
|
160
134
|
|
|
161
|
-
For more information, please check out the relevant section in our docs:
|
|
162
|
-
|
|
163
|
-
- [Task Spec](https://docs.parallel.ai/task-api/core-concepts/specify-a-task)
|
|
164
|
-
- [Task Runs](https://docs.parallel.ai/task-api/core-concepts/execute-task-run)
|
|
165
|
-
|
|
166
135
|
## Handling errors
|
|
167
136
|
|
|
168
137
|
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `parallel.APIConnectionError` is raised.
|
|
@@ -179,7 +148,10 @@ from parallel import Parallel
|
|
|
179
148
|
client = Parallel()
|
|
180
149
|
|
|
181
150
|
try:
|
|
182
|
-
client.task_run.create(
|
|
151
|
+
client.task_run.create(
|
|
152
|
+
input="What was the GDP of France in 2023?",
|
|
153
|
+
processor="base",
|
|
154
|
+
)
|
|
183
155
|
except parallel.APIConnectionError as e:
|
|
184
156
|
print("The server could not be reached")
|
|
185
157
|
print(e.__cause__) # an underlying Exception, likely raised within httpx.
|
|
@@ -222,7 +194,10 @@ client = Parallel(
|
|
|
222
194
|
)
|
|
223
195
|
|
|
224
196
|
# Or, configure per-request:
|
|
225
|
-
client.with_options(max_retries=5).task_run.create(
|
|
197
|
+
client.with_options(max_retries=5).task_run.create(
|
|
198
|
+
input="What was the GDP of France in 2023?",
|
|
199
|
+
processor="base",
|
|
200
|
+
)
|
|
226
201
|
```
|
|
227
202
|
|
|
228
203
|
### Timeouts
|
|
@@ -245,7 +220,10 @@ client = Parallel(
|
|
|
245
220
|
)
|
|
246
221
|
|
|
247
222
|
# Override per-request:
|
|
248
|
-
client.with_options(timeout=5.0).task_run.create(
|
|
223
|
+
client.with_options(timeout=5.0).task_run.create(
|
|
224
|
+
input="What was the GDP of France in 2023?",
|
|
225
|
+
processor="base",
|
|
226
|
+
)
|
|
249
227
|
```
|
|
250
228
|
|
|
251
229
|
On timeout, an `APITimeoutError` is thrown.
|
|
@@ -287,12 +265,12 @@ from parallel import Parallel
|
|
|
287
265
|
|
|
288
266
|
client = Parallel()
|
|
289
267
|
response = client.task_run.with_raw_response.create(
|
|
290
|
-
input="France
|
|
291
|
-
processor="
|
|
268
|
+
input="What was the GDP of France in 2023?",
|
|
269
|
+
processor="base",
|
|
292
270
|
)
|
|
293
271
|
print(response.headers.get('X-My-Header'))
|
|
294
272
|
|
|
295
|
-
task_run = response.parse()
|
|
273
|
+
task_run = response.parse() # get the object that `task_run.create()` would have returned
|
|
296
274
|
print(task_run.interaction_id)
|
|
297
275
|
```
|
|
298
276
|
|
|
@@ -308,7 +286,8 @@ To stream the response body, use `.with_streaming_response` instead, which requi
|
|
|
308
286
|
|
|
309
287
|
```python
|
|
310
288
|
with client.task_run.with_streaming_response.create(
|
|
311
|
-
input="France
|
|
289
|
+
input="What was the GDP of France in 2023?",
|
|
290
|
+
processor="base",
|
|
312
291
|
) as response:
|
|
313
292
|
print(response.headers.get("X-My-Header"))
|
|
314
293
|
|
|
@@ -37,12 +37,15 @@ Types:
|
|
|
37
37
|
from parallel.types import (
|
|
38
38
|
AutoSchema,
|
|
39
39
|
Citation,
|
|
40
|
+
ErrorEvent,
|
|
40
41
|
FieldBasis,
|
|
41
42
|
JsonSchema,
|
|
42
|
-
|
|
43
|
+
McpServer,
|
|
44
|
+
McpToolCall,
|
|
43
45
|
RunInput,
|
|
44
46
|
TaskAdvancedSettings,
|
|
45
47
|
TaskRun,
|
|
48
|
+
TaskRunEvent,
|
|
46
49
|
TaskRunJsonOutput,
|
|
47
50
|
TaskRunProgressMessageEvent,
|
|
48
51
|
TaskRunProgressStatsEvent,
|
|
@@ -51,6 +54,8 @@ from parallel.types import (
|
|
|
51
54
|
TaskRunTextOutput,
|
|
52
55
|
TaskSpec,
|
|
53
56
|
TextSchema,
|
|
57
|
+
Webhook,
|
|
58
|
+
TaskRunEventsResponse,
|
|
54
59
|
)
|
|
55
60
|
```
|
|
56
61
|
|
|
@@ -58,13 +63,10 @@ Methods:
|
|
|
58
63
|
|
|
59
64
|
- <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>
|
|
60
65
|
- <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>
|
|
66
|
+
- <code title="get /v1/tasks/runs/{run_id}/events">client.task_run.<a href="./src/parallel/resources/task_run.py">events</a>(run_id) -> <a href="./src/parallel/types/task_run_events_response.py">TaskRunEventsResponse</a></code>
|
|
61
67
|
- <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>
|
|
62
68
|
- <code title="get /v1/tasks/runs/{run_id}/input">client.task_run.<a href="./src/parallel/resources/task_run.py">retrieve_input</a>(run_id) -> <a href="./src/parallel/types/run_input.py">RunInput</a></code>
|
|
63
69
|
|
|
64
|
-
Convenience methods:
|
|
65
|
-
|
|
66
|
-
- <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>
|
|
67
|
-
- <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>
|
|
68
70
|
# TaskGroup
|
|
69
71
|
|
|
70
72
|
Types:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "parallel-web"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "1.0.1"
|
|
4
4
|
description = "The official Python library for the Parallel API"
|
|
5
5
|
dynamic = ["readme"]
|
|
6
6
|
license = "MIT"
|
|
@@ -158,11 +158,6 @@ reportOverlappingOverload = false
|
|
|
158
158
|
|
|
159
159
|
reportImportCycles = false
|
|
160
160
|
reportPrivateUsage = false
|
|
161
|
-
# Deprecation is a runtime concern; type-check warnings produce noise when the
|
|
162
|
-
# breaking-change detector compares against pre-deprecation baseline tests.
|
|
163
|
-
# Newly-generated tests already add a per-file `# pyright: reportDeprecated=false`
|
|
164
|
-
# marker for deprecated resources, so this just promotes that to project-level.
|
|
165
|
-
reportDeprecated = false
|
|
166
161
|
|
|
167
162
|
[tool.mypy]
|
|
168
163
|
pretty = true
|
|
@@ -99,7 +99,7 @@ async def async_to_httpx_files(files: RequestFiles | None) -> HttpxRequestFiles
|
|
|
99
99
|
elif is_sequence_t(files):
|
|
100
100
|
files = [(key, await _async_transform_file(file)) for key, file in files]
|
|
101
101
|
else:
|
|
102
|
-
raise TypeError("Unexpected file type input {type(files)}, expected mapping or sequence")
|
|
102
|
+
raise TypeError(f"Unexpected file type input {type(files)}, expected mapping or sequence")
|
|
103
103
|
|
|
104
104
|
return files
|
|
105
105
|
|