nimble_python 0.14.0__tar.gz → 0.15.0__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.
- nimble_python-0.15.0/.release-please-manifest.json +3 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/CHANGELOG.md +10 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/PKG-INFO +1 -1
- {nimble_python-0.14.0 → nimble_python-0.15.0}/api.md +2 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/pyproject.toml +1 -1
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/_qs.py +4 -1
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/_version.py +1 -1
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/resources/agent.py +115 -6
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/__init__.py +2 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/agent_run_async_params.py +5 -2
- nimble_python-0.15.0/src/nimble_python/types/agent_run_batch_params.py +34 -0
- nimble_python-0.15.0/src/nimble_python/types/agent_run_batch_response.py +68 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/agent_run_params.py +5 -2
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/agent_run_response.py +3 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/extract_response.py +3 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/tests/api_resources/test_agent.py +119 -0
- nimble_python-0.14.0/.release-please-manifest.json +0 -3
- {nimble_python-0.14.0 → nimble_python-0.15.0}/.gitignore +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/CONTRIBUTING.md +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/LICENSE +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/README.md +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/SECURITY.md +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/bin/check-release-environment +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/bin/publish-pypi +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/examples/.keep +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/release-please-config.json +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/requirements-dev.lock +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/__init__.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/_base_client.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/_client.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/_compat.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/_constants.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/_exceptions.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/_files.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/_models.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/_resource.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/_response.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/_streaming.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/_types.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/_utils/__init__.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/_utils/_compat.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/_utils/_datetime_parse.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/_utils/_json.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/_utils/_logs.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/_utils/_path.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/_utils/_proxy.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/_utils/_reflection.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/_utils/_resources_proxy.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/_utils/_streams.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/_utils/_sync.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/_utils/_transform.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/_utils/_typing.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/_utils/_utils.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/lib/.keep +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/py.typed +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/resources/__init__.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/resources/batches.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/resources/crawl.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/resources/tasks.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/agent_get_response.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/agent_list_params.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/agent_list_response.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/agent_run_async_response.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/batch_get_response.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/batch_progress_response.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/client_extract_async_params.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/client_extract_batch_params.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/client_extract_params.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/client_map_params.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/client_search_params.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/crawl_list_params.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/crawl_list_response.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/crawl_run_params.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/crawl_run_response.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/crawl_status_response.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/crawl_terminate_response.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/extract_async_response.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/extract_batch_response.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/map_response.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/search_response.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared/__init__.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared/auto_scroll_action.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared/click_action.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared/eval_action.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared/fetch_action.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared/fill_action.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared/get_cookies_action.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared/goto_action.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared/press_action.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared/screenshot_action.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared/scroll_action.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared/wait_action.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared/wait_for_element_action.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared/wait_for_navigation_action.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared_params/__init__.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared_params/auto_scroll_action.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared_params/click_action.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared_params/eval_action.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared_params/fetch_action.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared_params/fill_action.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared_params/get_cookies_action.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared_params/goto_action.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared_params/press_action.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared_params/screenshot_action.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared_params/scroll_action.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared_params/wait_action.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared_params/wait_for_element_action.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared_params/wait_for_navigation_action.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/task_get_response.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/task_list_params.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/task_list_response.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/task_results_response.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimbleway/lib/.keep +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/tests/__init__.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/tests/api_resources/__init__.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/tests/api_resources/test_batches.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/tests/api_resources/test_client.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/tests/api_resources/test_crawl.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/tests/api_resources/test_tasks.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/tests/conftest.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/tests/sample_file.txt +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/tests/test_client.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/tests/test_deepcopy.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/tests/test_extract_files.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/tests/test_files.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/tests/test_models.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/tests/test_qs.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/tests/test_required_args.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/tests/test_response.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/tests/test_streaming.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/tests/test_transform.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/tests/test_utils/test_datetime_parse.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/tests/test_utils/test_json.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/tests/test_utils/test_path.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/tests/test_utils/test_proxy.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/tests/test_utils/test_typing.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/tests/utils.py +0 -0
- {nimble_python-0.14.0 → nimble_python-0.15.0}/uv.lock +0 -0
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.15.0 (2026-03-29)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.14.0...v0.15.0](https://github.com/Nimbleway/nimble-python/compare/v0.14.0...v0.15.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([691eb61](https://github.com/Nimbleway/nimble-python/commit/691eb61893fadbc901e48eaf17077a229abc06f5))
|
|
10
|
+
* **api:** manual updates ([99d2baf](https://github.com/Nimbleway/nimble-python/commit/99d2baff4c87c9402cf4f3615825d6c8b42e5d28))
|
|
11
|
+
* **internal:** implement indices array format for query and form serialization ([e74fd0c](https://github.com/Nimbleway/nimble-python/commit/e74fd0c52e59349932a467177eb6f5f5b554f218))
|
|
12
|
+
|
|
3
13
|
## 0.14.0 (2026-03-25)
|
|
4
14
|
|
|
5
15
|
Full Changelog: [v0.13.0...v0.14.0](https://github.com/Nimbleway/nimble-python/compare/v0.13.0...v0.14.0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: nimble_python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.15.0
|
|
4
4
|
Summary: The official Python library for the nimble API
|
|
5
5
|
Project-URL: Homepage, https://github.com/Nimbleway/nimble-python
|
|
6
6
|
Project-URL: Repository, https://github.com/Nimbleway/nimble-python
|
|
@@ -50,6 +50,7 @@ from nimble_python.types import (
|
|
|
50
50
|
AgentGetResponse,
|
|
51
51
|
AgentRunResponse,
|
|
52
52
|
AgentRunAsyncResponse,
|
|
53
|
+
AgentRunBatchResponse,
|
|
53
54
|
)
|
|
54
55
|
```
|
|
55
56
|
|
|
@@ -59,6 +60,7 @@ Methods:
|
|
|
59
60
|
- <code title="get /v1/agents/{template_name}">client.agent.<a href="./src/nimble_python/resources/agent.py">get</a>(template_name) -> <a href="./src/nimble_python/types/agent_get_response.py">AgentGetResponse</a></code>
|
|
60
61
|
- <code title="post /v1/agents/run">client.agent.<a href="./src/nimble_python/resources/agent.py">run</a>(\*\*<a href="src/nimble_python/types/agent_run_params.py">params</a>) -> <a href="./src/nimble_python/types/agent_run_response.py">AgentRunResponse</a></code>
|
|
61
62
|
- <code title="post /v1/agents/async">client.agent.<a href="./src/nimble_python/resources/agent.py">run_async</a>(\*\*<a href="src/nimble_python/types/agent_run_async_params.py">params</a>) -> <a href="./src/nimble_python/types/agent_run_async_response.py">AgentRunAsyncResponse</a></code>
|
|
63
|
+
- <code title="post /v1/agents/batch">client.agent.<a href="./src/nimble_python/resources/agent.py">run_batch</a>(\*\*<a href="src/nimble_python/types/agent_run_batch_params.py">params</a>) -> <a href="./src/nimble_python/types/agent_run_batch_response.py">AgentRunBatchResponse</a></code>
|
|
62
64
|
|
|
63
65
|
# Crawl
|
|
64
66
|
|
|
@@ -101,7 +101,10 @@ class Querystring:
|
|
|
101
101
|
items.extend(self._stringify_item(key, item, opts))
|
|
102
102
|
return items
|
|
103
103
|
elif array_format == "indices":
|
|
104
|
-
|
|
104
|
+
items = []
|
|
105
|
+
for i, item in enumerate(value):
|
|
106
|
+
items.extend(self._stringify_item(f"{key}[{i}]", item, opts))
|
|
107
|
+
return items
|
|
105
108
|
elif array_format == "brackets":
|
|
106
109
|
items = []
|
|
107
110
|
key = key + "[]"
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Dict, Optional
|
|
5
|
+
from typing import Dict, List, Iterable, Optional
|
|
6
6
|
from typing_extensions import Literal
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
9
9
|
|
|
10
|
-
from ..types import agent_run_params, agent_list_params, agent_run_async_params
|
|
10
|
+
from ..types import agent_run_params, agent_list_params, agent_run_async_params, agent_run_batch_params
|
|
11
11
|
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
12
12
|
from .._utils import path_template, maybe_transform, async_maybe_transform
|
|
13
13
|
from .._compat import cached_property
|
|
@@ -23,6 +23,7 @@ from ..types.agent_get_response import AgentGetResponse
|
|
|
23
23
|
from ..types.agent_run_response import AgentRunResponse
|
|
24
24
|
from ..types.agent_list_response import AgentListResponse
|
|
25
25
|
from ..types.agent_run_async_response import AgentRunAsyncResponse
|
|
26
|
+
from ..types.agent_run_batch_response import AgentRunBatchResponse
|
|
26
27
|
|
|
27
28
|
__all__ = ["AgentResource", "AsyncAgentResource"]
|
|
28
29
|
|
|
@@ -143,6 +144,7 @@ class AgentResource(SyncAPIResource):
|
|
|
143
144
|
*,
|
|
144
145
|
agent: str,
|
|
145
146
|
params: Dict[str, object],
|
|
147
|
+
formats: List[Literal["html", "markdown", "screenshot", "headers"]] | Omit = omit,
|
|
146
148
|
localization: bool | Omit = omit,
|
|
147
149
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
148
150
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -151,10 +153,13 @@ class AgentResource(SyncAPIResource):
|
|
|
151
153
|
extra_body: Body | None = None,
|
|
152
154
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
153
155
|
) -> AgentRunResponse:
|
|
154
|
-
"""
|
|
155
|
-
Execute WSA Realtime Endpoint
|
|
156
|
+
"""Execute WSA Realtime Endpoint
|
|
156
157
|
|
|
157
158
|
Args:
|
|
159
|
+
formats: Response formats to include.
|
|
160
|
+
|
|
161
|
+
All disabled by default.
|
|
162
|
+
|
|
158
163
|
extra_headers: Send extra headers
|
|
159
164
|
|
|
160
165
|
extra_query: Add additional query parameters to the request
|
|
@@ -169,6 +174,7 @@ class AgentResource(SyncAPIResource):
|
|
|
169
174
|
{
|
|
170
175
|
"agent": agent,
|
|
171
176
|
"params": params,
|
|
177
|
+
"formats": formats,
|
|
172
178
|
"localization": localization,
|
|
173
179
|
},
|
|
174
180
|
agent_run_params.AgentRunParams,
|
|
@@ -185,6 +191,7 @@ class AgentResource(SyncAPIResource):
|
|
|
185
191
|
agent: str,
|
|
186
192
|
params: Dict[str, object],
|
|
187
193
|
callback_url: str | Omit = omit,
|
|
194
|
+
formats: List[Literal["html", "markdown", "screenshot", "headers"]] | Omit = omit,
|
|
188
195
|
localization: bool | Omit = omit,
|
|
189
196
|
storage_compress: bool | Omit = omit,
|
|
190
197
|
storage_object_name: str | Omit = omit,
|
|
@@ -203,6 +210,8 @@ class AgentResource(SyncAPIResource):
|
|
|
203
210
|
Args:
|
|
204
211
|
callback_url: URL to call back when async operation completes
|
|
205
212
|
|
|
213
|
+
formats: Response formats to include. All disabled by default.
|
|
214
|
+
|
|
206
215
|
storage_compress: Whether to compress stored data
|
|
207
216
|
|
|
208
217
|
storage_object_name: Custom name for the stored object
|
|
@@ -226,6 +235,7 @@ class AgentResource(SyncAPIResource):
|
|
|
226
235
|
"agent": agent,
|
|
227
236
|
"params": params,
|
|
228
237
|
"callback_url": callback_url,
|
|
238
|
+
"formats": formats,
|
|
229
239
|
"localization": localization,
|
|
230
240
|
"storage_compress": storage_compress,
|
|
231
241
|
"storage_object_name": storage_object_name,
|
|
@@ -240,6 +250,45 @@ class AgentResource(SyncAPIResource):
|
|
|
240
250
|
cast_to=AgentRunAsyncResponse,
|
|
241
251
|
)
|
|
242
252
|
|
|
253
|
+
def run_batch(
|
|
254
|
+
self,
|
|
255
|
+
*,
|
|
256
|
+
inputs: Iterable[agent_run_batch_params.Input],
|
|
257
|
+
shared_inputs: agent_run_batch_params.SharedInputs,
|
|
258
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
259
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
260
|
+
extra_headers: Headers | None = None,
|
|
261
|
+
extra_query: Query | None = None,
|
|
262
|
+
extra_body: Body | None = None,
|
|
263
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
264
|
+
) -> AgentRunBatchResponse:
|
|
265
|
+
"""
|
|
266
|
+
Execute WSA Batch Endpoint
|
|
267
|
+
|
|
268
|
+
Args:
|
|
269
|
+
extra_headers: Send extra headers
|
|
270
|
+
|
|
271
|
+
extra_query: Add additional query parameters to the request
|
|
272
|
+
|
|
273
|
+
extra_body: Add additional JSON properties to the request
|
|
274
|
+
|
|
275
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
276
|
+
"""
|
|
277
|
+
return self._post(
|
|
278
|
+
"/v1/agents/batch",
|
|
279
|
+
body=maybe_transform(
|
|
280
|
+
{
|
|
281
|
+
"inputs": inputs,
|
|
282
|
+
"shared_inputs": shared_inputs,
|
|
283
|
+
},
|
|
284
|
+
agent_run_batch_params.AgentRunBatchParams,
|
|
285
|
+
),
|
|
286
|
+
options=make_request_options(
|
|
287
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
288
|
+
),
|
|
289
|
+
cast_to=AgentRunBatchResponse,
|
|
290
|
+
)
|
|
291
|
+
|
|
243
292
|
|
|
244
293
|
class AsyncAgentResource(AsyncAPIResource):
|
|
245
294
|
@cached_property
|
|
@@ -357,6 +406,7 @@ class AsyncAgentResource(AsyncAPIResource):
|
|
|
357
406
|
*,
|
|
358
407
|
agent: str,
|
|
359
408
|
params: Dict[str, object],
|
|
409
|
+
formats: List[Literal["html", "markdown", "screenshot", "headers"]] | Omit = omit,
|
|
360
410
|
localization: bool | Omit = omit,
|
|
361
411
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
362
412
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -365,10 +415,13 @@ class AsyncAgentResource(AsyncAPIResource):
|
|
|
365
415
|
extra_body: Body | None = None,
|
|
366
416
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
367
417
|
) -> AgentRunResponse:
|
|
368
|
-
"""
|
|
369
|
-
Execute WSA Realtime Endpoint
|
|
418
|
+
"""Execute WSA Realtime Endpoint
|
|
370
419
|
|
|
371
420
|
Args:
|
|
421
|
+
formats: Response formats to include.
|
|
422
|
+
|
|
423
|
+
All disabled by default.
|
|
424
|
+
|
|
372
425
|
extra_headers: Send extra headers
|
|
373
426
|
|
|
374
427
|
extra_query: Add additional query parameters to the request
|
|
@@ -383,6 +436,7 @@ class AsyncAgentResource(AsyncAPIResource):
|
|
|
383
436
|
{
|
|
384
437
|
"agent": agent,
|
|
385
438
|
"params": params,
|
|
439
|
+
"formats": formats,
|
|
386
440
|
"localization": localization,
|
|
387
441
|
},
|
|
388
442
|
agent_run_params.AgentRunParams,
|
|
@@ -399,6 +453,7 @@ class AsyncAgentResource(AsyncAPIResource):
|
|
|
399
453
|
agent: str,
|
|
400
454
|
params: Dict[str, object],
|
|
401
455
|
callback_url: str | Omit = omit,
|
|
456
|
+
formats: List[Literal["html", "markdown", "screenshot", "headers"]] | Omit = omit,
|
|
402
457
|
localization: bool | Omit = omit,
|
|
403
458
|
storage_compress: bool | Omit = omit,
|
|
404
459
|
storage_object_name: str | Omit = omit,
|
|
@@ -417,6 +472,8 @@ class AsyncAgentResource(AsyncAPIResource):
|
|
|
417
472
|
Args:
|
|
418
473
|
callback_url: URL to call back when async operation completes
|
|
419
474
|
|
|
475
|
+
formats: Response formats to include. All disabled by default.
|
|
476
|
+
|
|
420
477
|
storage_compress: Whether to compress stored data
|
|
421
478
|
|
|
422
479
|
storage_object_name: Custom name for the stored object
|
|
@@ -440,6 +497,7 @@ class AsyncAgentResource(AsyncAPIResource):
|
|
|
440
497
|
"agent": agent,
|
|
441
498
|
"params": params,
|
|
442
499
|
"callback_url": callback_url,
|
|
500
|
+
"formats": formats,
|
|
443
501
|
"localization": localization,
|
|
444
502
|
"storage_compress": storage_compress,
|
|
445
503
|
"storage_object_name": storage_object_name,
|
|
@@ -454,6 +512,45 @@ class AsyncAgentResource(AsyncAPIResource):
|
|
|
454
512
|
cast_to=AgentRunAsyncResponse,
|
|
455
513
|
)
|
|
456
514
|
|
|
515
|
+
async def run_batch(
|
|
516
|
+
self,
|
|
517
|
+
*,
|
|
518
|
+
inputs: Iterable[agent_run_batch_params.Input],
|
|
519
|
+
shared_inputs: agent_run_batch_params.SharedInputs,
|
|
520
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
521
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
522
|
+
extra_headers: Headers | None = None,
|
|
523
|
+
extra_query: Query | None = None,
|
|
524
|
+
extra_body: Body | None = None,
|
|
525
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
526
|
+
) -> AgentRunBatchResponse:
|
|
527
|
+
"""
|
|
528
|
+
Execute WSA Batch Endpoint
|
|
529
|
+
|
|
530
|
+
Args:
|
|
531
|
+
extra_headers: Send extra headers
|
|
532
|
+
|
|
533
|
+
extra_query: Add additional query parameters to the request
|
|
534
|
+
|
|
535
|
+
extra_body: Add additional JSON properties to the request
|
|
536
|
+
|
|
537
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
538
|
+
"""
|
|
539
|
+
return await self._post(
|
|
540
|
+
"/v1/agents/batch",
|
|
541
|
+
body=await async_maybe_transform(
|
|
542
|
+
{
|
|
543
|
+
"inputs": inputs,
|
|
544
|
+
"shared_inputs": shared_inputs,
|
|
545
|
+
},
|
|
546
|
+
agent_run_batch_params.AgentRunBatchParams,
|
|
547
|
+
),
|
|
548
|
+
options=make_request_options(
|
|
549
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
550
|
+
),
|
|
551
|
+
cast_to=AgentRunBatchResponse,
|
|
552
|
+
)
|
|
553
|
+
|
|
457
554
|
|
|
458
555
|
class AgentResourceWithRawResponse:
|
|
459
556
|
def __init__(self, agent: AgentResource) -> None:
|
|
@@ -471,6 +568,9 @@ class AgentResourceWithRawResponse:
|
|
|
471
568
|
self.run_async = to_raw_response_wrapper(
|
|
472
569
|
agent.run_async,
|
|
473
570
|
)
|
|
571
|
+
self.run_batch = to_raw_response_wrapper(
|
|
572
|
+
agent.run_batch,
|
|
573
|
+
)
|
|
474
574
|
|
|
475
575
|
|
|
476
576
|
class AsyncAgentResourceWithRawResponse:
|
|
@@ -489,6 +589,9 @@ class AsyncAgentResourceWithRawResponse:
|
|
|
489
589
|
self.run_async = async_to_raw_response_wrapper(
|
|
490
590
|
agent.run_async,
|
|
491
591
|
)
|
|
592
|
+
self.run_batch = async_to_raw_response_wrapper(
|
|
593
|
+
agent.run_batch,
|
|
594
|
+
)
|
|
492
595
|
|
|
493
596
|
|
|
494
597
|
class AgentResourceWithStreamingResponse:
|
|
@@ -507,6 +610,9 @@ class AgentResourceWithStreamingResponse:
|
|
|
507
610
|
self.run_async = to_streamed_response_wrapper(
|
|
508
611
|
agent.run_async,
|
|
509
612
|
)
|
|
613
|
+
self.run_batch = to_streamed_response_wrapper(
|
|
614
|
+
agent.run_batch,
|
|
615
|
+
)
|
|
510
616
|
|
|
511
617
|
|
|
512
618
|
class AsyncAgentResourceWithStreamingResponse:
|
|
@@ -525,3 +631,6 @@ class AsyncAgentResourceWithStreamingResponse:
|
|
|
525
631
|
self.run_async = async_to_streamed_response_wrapper(
|
|
526
632
|
agent.run_async,
|
|
527
633
|
)
|
|
634
|
+
self.run_batch = async_to_streamed_response_wrapper(
|
|
635
|
+
agent.run_batch,
|
|
636
|
+
)
|
|
@@ -39,10 +39,12 @@ from .client_extract_params import ClientExtractParams as ClientExtractParams
|
|
|
39
39
|
from .crawl_status_response import CrawlStatusResponse as CrawlStatusResponse
|
|
40
40
|
from .task_results_response import TaskResultsResponse as TaskResultsResponse
|
|
41
41
|
from .agent_run_async_params import AgentRunAsyncParams as AgentRunAsyncParams
|
|
42
|
+
from .agent_run_batch_params import AgentRunBatchParams as AgentRunBatchParams
|
|
42
43
|
from .extract_async_response import ExtractAsyncResponse as ExtractAsyncResponse
|
|
43
44
|
from .extract_batch_response import ExtractBatchResponse as ExtractBatchResponse
|
|
44
45
|
from .batch_progress_response import BatchProgressResponse as BatchProgressResponse
|
|
45
46
|
from .agent_run_async_response import AgentRunAsyncResponse as AgentRunAsyncResponse
|
|
47
|
+
from .agent_run_batch_response import AgentRunBatchResponse as AgentRunBatchResponse
|
|
46
48
|
from .crawl_terminate_response import CrawlTerminateResponse as CrawlTerminateResponse
|
|
47
49
|
from .client_extract_async_params import ClientExtractAsyncParams as ClientExtractAsyncParams
|
|
48
50
|
from .client_extract_batch_params import ClientExtractBatchParams as ClientExtractBatchParams
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/agent_run_async_params.py
RENAMED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Dict
|
|
6
|
-
from typing_extensions import Required, TypedDict
|
|
5
|
+
from typing import Dict, List
|
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
7
7
|
|
|
8
8
|
__all__ = ["AgentRunAsyncParams"]
|
|
9
9
|
|
|
@@ -16,6 +16,9 @@ class AgentRunAsyncParams(TypedDict, total=False):
|
|
|
16
16
|
callback_url: str
|
|
17
17
|
"""URL to call back when async operation completes"""
|
|
18
18
|
|
|
19
|
+
formats: List[Literal["html", "markdown", "screenshot", "headers"]]
|
|
20
|
+
"""Response formats to include. All disabled by default."""
|
|
21
|
+
|
|
19
22
|
localization: bool
|
|
20
23
|
|
|
21
24
|
storage_compress: bool
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict, List, Iterable
|
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["AgentRunBatchParams", "Input", "SharedInputs"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class AgentRunBatchParams(TypedDict, total=False):
|
|
12
|
+
inputs: Required[Iterable[Input]]
|
|
13
|
+
|
|
14
|
+
shared_inputs: Required[SharedInputs]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Input(TypedDict, total=False):
|
|
18
|
+
formats: List[Literal["html", "markdown", "screenshot", "headers"]]
|
|
19
|
+
"""Response formats to include. All disabled by default."""
|
|
20
|
+
|
|
21
|
+
localization: bool
|
|
22
|
+
|
|
23
|
+
params: Dict[str, object]
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class SharedInputs(TypedDict, total=False):
|
|
27
|
+
agent: Required[str]
|
|
28
|
+
|
|
29
|
+
formats: List[Literal["html", "markdown", "screenshot", "headers"]]
|
|
30
|
+
"""Response formats to include. All disabled by default."""
|
|
31
|
+
|
|
32
|
+
localization: bool
|
|
33
|
+
|
|
34
|
+
params: Dict[str, object]
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from pydantic import Field as FieldInfo
|
|
7
|
+
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["AgentRunBatchResponse", "Task"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Task(BaseModel):
|
|
14
|
+
id: str
|
|
15
|
+
"""Unique task identifier."""
|
|
16
|
+
|
|
17
|
+
api_query: object = FieldInfo(alias="_query")
|
|
18
|
+
|
|
19
|
+
created_at: str
|
|
20
|
+
"""Timestamp when the task was created."""
|
|
21
|
+
|
|
22
|
+
input: object
|
|
23
|
+
"""Original input data for the task."""
|
|
24
|
+
|
|
25
|
+
state: Literal["pending", "success", "error"]
|
|
26
|
+
"""Current state of the task."""
|
|
27
|
+
|
|
28
|
+
status_url: str
|
|
29
|
+
"""URL for checking the task status."""
|
|
30
|
+
|
|
31
|
+
account_name: Optional[str] = None
|
|
32
|
+
"""Account name that owns the task."""
|
|
33
|
+
|
|
34
|
+
api_type: Optional[Literal["web", "serp", "ecommerce", "social", "media", "agent", "extract"]] = None
|
|
35
|
+
|
|
36
|
+
batch_id: Optional[str] = None
|
|
37
|
+
"""Batch ID if this task is part of a batch."""
|
|
38
|
+
|
|
39
|
+
download_url: Optional[str] = None
|
|
40
|
+
"""URL for downloading the task results."""
|
|
41
|
+
|
|
42
|
+
error: Optional[str] = None
|
|
43
|
+
"""Error message if the task failed."""
|
|
44
|
+
|
|
45
|
+
error_type: Optional[str] = None
|
|
46
|
+
"""Classification of the error type."""
|
|
47
|
+
|
|
48
|
+
modified_at: Optional[str] = None
|
|
49
|
+
"""Timestamp when the task was last modified."""
|
|
50
|
+
|
|
51
|
+
output_url: Optional[str] = None
|
|
52
|
+
"""Storage location of the output data."""
|
|
53
|
+
|
|
54
|
+
status_code: Optional[float] = None
|
|
55
|
+
"""HTTP status code from the task execution."""
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class AgentRunBatchResponse(BaseModel):
|
|
59
|
+
"""Response when a batch of extract tasks is created successfully."""
|
|
60
|
+
|
|
61
|
+
batch_id: str
|
|
62
|
+
"""Unique identifier for the batch."""
|
|
63
|
+
|
|
64
|
+
batch_size: float
|
|
65
|
+
"""Number of tasks in the batch."""
|
|
66
|
+
|
|
67
|
+
tasks: List[Task]
|
|
68
|
+
"""List of created tasks."""
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Dict
|
|
6
|
-
from typing_extensions import Required, TypedDict
|
|
5
|
+
from typing import Dict, List
|
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
7
7
|
|
|
8
8
|
__all__ = ["AgentRunParams"]
|
|
9
9
|
|
|
@@ -13,4 +13,7 @@ class AgentRunParams(TypedDict, total=False):
|
|
|
13
13
|
|
|
14
14
|
params: Required[Dict[str, object]]
|
|
15
15
|
|
|
16
|
+
formats: List[Literal["html", "markdown", "screenshot", "headers"]]
|
|
17
|
+
"""Response formats to include. All disabled by default."""
|
|
18
|
+
|
|
16
19
|
localization: bool
|
|
@@ -246,6 +246,9 @@ class Data(BaseModel):
|
|
|
246
246
|
network_capture: Optional[List[DataNetworkCapture]] = None
|
|
247
247
|
"""The network capture data collected during the task."""
|
|
248
248
|
|
|
249
|
+
pages_html: Optional[List[str]] = None
|
|
250
|
+
"""Individual HTML content of each pagination page, before merging."""
|
|
251
|
+
|
|
249
252
|
parsing: Optional[DataParsing] = None
|
|
250
253
|
"""The parsing results extracted from the HTML & network content."""
|
|
251
254
|
|
|
@@ -246,6 +246,9 @@ class Data(BaseModel):
|
|
|
246
246
|
network_capture: Optional[List[DataNetworkCapture]] = None
|
|
247
247
|
"""The network capture data collected during the task."""
|
|
248
248
|
|
|
249
|
+
pages_html: Optional[List[str]] = None
|
|
250
|
+
"""Individual HTML content of each pagination page, before merging."""
|
|
251
|
+
|
|
249
252
|
parsing: Optional[DataParsing] = None
|
|
250
253
|
"""The parsing results extracted from the HTML & network content."""
|
|
251
254
|
|
|
@@ -14,6 +14,7 @@ from nimble_python.types import (
|
|
|
14
14
|
AgentRunResponse,
|
|
15
15
|
AgentListResponse,
|
|
16
16
|
AgentRunAsyncResponse,
|
|
17
|
+
AgentRunBatchResponse,
|
|
17
18
|
)
|
|
18
19
|
|
|
19
20
|
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
|
|
@@ -119,6 +120,7 @@ class TestAgent:
|
|
|
119
120
|
agent = client.agent.run(
|
|
120
121
|
agent="agent",
|
|
121
122
|
params={"foo": "bar"},
|
|
123
|
+
formats=["html", "markdown"],
|
|
122
124
|
localization=True,
|
|
123
125
|
)
|
|
124
126
|
assert_matches_type(AgentRunResponse, agent, path=["response"])
|
|
@@ -167,6 +169,7 @@ class TestAgent:
|
|
|
167
169
|
agent="agent",
|
|
168
170
|
params={"foo": "bar"},
|
|
169
171
|
callback_url="https://example.com/webhook/callback",
|
|
172
|
+
formats=["html", "markdown"],
|
|
170
173
|
localization=True,
|
|
171
174
|
storage_compress=True,
|
|
172
175
|
storage_object_name="result-2024-01-15.json",
|
|
@@ -203,6 +206,63 @@ class TestAgent:
|
|
|
203
206
|
|
|
204
207
|
assert cast(Any, response.is_closed) is True
|
|
205
208
|
|
|
209
|
+
@pytest.mark.skip(reason="Mock server tests are disabled")
|
|
210
|
+
@parametrize
|
|
211
|
+
def test_method_run_batch(self, client: Nimble) -> None:
|
|
212
|
+
agent = client.agent.run_batch(
|
|
213
|
+
inputs=[{}],
|
|
214
|
+
shared_inputs={"agent": "agent"},
|
|
215
|
+
)
|
|
216
|
+
assert_matches_type(AgentRunBatchResponse, agent, path=["response"])
|
|
217
|
+
|
|
218
|
+
@pytest.mark.skip(reason="Mock server tests are disabled")
|
|
219
|
+
@parametrize
|
|
220
|
+
def test_method_run_batch_with_all_params(self, client: Nimble) -> None:
|
|
221
|
+
agent = client.agent.run_batch(
|
|
222
|
+
inputs=[
|
|
223
|
+
{
|
|
224
|
+
"formats": ["html", "markdown"],
|
|
225
|
+
"localization": True,
|
|
226
|
+
"params": {"foo": "bar"},
|
|
227
|
+
}
|
|
228
|
+
],
|
|
229
|
+
shared_inputs={
|
|
230
|
+
"agent": "agent",
|
|
231
|
+
"formats": ["html", "markdown"],
|
|
232
|
+
"localization": True,
|
|
233
|
+
"params": {"foo": "bar"},
|
|
234
|
+
},
|
|
235
|
+
)
|
|
236
|
+
assert_matches_type(AgentRunBatchResponse, agent, path=["response"])
|
|
237
|
+
|
|
238
|
+
@pytest.mark.skip(reason="Mock server tests are disabled")
|
|
239
|
+
@parametrize
|
|
240
|
+
def test_raw_response_run_batch(self, client: Nimble) -> None:
|
|
241
|
+
response = client.agent.with_raw_response.run_batch(
|
|
242
|
+
inputs=[{}],
|
|
243
|
+
shared_inputs={"agent": "agent"},
|
|
244
|
+
)
|
|
245
|
+
|
|
246
|
+
assert response.is_closed is True
|
|
247
|
+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
248
|
+
agent = response.parse()
|
|
249
|
+
assert_matches_type(AgentRunBatchResponse, agent, path=["response"])
|
|
250
|
+
|
|
251
|
+
@pytest.mark.skip(reason="Mock server tests are disabled")
|
|
252
|
+
@parametrize
|
|
253
|
+
def test_streaming_response_run_batch(self, client: Nimble) -> None:
|
|
254
|
+
with client.agent.with_streaming_response.run_batch(
|
|
255
|
+
inputs=[{}],
|
|
256
|
+
shared_inputs={"agent": "agent"},
|
|
257
|
+
) as response:
|
|
258
|
+
assert not response.is_closed
|
|
259
|
+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
260
|
+
|
|
261
|
+
agent = response.parse()
|
|
262
|
+
assert_matches_type(AgentRunBatchResponse, agent, path=["response"])
|
|
263
|
+
|
|
264
|
+
assert cast(Any, response.is_closed) is True
|
|
265
|
+
|
|
206
266
|
|
|
207
267
|
class TestAsyncAgent:
|
|
208
268
|
parametrize = pytest.mark.parametrize(
|
|
@@ -306,6 +366,7 @@ class TestAsyncAgent:
|
|
|
306
366
|
agent = await async_client.agent.run(
|
|
307
367
|
agent="agent",
|
|
308
368
|
params={"foo": "bar"},
|
|
369
|
+
formats=["html", "markdown"],
|
|
309
370
|
localization=True,
|
|
310
371
|
)
|
|
311
372
|
assert_matches_type(AgentRunResponse, agent, path=["response"])
|
|
@@ -354,6 +415,7 @@ class TestAsyncAgent:
|
|
|
354
415
|
agent="agent",
|
|
355
416
|
params={"foo": "bar"},
|
|
356
417
|
callback_url="https://example.com/webhook/callback",
|
|
418
|
+
formats=["html", "markdown"],
|
|
357
419
|
localization=True,
|
|
358
420
|
storage_compress=True,
|
|
359
421
|
storage_object_name="result-2024-01-15.json",
|
|
@@ -389,3 +451,60 @@ class TestAsyncAgent:
|
|
|
389
451
|
assert_matches_type(AgentRunAsyncResponse, agent, path=["response"])
|
|
390
452
|
|
|
391
453
|
assert cast(Any, response.is_closed) is True
|
|
454
|
+
|
|
455
|
+
@pytest.mark.skip(reason="Mock server tests are disabled")
|
|
456
|
+
@parametrize
|
|
457
|
+
async def test_method_run_batch(self, async_client: AsyncNimble) -> None:
|
|
458
|
+
agent = await async_client.agent.run_batch(
|
|
459
|
+
inputs=[{}],
|
|
460
|
+
shared_inputs={"agent": "agent"},
|
|
461
|
+
)
|
|
462
|
+
assert_matches_type(AgentRunBatchResponse, agent, path=["response"])
|
|
463
|
+
|
|
464
|
+
@pytest.mark.skip(reason="Mock server tests are disabled")
|
|
465
|
+
@parametrize
|
|
466
|
+
async def test_method_run_batch_with_all_params(self, async_client: AsyncNimble) -> None:
|
|
467
|
+
agent = await async_client.agent.run_batch(
|
|
468
|
+
inputs=[
|
|
469
|
+
{
|
|
470
|
+
"formats": ["html", "markdown"],
|
|
471
|
+
"localization": True,
|
|
472
|
+
"params": {"foo": "bar"},
|
|
473
|
+
}
|
|
474
|
+
],
|
|
475
|
+
shared_inputs={
|
|
476
|
+
"agent": "agent",
|
|
477
|
+
"formats": ["html", "markdown"],
|
|
478
|
+
"localization": True,
|
|
479
|
+
"params": {"foo": "bar"},
|
|
480
|
+
},
|
|
481
|
+
)
|
|
482
|
+
assert_matches_type(AgentRunBatchResponse, agent, path=["response"])
|
|
483
|
+
|
|
484
|
+
@pytest.mark.skip(reason="Mock server tests are disabled")
|
|
485
|
+
@parametrize
|
|
486
|
+
async def test_raw_response_run_batch(self, async_client: AsyncNimble) -> None:
|
|
487
|
+
response = await async_client.agent.with_raw_response.run_batch(
|
|
488
|
+
inputs=[{}],
|
|
489
|
+
shared_inputs={"agent": "agent"},
|
|
490
|
+
)
|
|
491
|
+
|
|
492
|
+
assert response.is_closed is True
|
|
493
|
+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
494
|
+
agent = await response.parse()
|
|
495
|
+
assert_matches_type(AgentRunBatchResponse, agent, path=["response"])
|
|
496
|
+
|
|
497
|
+
@pytest.mark.skip(reason="Mock server tests are disabled")
|
|
498
|
+
@parametrize
|
|
499
|
+
async def test_streaming_response_run_batch(self, async_client: AsyncNimble) -> None:
|
|
500
|
+
async with async_client.agent.with_streaming_response.run_batch(
|
|
501
|
+
inputs=[{}],
|
|
502
|
+
shared_inputs={"agent": "agent"},
|
|
503
|
+
) as response:
|
|
504
|
+
assert not response.is_closed
|
|
505
|
+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
506
|
+
|
|
507
|
+
agent = await response.parse()
|
|
508
|
+
assert_matches_type(AgentRunBatchResponse, agent, path=["response"])
|
|
509
|
+
|
|
510
|
+
assert cast(Any, response.is_closed) is True
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/agent_list_response.py
RENAMED
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/agent_run_async_response.py
RENAMED
|
File without changes
|
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/batch_progress_response.py
RENAMED
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/client_extract_async_params.py
RENAMED
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/client_extract_batch_params.py
RENAMED
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/client_extract_params.py
RENAMED
|
File without changes
|
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/client_search_params.py
RENAMED
|
File without changes
|
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/crawl_list_response.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/crawl_status_response.py
RENAMED
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/crawl_terminate_response.py
RENAMED
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/extract_async_response.py
RENAMED
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/extract_batch_response.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared/auto_scroll_action.py
RENAMED
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared/click_action.py
RENAMED
|
File without changes
|
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared/fetch_action.py
RENAMED
|
File without changes
|
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared/get_cookies_action.py
RENAMED
|
File without changes
|
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared/press_action.py
RENAMED
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared/screenshot_action.py
RENAMED
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared/scroll_action.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared_params/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared_params/click_action.py
RENAMED
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared_params/eval_action.py
RENAMED
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared_params/fetch_action.py
RENAMED
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared_params/fill_action.py
RENAMED
|
File without changes
|
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared_params/goto_action.py
RENAMED
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared_params/press_action.py
RENAMED
|
File without changes
|
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared_params/scroll_action.py
RENAMED
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/shared_params/wait_action.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nimble_python-0.14.0 → nimble_python-0.15.0}/src/nimble_python/types/task_results_response.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|