nimble_python 0.12.0__tar.gz → 0.13.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.13.0}/.gitignore +1 -0
- nimble_python-0.13.0/.release-please-manifest.json +3 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/CHANGELOG.md +18 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/PKG-INFO +1 -1
- {nimble_python-0.12.0 → nimble_python-0.13.0}/api.md +14 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/pyproject.toml +1 -1
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/_client.py +38 -1
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/_utils/__init__.py +1 -0
- nimble_python-0.13.0/src/nimble_python/_utils/_path.py +127 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/_version.py +1 -1
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/resources/__init__.py +14 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/resources/agent.py +3 -3
- nimble_python-0.13.0/src/nimble_python/resources/batches.py +305 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/resources/crawl.py +5 -5
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/resources/tasks.py +5 -5
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/__init__.py +2 -0
- nimble_python-0.13.0/src/nimble_python/types/batch_get_response.py +82 -0
- nimble_python-0.13.0/src/nimble_python/types/batch_progress_response.py +29 -0
- nimble_python-0.13.0/tests/api_resources/test_batches.py +248 -0
- nimble_python-0.13.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 → nimble_python-0.13.0}/CONTRIBUTING.md +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/LICENSE +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/README.md +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/SECURITY.md +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/bin/check-release-environment +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/bin/publish-pypi +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/examples/.keep +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/release-please-config.json +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/requirements-dev.lock +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/__init__.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/_base_client.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/_compat.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/_constants.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/_exceptions.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/_files.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/_models.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/_qs.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/_resource.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/_streaming.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/_types.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/_utils/_compat.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/_utils/_datetime_parse.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/_utils/_json.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/_utils/_logs.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/_utils/_proxy.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/_utils/_reflection.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/_utils/_resources_proxy.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/_utils/_streams.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/_utils/_sync.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/_utils/_transform.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/_utils/_typing.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/_utils/_utils.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/lib/.keep +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/py.typed +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/agent_get_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/agent_list_params.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/agent_list_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/agent_run_async_params.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/agent_run_async_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/agent_run_params.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/agent_run_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/client_extract_async_params.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/client_extract_batch_params.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/client_extract_params.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/client_map_params.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/client_search_params.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/crawl_list_params.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/crawl_list_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/crawl_run_params.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/crawl_run_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/crawl_status_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/crawl_terminate_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/extract_async_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/extract_batch_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/extract_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/map_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/search_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/shared/__init__.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/shared/auto_scroll_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/shared/click_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/shared/eval_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/shared/fetch_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/shared/fill_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/shared/get_cookies_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/shared/goto_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/shared/press_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/shared/screenshot_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/shared/scroll_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/shared/wait_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/shared/wait_for_element_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/shared/wait_for_navigation_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/shared_params/__init__.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/shared_params/auto_scroll_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/shared_params/click_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/shared_params/eval_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/shared_params/fetch_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/shared_params/fill_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/shared_params/get_cookies_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/shared_params/goto_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/shared_params/press_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/shared_params/screenshot_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/shared_params/scroll_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/shared_params/wait_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/shared_params/wait_for_element_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/shared_params/wait_for_navigation_action.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/task_get_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/task_list_params.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/task_list_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimble_python/types/task_results_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/src/nimbleway/lib/.keep +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/tests/__init__.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/tests/api_resources/__init__.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/tests/api_resources/test_agent.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/tests/api_resources/test_client.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/tests/api_resources/test_crawl.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/tests/api_resources/test_tasks.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/tests/conftest.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/tests/sample_file.txt +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/tests/test_client.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/tests/test_deepcopy.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/tests/test_extract_files.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/tests/test_files.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/tests/test_models.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/tests/test_qs.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/tests/test_required_args.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/tests/test_response.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/tests/test_streaming.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/tests/test_transform.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/tests/test_utils/test_datetime_parse.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/tests/test_utils/test_json.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/tests/test_utils/test_proxy.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/tests/test_utils/test_typing.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/tests/utils.py +0 -0
- {nimble_python-0.12.0 → nimble_python-0.13.0}/uv.lock +0 -0
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.13.0 (2026-03-24)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.12.0...v0.13.0](https://github.com/Nimbleway/nimble-python/compare/v0.12.0...v0.13.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** manual updates ([17e730d](https://github.com/Nimbleway/nimble-python/commit/17e730d1f09b8cead6fa11cb68af9d8105dc57df))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* sanitize endpoint path params ([0c14c30](https://github.com/Nimbleway/nimble-python/commit/0c14c308e068da0c00affd197abb5ddd3b7f8ca2))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Chores
|
|
18
|
+
|
|
19
|
+
* **internal:** update gitignore ([f19a4e6](https://github.com/Nimbleway/nimble-python/commit/f19a4e6cea6039638d95e8b5f8d136a34149c63d))
|
|
20
|
+
|
|
3
21
|
## 0.12.0 (2026-03-18)
|
|
4
22
|
|
|
5
23
|
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.13.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)
|
|
@@ -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)
|
|
@@ -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
|
),
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from .._types import Body, Query, Headers, NoneType, NotGiven, not_given
|
|
8
|
+
from .._utils import path_template
|
|
9
|
+
from .._compat import cached_property
|
|
10
|
+
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
11
|
+
from .._response import (
|
|
12
|
+
to_raw_response_wrapper,
|
|
13
|
+
to_streamed_response_wrapper,
|
|
14
|
+
async_to_raw_response_wrapper,
|
|
15
|
+
async_to_streamed_response_wrapper,
|
|
16
|
+
)
|
|
17
|
+
from .._base_client import make_request_options
|
|
18
|
+
from ..types.batch_get_response import BatchGetResponse
|
|
19
|
+
from ..types.batch_progress_response import BatchProgressResponse
|
|
20
|
+
|
|
21
|
+
__all__ = ["BatchesResource", "AsyncBatchesResource"]
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class BatchesResource(SyncAPIResource):
|
|
25
|
+
@cached_property
|
|
26
|
+
def with_raw_response(self) -> BatchesResourceWithRawResponse:
|
|
27
|
+
"""
|
|
28
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
29
|
+
the raw response object instead of the parsed content.
|
|
30
|
+
|
|
31
|
+
For more information, see https://www.github.com/Nimbleway/nimble-python#accessing-raw-response-data-eg-headers
|
|
32
|
+
"""
|
|
33
|
+
return BatchesResourceWithRawResponse(self)
|
|
34
|
+
|
|
35
|
+
@cached_property
|
|
36
|
+
def with_streaming_response(self) -> BatchesResourceWithStreamingResponse:
|
|
37
|
+
"""
|
|
38
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
39
|
+
|
|
40
|
+
For more information, see https://www.github.com/Nimbleway/nimble-python#with_streaming_response
|
|
41
|
+
"""
|
|
42
|
+
return BatchesResourceWithStreamingResponse(self)
|
|
43
|
+
|
|
44
|
+
def list(
|
|
45
|
+
self,
|
|
46
|
+
*,
|
|
47
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
48
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
49
|
+
extra_headers: Headers | None = None,
|
|
50
|
+
extra_query: Query | None = None,
|
|
51
|
+
extra_body: Body | None = None,
|
|
52
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
53
|
+
) -> None:
|
|
54
|
+
"""Retrieve a paginated list of batches for the authenticated account."""
|
|
55
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
56
|
+
return self._get(
|
|
57
|
+
"/v1/batches",
|
|
58
|
+
options=make_request_options(
|
|
59
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
60
|
+
),
|
|
61
|
+
cast_to=NoneType,
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
def get(
|
|
65
|
+
self,
|
|
66
|
+
batch_id: str,
|
|
67
|
+
*,
|
|
68
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
69
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
70
|
+
extra_headers: Headers | None = None,
|
|
71
|
+
extra_query: Query | None = None,
|
|
72
|
+
extra_body: Body | None = None,
|
|
73
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
74
|
+
) -> BatchGetResponse:
|
|
75
|
+
"""
|
|
76
|
+
Retrieve the details of a batch including all its tasks and completion status.
|
|
77
|
+
|
|
78
|
+
Args:
|
|
79
|
+
batch_id: The unique identifier of the batch.
|
|
80
|
+
|
|
81
|
+
extra_headers: Send extra headers
|
|
82
|
+
|
|
83
|
+
extra_query: Add additional query parameters to the request
|
|
84
|
+
|
|
85
|
+
extra_body: Add additional JSON properties to the request
|
|
86
|
+
|
|
87
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
88
|
+
"""
|
|
89
|
+
if not batch_id:
|
|
90
|
+
raise ValueError(f"Expected a non-empty value for `batch_id` but received {batch_id!r}")
|
|
91
|
+
return self._get(
|
|
92
|
+
path_template("/v1/batches/{batch_id}", batch_id=batch_id),
|
|
93
|
+
options=make_request_options(
|
|
94
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
95
|
+
),
|
|
96
|
+
cast_to=BatchGetResponse,
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
def progress(
|
|
100
|
+
self,
|
|
101
|
+
batch_id: str,
|
|
102
|
+
*,
|
|
103
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
104
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
105
|
+
extra_headers: Headers | None = None,
|
|
106
|
+
extra_query: Query | None = None,
|
|
107
|
+
extra_body: Body | None = None,
|
|
108
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
109
|
+
) -> BatchProgressResponse:
|
|
110
|
+
"""
|
|
111
|
+
Retrieve lightweight progress information for a batch without fetching all task
|
|
112
|
+
details.
|
|
113
|
+
|
|
114
|
+
Args:
|
|
115
|
+
batch_id: The unique identifier of the batch.
|
|
116
|
+
|
|
117
|
+
extra_headers: Send extra headers
|
|
118
|
+
|
|
119
|
+
extra_query: Add additional query parameters to the request
|
|
120
|
+
|
|
121
|
+
extra_body: Add additional JSON properties to the request
|
|
122
|
+
|
|
123
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
124
|
+
"""
|
|
125
|
+
if not batch_id:
|
|
126
|
+
raise ValueError(f"Expected a non-empty value for `batch_id` but received {batch_id!r}")
|
|
127
|
+
return self._get(
|
|
128
|
+
path_template("/v1/batches/{batch_id}/progress", batch_id=batch_id),
|
|
129
|
+
options=make_request_options(
|
|
130
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
131
|
+
),
|
|
132
|
+
cast_to=BatchProgressResponse,
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
class AsyncBatchesResource(AsyncAPIResource):
|
|
137
|
+
@cached_property
|
|
138
|
+
def with_raw_response(self) -> AsyncBatchesResourceWithRawResponse:
|
|
139
|
+
"""
|
|
140
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
141
|
+
the raw response object instead of the parsed content.
|
|
142
|
+
|
|
143
|
+
For more information, see https://www.github.com/Nimbleway/nimble-python#accessing-raw-response-data-eg-headers
|
|
144
|
+
"""
|
|
145
|
+
return AsyncBatchesResourceWithRawResponse(self)
|
|
146
|
+
|
|
147
|
+
@cached_property
|
|
148
|
+
def with_streaming_response(self) -> AsyncBatchesResourceWithStreamingResponse:
|
|
149
|
+
"""
|
|
150
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
151
|
+
|
|
152
|
+
For more information, see https://www.github.com/Nimbleway/nimble-python#with_streaming_response
|
|
153
|
+
"""
|
|
154
|
+
return AsyncBatchesResourceWithStreamingResponse(self)
|
|
155
|
+
|
|
156
|
+
async def list(
|
|
157
|
+
self,
|
|
158
|
+
*,
|
|
159
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
160
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
161
|
+
extra_headers: Headers | None = None,
|
|
162
|
+
extra_query: Query | None = None,
|
|
163
|
+
extra_body: Body | None = None,
|
|
164
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
165
|
+
) -> None:
|
|
166
|
+
"""Retrieve a paginated list of batches for the authenticated account."""
|
|
167
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
168
|
+
return await self._get(
|
|
169
|
+
"/v1/batches",
|
|
170
|
+
options=make_request_options(
|
|
171
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
172
|
+
),
|
|
173
|
+
cast_to=NoneType,
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
async def get(
|
|
177
|
+
self,
|
|
178
|
+
batch_id: str,
|
|
179
|
+
*,
|
|
180
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
181
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
182
|
+
extra_headers: Headers | None = None,
|
|
183
|
+
extra_query: Query | None = None,
|
|
184
|
+
extra_body: Body | None = None,
|
|
185
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
186
|
+
) -> BatchGetResponse:
|
|
187
|
+
"""
|
|
188
|
+
Retrieve the details of a batch including all its tasks and completion status.
|
|
189
|
+
|
|
190
|
+
Args:
|
|
191
|
+
batch_id: The unique identifier of the batch.
|
|
192
|
+
|
|
193
|
+
extra_headers: Send extra headers
|
|
194
|
+
|
|
195
|
+
extra_query: Add additional query parameters to the request
|
|
196
|
+
|
|
197
|
+
extra_body: Add additional JSON properties to the request
|
|
198
|
+
|
|
199
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
200
|
+
"""
|
|
201
|
+
if not batch_id:
|
|
202
|
+
raise ValueError(f"Expected a non-empty value for `batch_id` but received {batch_id!r}")
|
|
203
|
+
return await self._get(
|
|
204
|
+
path_template("/v1/batches/{batch_id}", batch_id=batch_id),
|
|
205
|
+
options=make_request_options(
|
|
206
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
207
|
+
),
|
|
208
|
+
cast_to=BatchGetResponse,
|
|
209
|
+
)
|
|
210
|
+
|
|
211
|
+
async def progress(
|
|
212
|
+
self,
|
|
213
|
+
batch_id: str,
|
|
214
|
+
*,
|
|
215
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
216
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
217
|
+
extra_headers: Headers | None = None,
|
|
218
|
+
extra_query: Query | None = None,
|
|
219
|
+
extra_body: Body | None = None,
|
|
220
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
221
|
+
) -> BatchProgressResponse:
|
|
222
|
+
"""
|
|
223
|
+
Retrieve lightweight progress information for a batch without fetching all task
|
|
224
|
+
details.
|
|
225
|
+
|
|
226
|
+
Args:
|
|
227
|
+
batch_id: The unique identifier of the batch.
|
|
228
|
+
|
|
229
|
+
extra_headers: Send extra headers
|
|
230
|
+
|
|
231
|
+
extra_query: Add additional query parameters to the request
|
|
232
|
+
|
|
233
|
+
extra_body: Add additional JSON properties to the request
|
|
234
|
+
|
|
235
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
236
|
+
"""
|
|
237
|
+
if not batch_id:
|
|
238
|
+
raise ValueError(f"Expected a non-empty value for `batch_id` but received {batch_id!r}")
|
|
239
|
+
return await self._get(
|
|
240
|
+
path_template("/v1/batches/{batch_id}/progress", batch_id=batch_id),
|
|
241
|
+
options=make_request_options(
|
|
242
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
243
|
+
),
|
|
244
|
+
cast_to=BatchProgressResponse,
|
|
245
|
+
)
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
class BatchesResourceWithRawResponse:
|
|
249
|
+
def __init__(self, batches: BatchesResource) -> None:
|
|
250
|
+
self._batches = batches
|
|
251
|
+
|
|
252
|
+
self.list = to_raw_response_wrapper(
|
|
253
|
+
batches.list,
|
|
254
|
+
)
|
|
255
|
+
self.get = to_raw_response_wrapper(
|
|
256
|
+
batches.get,
|
|
257
|
+
)
|
|
258
|
+
self.progress = to_raw_response_wrapper(
|
|
259
|
+
batches.progress,
|
|
260
|
+
)
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
class AsyncBatchesResourceWithRawResponse:
|
|
264
|
+
def __init__(self, batches: AsyncBatchesResource) -> None:
|
|
265
|
+
self._batches = batches
|
|
266
|
+
|
|
267
|
+
self.list = async_to_raw_response_wrapper(
|
|
268
|
+
batches.list,
|
|
269
|
+
)
|
|
270
|
+
self.get = async_to_raw_response_wrapper(
|
|
271
|
+
batches.get,
|
|
272
|
+
)
|
|
273
|
+
self.progress = async_to_raw_response_wrapper(
|
|
274
|
+
batches.progress,
|
|
275
|
+
)
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
class BatchesResourceWithStreamingResponse:
|
|
279
|
+
def __init__(self, batches: BatchesResource) -> None:
|
|
280
|
+
self._batches = batches
|
|
281
|
+
|
|
282
|
+
self.list = to_streamed_response_wrapper(
|
|
283
|
+
batches.list,
|
|
284
|
+
)
|
|
285
|
+
self.get = to_streamed_response_wrapper(
|
|
286
|
+
batches.get,
|
|
287
|
+
)
|
|
288
|
+
self.progress = to_streamed_response_wrapper(
|
|
289
|
+
batches.progress,
|
|
290
|
+
)
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
class AsyncBatchesResourceWithStreamingResponse:
|
|
294
|
+
def __init__(self, batches: AsyncBatchesResource) -> None:
|
|
295
|
+
self._batches = batches
|
|
296
|
+
|
|
297
|
+
self.list = async_to_streamed_response_wrapper(
|
|
298
|
+
batches.list,
|
|
299
|
+
)
|
|
300
|
+
self.get = async_to_streamed_response_wrapper(
|
|
301
|
+
batches.get,
|
|
302
|
+
)
|
|
303
|
+
self.progress = async_to_streamed_response_wrapper(
|
|
304
|
+
batches.progress,
|
|
305
|
+
)
|