nimble_python 0.12.0__tar.gz → 0.14.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.12.0 → nimble_python-0.14.0}/.gitignore +1 -0
- nimble_python-0.14.0/.release-please-manifest.json +3 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/CHANGELOG.md +31 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/PKG-INFO +1 -1
- {nimble_python-0.12.0 → nimble_python-0.14.0}/api.md +14 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/pyproject.toml +1 -1
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/_client.py +60 -23
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/_utils/__init__.py +1 -0
- nimble_python-0.14.0/src/nimble_python/_utils/_path.py +127 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/_version.py +1 -1
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/resources/__init__.py +14 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/resources/agent.py +3 -3
- nimble_python-0.14.0/src/nimble_python/resources/batches.py +305 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/resources/crawl.py +5 -5
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/resources/tasks.py +5 -5
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/__init__.py +2 -0
- nimble_python-0.14.0/src/nimble_python/types/batch_get_response.py +82 -0
- nimble_python-0.14.0/src/nimble_python/types/batch_progress_response.py +29 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/client_extract_async_params.py +1 -1
- nimble_python-0.14.0/src/nimble_python/types/client_extract_batch_params.py +2119 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/client_extract_params.py +1 -1
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/crawl_run_params.py +1 -1
- nimble_python-0.14.0/tests/api_resources/test_batches.py +248 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/tests/api_resources/test_client.py +246 -12
- nimble_python-0.14.0/tests/test_utils/test_path.py +89 -0
- nimble_python-0.12.0/.release-please-manifest.json +0 -3
- nimble_python-0.12.0/src/nimble_python/types/client_extract_batch_params.py +0 -1084
- {nimble_python-0.12.0 → nimble_python-0.14.0}/CONTRIBUTING.md +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/LICENSE +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/README.md +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/SECURITY.md +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/bin/check-release-environment +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/bin/publish-pypi +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/examples/.keep +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/release-please-config.json +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/requirements-dev.lock +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/__init__.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/_base_client.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/_compat.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/_constants.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/_exceptions.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/_files.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/_models.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/_qs.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/_resource.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/_streaming.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/_types.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/_utils/_compat.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/_utils/_datetime_parse.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/_utils/_json.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/_utils/_logs.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/_utils/_proxy.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/_utils/_reflection.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/_utils/_resources_proxy.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/_utils/_streams.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/_utils/_sync.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/_utils/_transform.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/_utils/_typing.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/_utils/_utils.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/lib/.keep +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/py.typed +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/agent_get_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/agent_list_params.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/agent_list_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/agent_run_async_params.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/agent_run_async_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/agent_run_params.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/agent_run_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/client_map_params.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/client_search_params.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/crawl_list_params.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/crawl_list_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/crawl_run_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/crawl_status_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/crawl_terminate_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/extract_async_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/extract_batch_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/extract_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/map_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/search_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/shared/__init__.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/shared/auto_scroll_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/shared/click_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/shared/eval_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/shared/fetch_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/shared/fill_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/shared/get_cookies_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/shared/goto_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/shared/press_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/shared/screenshot_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/shared/scroll_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/shared/wait_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/shared/wait_for_element_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/shared/wait_for_navigation_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/shared_params/__init__.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/shared_params/auto_scroll_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/shared_params/click_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/shared_params/eval_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/shared_params/fetch_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/shared_params/fill_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/shared_params/get_cookies_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/shared_params/goto_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/shared_params/press_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/shared_params/screenshot_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/shared_params/scroll_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/shared_params/wait_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/shared_params/wait_for_element_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/shared_params/wait_for_navigation_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/task_get_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/task_list_params.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/task_list_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimble_python/types/task_results_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/src/nimbleway/lib/.keep +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/tests/__init__.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/tests/api_resources/__init__.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/tests/api_resources/test_agent.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/tests/api_resources/test_crawl.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/tests/api_resources/test_tasks.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/tests/conftest.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/tests/sample_file.txt +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/tests/test_client.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/tests/test_deepcopy.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/tests/test_extract_files.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/tests/test_files.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/tests/test_models.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/tests/test_qs.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/tests/test_required_args.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/tests/test_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/tests/test_streaming.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/tests/test_transform.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/tests/test_utils/test_datetime_parse.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/tests/test_utils/test_json.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/tests/test_utils/test_proxy.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/tests/test_utils/test_typing.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/tests/utils.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.14.0}/uv.lock +0 -0
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.14.0 (2026-03-25)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.13.0...v0.14.0](https://github.com/Nimbleway/nimble-python/compare/v0.13.0...v0.14.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([821cfa1](https://github.com/Nimbleway/nimble-python/commit/821cfa15a5328f20cda1f76b1d7a284d3d53b23f))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Chores
|
|
13
|
+
|
|
14
|
+
* **ci:** skip lint on metadata-only changes ([3e1d8f5](https://github.com/Nimbleway/nimble-python/commit/3e1d8f5838127cb3145a69876d993bca07bc4b8e))
|
|
15
|
+
|
|
16
|
+
## 0.13.0 (2026-03-24)
|
|
17
|
+
|
|
18
|
+
Full Changelog: [v0.12.0...v0.13.0](https://github.com/Nimbleway/nimble-python/compare/v0.12.0...v0.13.0)
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **api:** manual updates ([17e730d](https://github.com/Nimbleway/nimble-python/commit/17e730d1f09b8cead6fa11cb68af9d8105dc57df))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* sanitize endpoint path params ([0c14c30](https://github.com/Nimbleway/nimble-python/commit/0c14c308e068da0c00affd197abb5ddd3b7f8ca2))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Chores
|
|
31
|
+
|
|
32
|
+
* **internal:** update gitignore ([f19a4e6](https://github.com/Nimbleway/nimble-python/commit/f19a4e6cea6039638d95e8b5f8d136a34149c63d))
|
|
33
|
+
|
|
3
34
|
## 0.12.0 (2026-03-18)
|
|
4
35
|
|
|
5
36
|
Full Changelog: [v0.11.0...v0.12.0](https://github.com/Nimbleway/nimble-python/compare/v0.11.0...v0.12.0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: nimble_python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.14.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
|
|
@@ -93,3 +93,17 @@ Methods:
|
|
|
93
93
|
- <code title="get /v1/tasks">client.tasks.<a href="./src/nimble_python/resources/tasks.py">list</a>(\*\*<a href="src/nimble_python/types/task_list_params.py">params</a>) -> <a href="./src/nimble_python/types/task_list_response.py">TaskListResponse</a></code>
|
|
94
94
|
- <code title="get /v1/tasks/{task_id}">client.tasks.<a href="./src/nimble_python/resources/tasks.py">get</a>(task_id) -> <a href="./src/nimble_python/types/task_get_response.py">TaskGetResponse</a></code>
|
|
95
95
|
- <code title="get /v1/tasks/{task_id}/results">client.tasks.<a href="./src/nimble_python/resources/tasks.py">results</a>(task_id) -> <a href="./src/nimble_python/types/task_results_response.py">TaskResultsResponse</a></code>
|
|
96
|
+
|
|
97
|
+
# Batches
|
|
98
|
+
|
|
99
|
+
Types:
|
|
100
|
+
|
|
101
|
+
```python
|
|
102
|
+
from nimble_python.types import BatchGetResponse, BatchProgressResponse
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Methods:
|
|
106
|
+
|
|
107
|
+
- <code title="get /v1/batches">client.batches.<a href="./src/nimble_python/resources/batches.py">list</a>() -> None</code>
|
|
108
|
+
- <code title="get /v1/batches/{batch_id}">client.batches.<a href="./src/nimble_python/resources/batches.py">get</a>(batch_id) -> <a href="./src/nimble_python/types/batch_get_response.py">BatchGetResponse</a></code>
|
|
109
|
+
- <code title="get /v1/batches/{batch_id}/progress">client.batches.<a href="./src/nimble_python/resources/batches.py">progress</a>(batch_id) -> <a href="./src/nimble_python/types/batch_progress_response.py">BatchProgressResponse</a></code>
|
|
@@ -60,10 +60,11 @@ from .types.extract_async_response import ExtractAsyncResponse
|
|
|
60
60
|
from .types.extract_batch_response import ExtractBatchResponse
|
|
61
61
|
|
|
62
62
|
if TYPE_CHECKING:
|
|
63
|
-
from .resources import agent, crawl, tasks
|
|
63
|
+
from .resources import agent, crawl, tasks, batches
|
|
64
64
|
from .resources.agent import AgentResource, AsyncAgentResource
|
|
65
65
|
from .resources.crawl import CrawlResource, AsyncCrawlResource
|
|
66
66
|
from .resources.tasks import TasksResource, AsyncTasksResource
|
|
67
|
+
from .resources.batches import BatchesResource, AsyncBatchesResource
|
|
67
68
|
|
|
68
69
|
__all__ = ["Timeout", "Transport", "ProxiesTypes", "RequestOptions", "Nimble", "AsyncNimble", "Client", "AsyncClient"]
|
|
69
70
|
|
|
@@ -137,6 +138,12 @@ class Nimble(SyncAPIClient):
|
|
|
137
138
|
|
|
138
139
|
return TasksResource(self)
|
|
139
140
|
|
|
141
|
+
@cached_property
|
|
142
|
+
def batches(self) -> BatchesResource:
|
|
143
|
+
from .resources.batches import BatchesResource
|
|
144
|
+
|
|
145
|
+
return BatchesResource(self)
|
|
146
|
+
|
|
140
147
|
@cached_property
|
|
141
148
|
def with_raw_response(self) -> NimbleWithRawResponse:
|
|
142
149
|
return NimbleWithRawResponse(self)
|
|
@@ -493,7 +500,7 @@ class Nimble(SyncAPIClient):
|
|
|
493
500
|
device: Literal["desktop", "mobile", "tablet"] | Omit = omit,
|
|
494
501
|
driver: Literal["vx6", "vx8", "vx8-pro", "vx10", "vx10-pro", "vx12", "vx12-pro"] | Omit = omit,
|
|
495
502
|
expected_status_codes: Iterable[int] | Omit = omit,
|
|
496
|
-
formats: List[Literal["html", "markdown", "screenshot"]] | Omit = omit,
|
|
503
|
+
formats: List[Literal["html", "markdown", "screenshot", "headers"]] | Omit = omit,
|
|
497
504
|
headers: Dict[str, Union[str, SequenceNotStr[str], None]] | Omit = omit,
|
|
498
505
|
http2: bool | Omit = omit,
|
|
499
506
|
is_xhr: bool | Omit = omit,
|
|
@@ -1484,7 +1491,7 @@ class Nimble(SyncAPIClient):
|
|
|
1484
1491
|
device: Literal["desktop", "mobile", "tablet"] | Omit = omit,
|
|
1485
1492
|
driver: Literal["vx6", "vx8", "vx8-pro", "vx10", "vx10-pro", "vx12", "vx12-pro"] | Omit = omit,
|
|
1486
1493
|
expected_status_codes: Iterable[int] | Omit = omit,
|
|
1487
|
-
formats: List[Literal["html", "markdown", "screenshot"]] | Omit = omit,
|
|
1494
|
+
formats: List[Literal["html", "markdown", "screenshot", "headers"]] | Omit = omit,
|
|
1488
1495
|
headers: Dict[str, Union[str, SequenceNotStr[str], None]] | Omit = omit,
|
|
1489
1496
|
http2: bool | Omit = omit,
|
|
1490
1497
|
is_xhr: bool | Omit = omit,
|
|
@@ -2230,8 +2237,8 @@ class Nimble(SyncAPIClient):
|
|
|
2230
2237
|
def extract_batch(
|
|
2231
2238
|
self,
|
|
2232
2239
|
*,
|
|
2233
|
-
|
|
2234
|
-
|
|
2240
|
+
inputs: Iterable[client_extract_batch_params.Input],
|
|
2241
|
+
shared_inputs: client_extract_batch_params.SharedInputs | Omit = omit,
|
|
2235
2242
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2236
2243
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2237
2244
|
extra_headers: Headers | None = None,
|
|
@@ -2242,13 +2249,13 @@ class Nimble(SyncAPIClient):
|
|
|
2242
2249
|
"""Extract Batch Endpoint
|
|
2243
2250
|
|
|
2244
2251
|
Args:
|
|
2245
|
-
|
|
2252
|
+
inputs: Array of extraction requests.
|
|
2246
2253
|
|
|
2247
|
-
Each object
|
|
2248
|
-
|
|
2254
|
+
Each object can include extraction parameters and
|
|
2255
|
+
async/storage settings.
|
|
2249
2256
|
|
|
2250
|
-
|
|
2251
|
-
|
|
2257
|
+
shared_inputs: Shared parameters applied to the entire batch. Can include extraction parameters
|
|
2258
|
+
and async/storage settings.
|
|
2252
2259
|
|
|
2253
2260
|
extra_headers: Send extra headers
|
|
2254
2261
|
|
|
@@ -2262,8 +2269,8 @@ class Nimble(SyncAPIClient):
|
|
|
2262
2269
|
"/v1/extract/batch",
|
|
2263
2270
|
body=maybe_transform(
|
|
2264
2271
|
{
|
|
2265
|
-
"
|
|
2266
|
-
"
|
|
2272
|
+
"inputs": inputs,
|
|
2273
|
+
"shared_inputs": shared_inputs,
|
|
2267
2274
|
},
|
|
2268
2275
|
client_extract_batch_params.ClientExtractBatchParams,
|
|
2269
2276
|
),
|
|
@@ -3331,6 +3338,12 @@ class AsyncNimble(AsyncAPIClient):
|
|
|
3331
3338
|
|
|
3332
3339
|
return AsyncTasksResource(self)
|
|
3333
3340
|
|
|
3341
|
+
@cached_property
|
|
3342
|
+
def batches(self) -> AsyncBatchesResource:
|
|
3343
|
+
from .resources.batches import AsyncBatchesResource
|
|
3344
|
+
|
|
3345
|
+
return AsyncBatchesResource(self)
|
|
3346
|
+
|
|
3334
3347
|
@cached_property
|
|
3335
3348
|
def with_raw_response(self) -> AsyncNimbleWithRawResponse:
|
|
3336
3349
|
return AsyncNimbleWithRawResponse(self)
|
|
@@ -3687,7 +3700,7 @@ class AsyncNimble(AsyncAPIClient):
|
|
|
3687
3700
|
device: Literal["desktop", "mobile", "tablet"] | Omit = omit,
|
|
3688
3701
|
driver: Literal["vx6", "vx8", "vx8-pro", "vx10", "vx10-pro", "vx12", "vx12-pro"] | Omit = omit,
|
|
3689
3702
|
expected_status_codes: Iterable[int] | Omit = omit,
|
|
3690
|
-
formats: List[Literal["html", "markdown", "screenshot"]] | Omit = omit,
|
|
3703
|
+
formats: List[Literal["html", "markdown", "screenshot", "headers"]] | Omit = omit,
|
|
3691
3704
|
headers: Dict[str, Union[str, SequenceNotStr[str], None]] | Omit = omit,
|
|
3692
3705
|
http2: bool | Omit = omit,
|
|
3693
3706
|
is_xhr: bool | Omit = omit,
|
|
@@ -4678,7 +4691,7 @@ class AsyncNimble(AsyncAPIClient):
|
|
|
4678
4691
|
device: Literal["desktop", "mobile", "tablet"] | Omit = omit,
|
|
4679
4692
|
driver: Literal["vx6", "vx8", "vx8-pro", "vx10", "vx10-pro", "vx12", "vx12-pro"] | Omit = omit,
|
|
4680
4693
|
expected_status_codes: Iterable[int] | Omit = omit,
|
|
4681
|
-
formats: List[Literal["html", "markdown", "screenshot"]] | Omit = omit,
|
|
4694
|
+
formats: List[Literal["html", "markdown", "screenshot", "headers"]] | Omit = omit,
|
|
4682
4695
|
headers: Dict[str, Union[str, SequenceNotStr[str], None]] | Omit = omit,
|
|
4683
4696
|
http2: bool | Omit = omit,
|
|
4684
4697
|
is_xhr: bool | Omit = omit,
|
|
@@ -5424,8 +5437,8 @@ class AsyncNimble(AsyncAPIClient):
|
|
|
5424
5437
|
async def extract_batch(
|
|
5425
5438
|
self,
|
|
5426
5439
|
*,
|
|
5427
|
-
|
|
5428
|
-
|
|
5440
|
+
inputs: Iterable[client_extract_batch_params.Input],
|
|
5441
|
+
shared_inputs: client_extract_batch_params.SharedInputs | Omit = omit,
|
|
5429
5442
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
5430
5443
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
5431
5444
|
extra_headers: Headers | None = None,
|
|
@@ -5436,13 +5449,13 @@ class AsyncNimble(AsyncAPIClient):
|
|
|
5436
5449
|
"""Extract Batch Endpoint
|
|
5437
5450
|
|
|
5438
5451
|
Args:
|
|
5439
|
-
|
|
5452
|
+
inputs: Array of extraction requests.
|
|
5440
5453
|
|
|
5441
|
-
Each object
|
|
5442
|
-
|
|
5454
|
+
Each object can include extraction parameters and
|
|
5455
|
+
async/storage settings.
|
|
5443
5456
|
|
|
5444
|
-
|
|
5445
|
-
|
|
5457
|
+
shared_inputs: Shared parameters applied to the entire batch. Can include extraction parameters
|
|
5458
|
+
and async/storage settings.
|
|
5446
5459
|
|
|
5447
5460
|
extra_headers: Send extra headers
|
|
5448
5461
|
|
|
@@ -5456,8 +5469,8 @@ class AsyncNimble(AsyncAPIClient):
|
|
|
5456
5469
|
"/v1/extract/batch",
|
|
5457
5470
|
body=await async_maybe_transform(
|
|
5458
5471
|
{
|
|
5459
|
-
"
|
|
5460
|
-
"
|
|
5472
|
+
"inputs": inputs,
|
|
5473
|
+
"shared_inputs": shared_inputs,
|
|
5461
5474
|
},
|
|
5462
5475
|
client_extract_batch_params.ClientExtractBatchParams,
|
|
5463
5476
|
),
|
|
@@ -6496,6 +6509,12 @@ class NimbleWithRawResponse:
|
|
|
6496
6509
|
|
|
6497
6510
|
return TasksResourceWithRawResponse(self._client.tasks)
|
|
6498
6511
|
|
|
6512
|
+
@cached_property
|
|
6513
|
+
def batches(self) -> batches.BatchesResourceWithRawResponse:
|
|
6514
|
+
from .resources.batches import BatchesResourceWithRawResponse
|
|
6515
|
+
|
|
6516
|
+
return BatchesResourceWithRawResponse(self._client.batches)
|
|
6517
|
+
|
|
6499
6518
|
|
|
6500
6519
|
class AsyncNimbleWithRawResponse:
|
|
6501
6520
|
_client: AsyncNimble
|
|
@@ -6537,6 +6556,12 @@ class AsyncNimbleWithRawResponse:
|
|
|
6537
6556
|
|
|
6538
6557
|
return AsyncTasksResourceWithRawResponse(self._client.tasks)
|
|
6539
6558
|
|
|
6559
|
+
@cached_property
|
|
6560
|
+
def batches(self) -> batches.AsyncBatchesResourceWithRawResponse:
|
|
6561
|
+
from .resources.batches import AsyncBatchesResourceWithRawResponse
|
|
6562
|
+
|
|
6563
|
+
return AsyncBatchesResourceWithRawResponse(self._client.batches)
|
|
6564
|
+
|
|
6540
6565
|
|
|
6541
6566
|
class NimbleWithStreamedResponse:
|
|
6542
6567
|
_client: Nimble
|
|
@@ -6578,6 +6603,12 @@ class NimbleWithStreamedResponse:
|
|
|
6578
6603
|
|
|
6579
6604
|
return TasksResourceWithStreamingResponse(self._client.tasks)
|
|
6580
6605
|
|
|
6606
|
+
@cached_property
|
|
6607
|
+
def batches(self) -> batches.BatchesResourceWithStreamingResponse:
|
|
6608
|
+
from .resources.batches import BatchesResourceWithStreamingResponse
|
|
6609
|
+
|
|
6610
|
+
return BatchesResourceWithStreamingResponse(self._client.batches)
|
|
6611
|
+
|
|
6581
6612
|
|
|
6582
6613
|
class AsyncNimbleWithStreamedResponse:
|
|
6583
6614
|
_client: AsyncNimble
|
|
@@ -6619,6 +6650,12 @@ class AsyncNimbleWithStreamedResponse:
|
|
|
6619
6650
|
|
|
6620
6651
|
return AsyncTasksResourceWithStreamingResponse(self._client.tasks)
|
|
6621
6652
|
|
|
6653
|
+
@cached_property
|
|
6654
|
+
def batches(self) -> batches.AsyncBatchesResourceWithStreamingResponse:
|
|
6655
|
+
from .resources.batches import AsyncBatchesResourceWithStreamingResponse
|
|
6656
|
+
|
|
6657
|
+
return AsyncBatchesResourceWithStreamingResponse(self._client.batches)
|
|
6658
|
+
|
|
6622
6659
|
|
|
6623
6660
|
Client = Nimble
|
|
6624
6661
|
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import re
|
|
4
|
+
from typing import (
|
|
5
|
+
Any,
|
|
6
|
+
Mapping,
|
|
7
|
+
Callable,
|
|
8
|
+
)
|
|
9
|
+
from urllib.parse import quote
|
|
10
|
+
|
|
11
|
+
# Matches '.' or '..' where each dot is either literal or percent-encoded (%2e / %2E).
|
|
12
|
+
_DOT_SEGMENT_RE = re.compile(r"^(?:\.|%2[eE]){1,2}$")
|
|
13
|
+
|
|
14
|
+
_PLACEHOLDER_RE = re.compile(r"\{(\w+)\}")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def _quote_path_segment_part(value: str) -> str:
|
|
18
|
+
"""Percent-encode `value` for use in a URI path segment.
|
|
19
|
+
|
|
20
|
+
Considers characters not in `pchar` set from RFC 3986 §3.3 to be unsafe.
|
|
21
|
+
https://datatracker.ietf.org/doc/html/rfc3986#section-3.3
|
|
22
|
+
"""
|
|
23
|
+
# quote() already treats unreserved characters (letters, digits, and -._~)
|
|
24
|
+
# as safe, so we only need to add sub-delims, ':', and '@'.
|
|
25
|
+
# Notably, unlike the default `safe` for quote(), / is unsafe and must be quoted.
|
|
26
|
+
return quote(value, safe="!$&'()*+,;=:@")
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def _quote_query_part(value: str) -> str:
|
|
30
|
+
"""Percent-encode `value` for use in a URI query string.
|
|
31
|
+
|
|
32
|
+
Considers &, = and characters not in `query` set from RFC 3986 §3.4 to be unsafe.
|
|
33
|
+
https://datatracker.ietf.org/doc/html/rfc3986#section-3.4
|
|
34
|
+
"""
|
|
35
|
+
return quote(value, safe="!$'()*+,;:@/?")
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def _quote_fragment_part(value: str) -> str:
|
|
39
|
+
"""Percent-encode `value` for use in a URI fragment.
|
|
40
|
+
|
|
41
|
+
Considers characters not in `fragment` set from RFC 3986 §3.5 to be unsafe.
|
|
42
|
+
https://datatracker.ietf.org/doc/html/rfc3986#section-3.5
|
|
43
|
+
"""
|
|
44
|
+
return quote(value, safe="!$&'()*+,;=:@/?")
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def _interpolate(
|
|
48
|
+
template: str,
|
|
49
|
+
values: Mapping[str, Any],
|
|
50
|
+
quoter: Callable[[str], str],
|
|
51
|
+
) -> str:
|
|
52
|
+
"""Replace {name} placeholders in `template`, quoting each value with `quoter`.
|
|
53
|
+
|
|
54
|
+
Placeholder names are looked up in `values`.
|
|
55
|
+
|
|
56
|
+
Raises:
|
|
57
|
+
KeyError: If a placeholder is not found in `values`.
|
|
58
|
+
"""
|
|
59
|
+
# re.split with a capturing group returns alternating
|
|
60
|
+
# [text, name, text, name, ..., text] elements.
|
|
61
|
+
parts = _PLACEHOLDER_RE.split(template)
|
|
62
|
+
|
|
63
|
+
for i in range(1, len(parts), 2):
|
|
64
|
+
name = parts[i]
|
|
65
|
+
if name not in values:
|
|
66
|
+
raise KeyError(f"a value for placeholder {{{name}}} was not provided")
|
|
67
|
+
val = values[name]
|
|
68
|
+
if val is None:
|
|
69
|
+
parts[i] = "null"
|
|
70
|
+
elif isinstance(val, bool):
|
|
71
|
+
parts[i] = "true" if val else "false"
|
|
72
|
+
else:
|
|
73
|
+
parts[i] = quoter(str(values[name]))
|
|
74
|
+
|
|
75
|
+
return "".join(parts)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def path_template(template: str, /, **kwargs: Any) -> str:
|
|
79
|
+
"""Interpolate {name} placeholders in `template` from keyword arguments.
|
|
80
|
+
|
|
81
|
+
Args:
|
|
82
|
+
template: The template string containing {name} placeholders.
|
|
83
|
+
**kwargs: Keyword arguments to interpolate into the template.
|
|
84
|
+
|
|
85
|
+
Returns:
|
|
86
|
+
The template with placeholders interpolated and percent-encoded.
|
|
87
|
+
|
|
88
|
+
Safe characters for percent-encoding are dependent on the URI component.
|
|
89
|
+
Placeholders in path and fragment portions are percent-encoded where the `segment`
|
|
90
|
+
and `fragment` sets from RFC 3986 respectively are considered safe.
|
|
91
|
+
Placeholders in the query portion are percent-encoded where the `query` set from
|
|
92
|
+
RFC 3986 §3.3 is considered safe except for = and & characters.
|
|
93
|
+
|
|
94
|
+
Raises:
|
|
95
|
+
KeyError: If a placeholder is not found in `kwargs`.
|
|
96
|
+
ValueError: If resulting path contains /./ or /../ segments (including percent-encoded dot-segments).
|
|
97
|
+
"""
|
|
98
|
+
# Split the template into path, query, and fragment portions.
|
|
99
|
+
fragment_template: str | None = None
|
|
100
|
+
query_template: str | None = None
|
|
101
|
+
|
|
102
|
+
rest = template
|
|
103
|
+
if "#" in rest:
|
|
104
|
+
rest, fragment_template = rest.split("#", 1)
|
|
105
|
+
if "?" in rest:
|
|
106
|
+
rest, query_template = rest.split("?", 1)
|
|
107
|
+
path_template = rest
|
|
108
|
+
|
|
109
|
+
# Interpolate each portion with the appropriate quoting rules.
|
|
110
|
+
path_result = _interpolate(path_template, kwargs, _quote_path_segment_part)
|
|
111
|
+
|
|
112
|
+
# Reject dot-segments (. and ..) in the final assembled path. The check
|
|
113
|
+
# runs after interpolation so that adjacent placeholders or a mix of static
|
|
114
|
+
# text and placeholders that together form a dot-segment are caught.
|
|
115
|
+
# Also reject percent-encoded dot-segments to protect against incorrectly
|
|
116
|
+
# implemented normalization in servers/proxies.
|
|
117
|
+
for segment in path_result.split("/"):
|
|
118
|
+
if _DOT_SEGMENT_RE.match(segment):
|
|
119
|
+
raise ValueError(f"Constructed path {path_result!r} contains dot-segment {segment!r} which is not allowed")
|
|
120
|
+
|
|
121
|
+
result = path_result
|
|
122
|
+
if query_template is not None:
|
|
123
|
+
result += "?" + _interpolate(query_template, kwargs, _quote_query_part)
|
|
124
|
+
if fragment_template is not None:
|
|
125
|
+
result += "#" + _interpolate(fragment_template, kwargs, _quote_fragment_part)
|
|
126
|
+
|
|
127
|
+
return result
|
|
@@ -24,6 +24,14 @@ from .tasks import (
|
|
|
24
24
|
TasksResourceWithStreamingResponse,
|
|
25
25
|
AsyncTasksResourceWithStreamingResponse,
|
|
26
26
|
)
|
|
27
|
+
from .batches import (
|
|
28
|
+
BatchesResource,
|
|
29
|
+
AsyncBatchesResource,
|
|
30
|
+
BatchesResourceWithRawResponse,
|
|
31
|
+
AsyncBatchesResourceWithRawResponse,
|
|
32
|
+
BatchesResourceWithStreamingResponse,
|
|
33
|
+
AsyncBatchesResourceWithStreamingResponse,
|
|
34
|
+
)
|
|
27
35
|
|
|
28
36
|
__all__ = [
|
|
29
37
|
"AgentResource",
|
|
@@ -44,4 +52,10 @@ __all__ = [
|
|
|
44
52
|
"AsyncTasksResourceWithRawResponse",
|
|
45
53
|
"TasksResourceWithStreamingResponse",
|
|
46
54
|
"AsyncTasksResourceWithStreamingResponse",
|
|
55
|
+
"BatchesResource",
|
|
56
|
+
"AsyncBatchesResource",
|
|
57
|
+
"BatchesResourceWithRawResponse",
|
|
58
|
+
"AsyncBatchesResourceWithRawResponse",
|
|
59
|
+
"BatchesResourceWithStreamingResponse",
|
|
60
|
+
"AsyncBatchesResourceWithStreamingResponse",
|
|
47
61
|
]
|
|
@@ -9,7 +9,7 @@ import httpx
|
|
|
9
9
|
|
|
10
10
|
from ..types import agent_run_params, agent_list_params, agent_run_async_params
|
|
11
11
|
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
12
|
-
from .._utils import maybe_transform, async_maybe_transform
|
|
12
|
+
from .._utils import path_template, maybe_transform, async_maybe_transform
|
|
13
13
|
from .._compat import cached_property
|
|
14
14
|
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
15
15
|
from .._response import (
|
|
@@ -131,7 +131,7 @@ class AgentResource(SyncAPIResource):
|
|
|
131
131
|
if not template_name:
|
|
132
132
|
raise ValueError(f"Expected a non-empty value for `template_name` but received {template_name!r}")
|
|
133
133
|
return self._get(
|
|
134
|
-
|
|
134
|
+
path_template("/v1/agents/{template_name}", template_name=template_name),
|
|
135
135
|
options=make_request_options(
|
|
136
136
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
137
137
|
),
|
|
@@ -345,7 +345,7 @@ class AsyncAgentResource(AsyncAPIResource):
|
|
|
345
345
|
if not template_name:
|
|
346
346
|
raise ValueError(f"Expected a non-empty value for `template_name` but received {template_name!r}")
|
|
347
347
|
return await self._get(
|
|
348
|
-
|
|
348
|
+
path_template("/v1/agents/{template_name}", template_name=template_name),
|
|
349
349
|
options=make_request_options(
|
|
350
350
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
351
351
|
),
|