runloop-api-client 0.1.0a11__tar.gz → 0.1.0a13__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.
- runloop_api_client-0.1.0a13/.release-please-manifest.json +3 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/CHANGELOG.md +37 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/PKG-INFO +2 -2
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/README.md +1 -1
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/api.md +2 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/pyproject.toml +5 -3
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/_base_client.py +2 -2
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/_constants.py +3 -3
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/_version.py +1 -1
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/resources/devboxes/devboxes.py +113 -2
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/resources/functions/invocations.py +2 -2
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/__init__.py +1 -0
- runloop_api_client-0.1.0a13/src/runloop_api_client/types/devbox_upload_file_params.py +15 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/functions/invocation_list_params.py +1 -1
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/tests/api_resources/functions/test_invocations.py +2 -2
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/tests/api_resources/test_devboxes.py +96 -2
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/tests/test_client.py +26 -26
- runloop_api_client-0.1.0a11/.release-please-manifest.json +0 -3
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/.gitignore +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/CONTRIBUTING.md +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/LICENSE +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/SECURITY.md +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/bin/check-release-environment +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/bin/publish-pypi +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/examples/.keep +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/mypy.ini +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/noxfile.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/release-please-config.json +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/requirements-dev.lock +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/requirements.lock +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop/lib/.keep +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/__init__.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/_client.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/_compat.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/_exceptions.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/_files.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/_models.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/_qs.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/_resource.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/_response.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/_streaming.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/_types.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/_utils/__init__.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/_utils/_logs.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/_utils/_proxy.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/_utils/_reflection.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/_utils/_streams.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/_utils/_sync.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/_utils/_transform.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/_utils/_typing.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/_utils/_utils.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/lib/.keep +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/py.typed +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/resources/__init__.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/resources/blueprints.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/resources/devboxes/__init__.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/resources/devboxes/logs.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/resources/functions/__init__.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/resources/functions/functions.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/resources/projects/__init__.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/resources/projects/logs.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/resources/projects/projects.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/blueprint_build_log.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/blueprint_build_logs_list_view.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/blueprint_build_parameters.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/blueprint_create_params.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/blueprint_list_params.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/blueprint_list_view.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/blueprint_preview_params.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/blueprint_preview_view.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/blueprint_view.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/code_mount_parameters.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/code_mount_parameters_param.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/devbox_create_params.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/devbox_execute_sync_params.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/devbox_execution_detail_view.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/devbox_list_params.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/devbox_list_view.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/devbox_read_file_contents_params.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/devbox_read_file_contents_response.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/devbox_read_file_params.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/devbox_view.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/devbox_write_file_params.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/devboxes/__init__.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/devboxes/devbox_logs_list_view.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/function_invoke_async_params.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/function_invoke_sync_params.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/function_list_view.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/functions/__init__.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/functions/function_invocation_list_view.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/project_list_view.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/projects/__init__.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/resource_size.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/shared/__init__.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/shared/function_invocation_execution_detail_view.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/shared/project_logs_view.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/tests/__init__.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/tests/api_resources/__init__.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/tests/api_resources/devboxes/__init__.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/tests/api_resources/devboxes/test_logs.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/tests/api_resources/functions/__init__.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/tests/api_resources/projects/__init__.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/tests/api_resources/projects/test_logs.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/tests/api_resources/test_blueprints.py +28 -28
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/tests/api_resources/test_functions.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/tests/api_resources/test_projects.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/tests/conftest.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/tests/sample_file.txt +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/tests/test_deepcopy.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/tests/test_extract_files.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/tests/test_files.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/tests/test_models.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/tests/test_qs.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/tests/test_required_args.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/tests/test_response.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/tests/test_streaming.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/tests/test_transform.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/tests/test_utils/test_proxy.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/tests/test_utils/test_typing.py +0 -0
- {runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/tests/utils.py +0 -0
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.13 (2024-08-16)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.1.0-alpha.12...v0.1.0-alpha.13](https://github.com/runloopai/api-client-python/compare/v0.1.0-alpha.12...v0.1.0-alpha.13)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** OpenAPI spec update via Stainless API ([#100](https://github.com/runloopai/api-client-python/issues/100)) ([772cfa1](https://github.com/runloopai/api-client-python/commit/772cfa19fb0c666540b39613ca1fc4a22bdffe82))
|
|
10
|
+
* **api:** OpenAPI spec update via Stainless API ([#101](https://github.com/runloopai/api-client-python/issues/101)) ([a0841a4](https://github.com/runloopai/api-client-python/commit/a0841a410113bc784cca786a2774aea67c9f3a58))
|
|
11
|
+
* **api:** OpenAPI spec update via Stainless API ([#102](https://github.com/runloopai/api-client-python/issues/102)) ([158d661](https://github.com/runloopai/api-client-python/commit/158d661d90493597b1500b6ef4cfcfe6b7fa6d30))
|
|
12
|
+
* **api:** OpenAPI spec update via Stainless API ([#96](https://github.com/runloopai/api-client-python/issues/96)) ([fb6dd1d](https://github.com/runloopai/api-client-python/commit/fb6dd1d4c536f0c518c6399ec543ea92162782ff))
|
|
13
|
+
* **api:** OpenAPI spec update via Stainless API ([#98](https://github.com/runloopai/api-client-python/issues/98)) ([0d77cac](https://github.com/runloopai/api-client-python/commit/0d77cacb4b4c582826b9772a287cced25b1210bf))
|
|
14
|
+
* **api:** OpenAPI spec update via Stainless API ([#99](https://github.com/runloopai/api-client-python/issues/99)) ([081978b](https://github.com/runloopai/api-client-python/commit/081978b3867fe873b52ea475cbe6e69e50448e51))
|
|
15
|
+
|
|
16
|
+
## 0.1.0-alpha.12 (2024-08-15)
|
|
17
|
+
|
|
18
|
+
Full Changelog: [v0.1.0-alpha.11...v0.1.0-alpha.12](https://github.com/runloopai/api-client-python/compare/v0.1.0-alpha.11...v0.1.0-alpha.12)
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **api:** OpenAPI spec update via Stainless API ([#83](https://github.com/runloopai/api-client-python/issues/83)) ([df99a13](https://github.com/runloopai/api-client-python/commit/df99a130b3dbbba6b122a65bc9c822b6d589ca26))
|
|
23
|
+
* **api:** OpenAPI spec update via Stainless API ([#88](https://github.com/runloopai/api-client-python/issues/88)) ([a8882d4](https://github.com/runloopai/api-client-python/commit/a8882d440edc71f2922e2fa2dff3d0f0b080eb35))
|
|
24
|
+
* **api:** OpenAPI spec update via Stainless API ([#89](https://github.com/runloopai/api-client-python/issues/89)) ([a8b5d6a](https://github.com/runloopai/api-client-python/commit/a8b5d6a94d38bc593b8ca48014dcba17c783d297))
|
|
25
|
+
* **api:** OpenAPI spec update via Stainless API ([#90](https://github.com/runloopai/api-client-python/issues/90)) ([dc4b13c](https://github.com/runloopai/api-client-python/commit/dc4b13cd4d4fa17f203626e88187f8784ecbac6f))
|
|
26
|
+
* **api:** OpenAPI spec update via Stainless API ([#93](https://github.com/runloopai/api-client-python/issues/93)) ([d6ba90f](https://github.com/runloopai/api-client-python/commit/d6ba90fa6af62f376578aa14a5b50e759fc30898))
|
|
27
|
+
* **api:** update via SDK Studio ([#91](https://github.com/runloopai/api-client-python/issues/91)) ([612ce32](https://github.com/runloopai/api-client-python/commit/612ce3279298c1158ce963471cd6d53b4a822718))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Chores
|
|
31
|
+
|
|
32
|
+
* **ci:** bump prism mock server version ([#85](https://github.com/runloopai/api-client-python/issues/85)) ([ff2c8dd](https://github.com/runloopai/api-client-python/commit/ff2c8ddeaec8bfaa9ebd71886126f02ede9bb2db))
|
|
33
|
+
* **ci:** minor changes ([#84](https://github.com/runloopai/api-client-python/issues/84)) ([32f527f](https://github.com/runloopai/api-client-python/commit/32f527f1802bfc63c2156ad7eefd7773a007f501))
|
|
34
|
+
* **examples:** minor formatting changes ([#87](https://github.com/runloopai/api-client-python/issues/87)) ([64c9bd5](https://github.com/runloopai/api-client-python/commit/64c9bd5c499d56772028679aa974eac5e78c3b15))
|
|
35
|
+
* **internal:** codegen related update ([#92](https://github.com/runloopai/api-client-python/issues/92)) ([0c34d9a](https://github.com/runloopai/api-client-python/commit/0c34d9a7a296d0e0fd4626b6f9629ff737e61590))
|
|
36
|
+
* **internal:** ensure package is importable in lint cmd ([#86](https://github.com/runloopai/api-client-python/issues/86)) ([ecf2a95](https://github.com/runloopai/api-client-python/commit/ecf2a95f550db94d2d16ea3774bd9c9bea42b3a4))
|
|
37
|
+
* **internal:** remove deprecated ruff config ([#81](https://github.com/runloopai/api-client-python/issues/81)) ([2916f9f](https://github.com/runloopai/api-client-python/commit/2916f9fdc0b19758767e5c93875e14cc3bce4049))
|
|
38
|
+
* **internal:** use different 32bit detection method ([#94](https://github.com/runloopai/api-client-python/issues/94)) ([cf748e3](https://github.com/runloopai/api-client-python/commit/cf748e337f3e1f443be098c1b0e72e3c321815c6))
|
|
39
|
+
|
|
3
40
|
## 0.1.0-alpha.11 (2024-08-07)
|
|
4
41
|
|
|
5
42
|
Full Changelog: [v0.1.0-alpha.10...v0.1.0-alpha.11](https://github.com/runloopai/api-client-python/compare/v0.1.0-alpha.10...v0.1.0-alpha.11)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: runloop_api_client
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.0a13
|
|
4
4
|
Summary: The official Python library for the runloop API
|
|
5
5
|
Project-URL: Homepage, https://github.com/runloopai/api-client-python
|
|
6
6
|
Project-URL: Repository, https://github.com/runloopai/api-client-python
|
|
@@ -152,7 +152,7 @@ Error codes are as followed:
|
|
|
152
152
|
|
|
153
153
|
### Retries
|
|
154
154
|
|
|
155
|
-
Certain errors are automatically retried
|
|
155
|
+
Certain errors are automatically retried 0 times by default, with a short exponential backoff.
|
|
156
156
|
Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
|
|
157
157
|
429 Rate Limit, and >=500 Internal errors are all retried by default.
|
|
158
158
|
|
|
@@ -118,7 +118,7 @@ Error codes are as followed:
|
|
|
118
118
|
|
|
119
119
|
### Retries
|
|
120
120
|
|
|
121
|
-
Certain errors are automatically retried
|
|
121
|
+
Certain errors are automatically retried 0 times by default, with a short exponential backoff.
|
|
122
122
|
Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
|
|
123
123
|
429 Rate Limit, and >=500 Internal errors are all retried by default.
|
|
124
124
|
|
|
@@ -53,6 +53,7 @@ from runloop_api_client.types import (
|
|
|
53
53
|
DevboxListView,
|
|
54
54
|
DevboxView,
|
|
55
55
|
DevboxReadFileContentsResponse,
|
|
56
|
+
DevboxUploadFileResponse,
|
|
56
57
|
)
|
|
57
58
|
```
|
|
58
59
|
|
|
@@ -65,6 +66,7 @@ Methods:
|
|
|
65
66
|
- <code title="post /v1/devboxes/{id}/read_file">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">read_file</a>(id, \*\*<a href="src/runloop_api_client/types/devbox_read_file_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_execution_detail_view.py">DevboxExecutionDetailView</a></code>
|
|
66
67
|
- <code title="post /v1/devboxes/{id}/read_file_contents">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">read_file_contents</a>(id, \*\*<a href="src/runloop_api_client/types/devbox_read_file_contents_params.py">params</a>) -> str</code>
|
|
67
68
|
- <code title="post /v1/devboxes/{id}/shutdown">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">shutdown</a>(id) -> <a href="./src/runloop_api_client/types/devbox_view.py">DevboxView</a></code>
|
|
69
|
+
- <code title="post /v1/devboxes/{id}/upload_file">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">upload_file</a>(id, \*\*<a href="src/runloop_api_client/types/devbox_upload_file_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_upload_file_response.py">object</a></code>
|
|
68
70
|
- <code title="post /v1/devboxes/{id}/write_file">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">write_file</a>(id, \*\*<a href="src/runloop_api_client/types/devbox_write_file_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_execution_detail_view.py">DevboxExecutionDetailView</a></code>
|
|
69
71
|
|
|
70
72
|
## Logs
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "runloop_api_client"
|
|
3
|
-
version = "0.1.0-alpha.
|
|
3
|
+
version = "0.1.0-alpha.13"
|
|
4
4
|
description = "The official Python library for the runloop API"
|
|
5
5
|
dynamic = ["readme"]
|
|
6
6
|
license = "MIT"
|
|
@@ -76,10 +76,13 @@ format = { chain = [
|
|
|
76
76
|
"lint" = { chain = [
|
|
77
77
|
"check:ruff",
|
|
78
78
|
"typecheck",
|
|
79
|
+
"check:importable",
|
|
79
80
|
]}
|
|
80
81
|
"check:ruff" = "ruff check ."
|
|
81
82
|
"fix:ruff" = "ruff check --fix ."
|
|
82
83
|
|
|
84
|
+
"check:importable" = "python -c 'import runloop_api_client'"
|
|
85
|
+
|
|
83
86
|
typecheck = { chain = [
|
|
84
87
|
"typecheck:pyright",
|
|
85
88
|
"typecheck:mypy"
|
|
@@ -195,7 +198,6 @@ unfixable = [
|
|
|
195
198
|
"T201",
|
|
196
199
|
"T203",
|
|
197
200
|
]
|
|
198
|
-
ignore-init-module-imports = true
|
|
199
201
|
|
|
200
202
|
[tool.ruff.lint.flake8-tidy-imports.banned-api]
|
|
201
203
|
"functools.lru_cache".msg = "This function does not retain type information for the wrapped function's arguments; The `lru_cache` function from `_utils` should be used instead"
|
|
@@ -207,7 +209,7 @@ combine-as-imports = true
|
|
|
207
209
|
extra-standard-library = ["typing_extensions"]
|
|
208
210
|
known-first-party = ["runloop_api_client", "tests"]
|
|
209
211
|
|
|
210
|
-
[tool.ruff.per-file-ignores]
|
|
212
|
+
[tool.ruff.lint.per-file-ignores]
|
|
211
213
|
"bin/**.py" = ["T201", "T203"]
|
|
212
214
|
"scripts/**.py" = ["T201", "T203"]
|
|
213
215
|
"tests/**.py" = ["T201", "T203"]
|
{runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/_base_client.py
RENAMED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
import sys
|
|
3
4
|
import json
|
|
4
5
|
import time
|
|
5
6
|
import uuid
|
|
@@ -1982,7 +1983,6 @@ def get_python_version() -> str:
|
|
|
1982
1983
|
|
|
1983
1984
|
def get_architecture() -> Arch:
|
|
1984
1985
|
try:
|
|
1985
|
-
python_bitness, _ = platform.architecture()
|
|
1986
1986
|
machine = platform.machine().lower()
|
|
1987
1987
|
except Exception:
|
|
1988
1988
|
return "unknown"
|
|
@@ -1998,7 +1998,7 @@ def get_architecture() -> Arch:
|
|
|
1998
1998
|
return "x64"
|
|
1999
1999
|
|
|
2000
2000
|
# TODO: untested
|
|
2001
|
-
if
|
|
2001
|
+
if sys.maxsize <= 2**32:
|
|
2002
2002
|
return "x32"
|
|
2003
2003
|
|
|
2004
2004
|
if machine:
|
{runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/_constants.py
RENAMED
|
@@ -7,8 +7,8 @@ OVERRIDE_CAST_TO_HEADER = "____stainless_override_cast_to"
|
|
|
7
7
|
|
|
8
8
|
# default timeout is 1 minute
|
|
9
9
|
DEFAULT_TIMEOUT = httpx.Timeout(timeout=60.0, connect=5.0)
|
|
10
|
-
DEFAULT_MAX_RETRIES =
|
|
10
|
+
DEFAULT_MAX_RETRIES = 0
|
|
11
11
|
DEFAULT_CONNECTION_LIMITS = httpx.Limits(max_connections=100, max_keepalive_connections=20)
|
|
12
12
|
|
|
13
|
-
INITIAL_RETRY_DELAY = 0
|
|
14
|
-
MAX_RETRY_DELAY =
|
|
13
|
+
INITIAL_RETRY_DELAY = 1.0
|
|
14
|
+
MAX_RETRY_DELAY = 5.0
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Dict, List
|
|
5
|
+
from typing import Dict, List, Mapping, cast
|
|
6
6
|
|
|
7
7
|
import httpx
|
|
8
8
|
|
|
@@ -19,12 +19,15 @@ from ...types import (
|
|
|
19
19
|
devbox_create_params,
|
|
20
20
|
devbox_read_file_params,
|
|
21
21
|
devbox_write_file_params,
|
|
22
|
+
devbox_upload_file_params,
|
|
22
23
|
devbox_execute_sync_params,
|
|
23
24
|
devbox_read_file_contents_params,
|
|
24
25
|
)
|
|
25
|
-
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
26
|
+
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes
|
|
26
27
|
from ..._utils import (
|
|
28
|
+
extract_files,
|
|
27
29
|
maybe_transform,
|
|
30
|
+
deepcopy_minimal,
|
|
28
31
|
async_maybe_transform,
|
|
29
32
|
)
|
|
30
33
|
from ..._compat import cached_property
|
|
@@ -365,6 +368,54 @@ class DevboxesResource(SyncAPIResource):
|
|
|
365
368
|
cast_to=DevboxView,
|
|
366
369
|
)
|
|
367
370
|
|
|
371
|
+
def upload_file(
|
|
372
|
+
self,
|
|
373
|
+
id: str,
|
|
374
|
+
*,
|
|
375
|
+
file: FileTypes | NotGiven = NOT_GIVEN,
|
|
376
|
+
path: str | NotGiven = NOT_GIVEN,
|
|
377
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
378
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
379
|
+
extra_headers: Headers | None = None,
|
|
380
|
+
extra_query: Query | None = None,
|
|
381
|
+
extra_body: Body | None = None,
|
|
382
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
383
|
+
) -> object:
|
|
384
|
+
"""
|
|
385
|
+
Upload file contents to a file at path on the Devbox.
|
|
386
|
+
|
|
387
|
+
Args:
|
|
388
|
+
extra_headers: Send extra headers
|
|
389
|
+
|
|
390
|
+
extra_query: Add additional query parameters to the request
|
|
391
|
+
|
|
392
|
+
extra_body: Add additional JSON properties to the request
|
|
393
|
+
|
|
394
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
395
|
+
"""
|
|
396
|
+
if not id:
|
|
397
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
398
|
+
body = deepcopy_minimal(
|
|
399
|
+
{
|
|
400
|
+
"file": file,
|
|
401
|
+
"path": path,
|
|
402
|
+
}
|
|
403
|
+
)
|
|
404
|
+
files = extract_files(cast(Mapping[str, object], body), paths=[["file"]])
|
|
405
|
+
# It should be noted that the actual Content-Type header that will be
|
|
406
|
+
# sent to the server will contain a `boundary` parameter, e.g.
|
|
407
|
+
# multipart/form-data; boundary=---abc--
|
|
408
|
+
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
|
|
409
|
+
return self._post(
|
|
410
|
+
f"/v1/devboxes/{id}/upload_file",
|
|
411
|
+
body=maybe_transform(body, devbox_upload_file_params.DevboxUploadFileParams),
|
|
412
|
+
files=files,
|
|
413
|
+
options=make_request_options(
|
|
414
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
415
|
+
),
|
|
416
|
+
cast_to=object,
|
|
417
|
+
)
|
|
418
|
+
|
|
368
419
|
def write_file(
|
|
369
420
|
self,
|
|
370
421
|
id: str,
|
|
@@ -734,6 +785,54 @@ class AsyncDevboxesResource(AsyncAPIResource):
|
|
|
734
785
|
cast_to=DevboxView,
|
|
735
786
|
)
|
|
736
787
|
|
|
788
|
+
async def upload_file(
|
|
789
|
+
self,
|
|
790
|
+
id: str,
|
|
791
|
+
*,
|
|
792
|
+
file: FileTypes | NotGiven = NOT_GIVEN,
|
|
793
|
+
path: str | NotGiven = NOT_GIVEN,
|
|
794
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
795
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
796
|
+
extra_headers: Headers | None = None,
|
|
797
|
+
extra_query: Query | None = None,
|
|
798
|
+
extra_body: Body | None = None,
|
|
799
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
800
|
+
) -> object:
|
|
801
|
+
"""
|
|
802
|
+
Upload file contents to a file at path on the Devbox.
|
|
803
|
+
|
|
804
|
+
Args:
|
|
805
|
+
extra_headers: Send extra headers
|
|
806
|
+
|
|
807
|
+
extra_query: Add additional query parameters to the request
|
|
808
|
+
|
|
809
|
+
extra_body: Add additional JSON properties to the request
|
|
810
|
+
|
|
811
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
812
|
+
"""
|
|
813
|
+
if not id:
|
|
814
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
815
|
+
body = deepcopy_minimal(
|
|
816
|
+
{
|
|
817
|
+
"file": file,
|
|
818
|
+
"path": path,
|
|
819
|
+
}
|
|
820
|
+
)
|
|
821
|
+
files = extract_files(cast(Mapping[str, object], body), paths=[["file"]])
|
|
822
|
+
# It should be noted that the actual Content-Type header that will be
|
|
823
|
+
# sent to the server will contain a `boundary` parameter, e.g.
|
|
824
|
+
# multipart/form-data; boundary=---abc--
|
|
825
|
+
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
|
|
826
|
+
return await self._post(
|
|
827
|
+
f"/v1/devboxes/{id}/upload_file",
|
|
828
|
+
body=await async_maybe_transform(body, devbox_upload_file_params.DevboxUploadFileParams),
|
|
829
|
+
files=files,
|
|
830
|
+
options=make_request_options(
|
|
831
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
832
|
+
),
|
|
833
|
+
cast_to=object,
|
|
834
|
+
)
|
|
835
|
+
|
|
737
836
|
async def write_file(
|
|
738
837
|
self,
|
|
739
838
|
id: str,
|
|
@@ -806,6 +905,9 @@ class DevboxesResourceWithRawResponse:
|
|
|
806
905
|
self.shutdown = to_raw_response_wrapper(
|
|
807
906
|
devboxes.shutdown,
|
|
808
907
|
)
|
|
908
|
+
self.upload_file = to_raw_response_wrapper(
|
|
909
|
+
devboxes.upload_file,
|
|
910
|
+
)
|
|
809
911
|
self.write_file = to_raw_response_wrapper(
|
|
810
912
|
devboxes.write_file,
|
|
811
913
|
)
|
|
@@ -840,6 +942,9 @@ class AsyncDevboxesResourceWithRawResponse:
|
|
|
840
942
|
self.shutdown = async_to_raw_response_wrapper(
|
|
841
943
|
devboxes.shutdown,
|
|
842
944
|
)
|
|
945
|
+
self.upload_file = async_to_raw_response_wrapper(
|
|
946
|
+
devboxes.upload_file,
|
|
947
|
+
)
|
|
843
948
|
self.write_file = async_to_raw_response_wrapper(
|
|
844
949
|
devboxes.write_file,
|
|
845
950
|
)
|
|
@@ -874,6 +979,9 @@ class DevboxesResourceWithStreamingResponse:
|
|
|
874
979
|
self.shutdown = to_streamed_response_wrapper(
|
|
875
980
|
devboxes.shutdown,
|
|
876
981
|
)
|
|
982
|
+
self.upload_file = to_streamed_response_wrapper(
|
|
983
|
+
devboxes.upload_file,
|
|
984
|
+
)
|
|
877
985
|
self.write_file = to_streamed_response_wrapper(
|
|
878
986
|
devboxes.write_file,
|
|
879
987
|
)
|
|
@@ -908,6 +1016,9 @@ class AsyncDevboxesResourceWithStreamingResponse:
|
|
|
908
1016
|
self.shutdown = async_to_streamed_response_wrapper(
|
|
909
1017
|
devboxes.shutdown,
|
|
910
1018
|
)
|
|
1019
|
+
self.upload_file = async_to_streamed_response_wrapper(
|
|
1020
|
+
devboxes.upload_file,
|
|
1021
|
+
)
|
|
911
1022
|
self.write_file = async_to_streamed_response_wrapper(
|
|
912
1023
|
devboxes.write_file,
|
|
913
1024
|
)
|
|
@@ -72,7 +72,7 @@ class InvocationsResource(SyncAPIResource):
|
|
|
72
72
|
def list(
|
|
73
73
|
self,
|
|
74
74
|
*,
|
|
75
|
-
limit:
|
|
75
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
76
76
|
starting_after: str | NotGiven = NOT_GIVEN,
|
|
77
77
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
78
78
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -197,7 +197,7 @@ class AsyncInvocationsResource(AsyncAPIResource):
|
|
|
197
197
|
async def list(
|
|
198
198
|
self,
|
|
199
199
|
*,
|
|
200
|
-
limit:
|
|
200
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
201
201
|
starting_after: str | NotGiven = NOT_GIVEN,
|
|
202
202
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
203
203
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
{runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/src/runloop_api_client/types/__init__.py
RENAMED
|
@@ -23,6 +23,7 @@ from .blueprint_create_params import BlueprintCreateParams as BlueprintCreatePar
|
|
|
23
23
|
from .devbox_read_file_params import DevboxReadFileParams as DevboxReadFileParams
|
|
24
24
|
from .blueprint_preview_params import BlueprintPreviewParams as BlueprintPreviewParams
|
|
25
25
|
from .devbox_write_file_params import DevboxWriteFileParams as DevboxWriteFileParams
|
|
26
|
+
from .devbox_upload_file_params import DevboxUploadFileParams as DevboxUploadFileParams
|
|
26
27
|
from .blueprint_build_parameters import BlueprintBuildParameters as BlueprintBuildParameters
|
|
27
28
|
from .devbox_execute_sync_params import DevboxExecuteSyncParams as DevboxExecuteSyncParams
|
|
28
29
|
from .code_mount_parameters_param import CodeMountParametersParam as CodeMountParametersParam
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
from .._types import FileTypes
|
|
8
|
+
|
|
9
|
+
__all__ = ["DevboxUploadFileParams"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class DevboxUploadFileParams(TypedDict, total=False):
|
|
13
|
+
file: FileTypes
|
|
14
|
+
|
|
15
|
+
path: str
|
|
@@ -64,7 +64,7 @@ class TestInvocations:
|
|
|
64
64
|
@parametrize
|
|
65
65
|
def test_method_list_with_all_params(self, client: Runloop) -> None:
|
|
66
66
|
invocation = client.functions.invocations.list(
|
|
67
|
-
limit=
|
|
67
|
+
limit=0,
|
|
68
68
|
starting_after="starting_after",
|
|
69
69
|
)
|
|
70
70
|
assert_matches_type(FunctionInvocationListView, invocation, path=["response"])
|
|
@@ -177,7 +177,7 @@ class TestAsyncInvocations:
|
|
|
177
177
|
@parametrize
|
|
178
178
|
async def test_method_list_with_all_params(self, async_client: AsyncRunloop) -> None:
|
|
179
179
|
invocation = await async_client.functions.invocations.list(
|
|
180
|
-
limit=
|
|
180
|
+
limit=0,
|
|
181
181
|
starting_after="starting_after",
|
|
182
182
|
)
|
|
183
183
|
assert_matches_type(FunctionInvocationListView, invocation, path=["response"])
|
{runloop_api_client-0.1.0a11 → runloop_api_client-0.1.0a13}/tests/api_resources/test_devboxes.py
RENAMED
|
@@ -35,9 +35,9 @@ class TestDevboxes:
|
|
|
35
35
|
environment_variables={"foo": "string"},
|
|
36
36
|
file_mounts={"foo": "string"},
|
|
37
37
|
launch_parameters={
|
|
38
|
+
"keep_alive_time_seconds": 0,
|
|
38
39
|
"launch_commands": ["string", "string", "string"],
|
|
39
40
|
"resource_size_request": "MINI",
|
|
40
|
-
"keep_alive_time_seconds": 0,
|
|
41
41
|
},
|
|
42
42
|
name="name",
|
|
43
43
|
setup_commands=["string", "string", "string"],
|
|
@@ -312,6 +312,53 @@ class TestDevboxes:
|
|
|
312
312
|
"",
|
|
313
313
|
)
|
|
314
314
|
|
|
315
|
+
@parametrize
|
|
316
|
+
def test_method_upload_file(self, client: Runloop) -> None:
|
|
317
|
+
devbox = client.devboxes.upload_file(
|
|
318
|
+
id="id",
|
|
319
|
+
)
|
|
320
|
+
assert_matches_type(object, devbox, path=["response"])
|
|
321
|
+
|
|
322
|
+
@parametrize
|
|
323
|
+
def test_method_upload_file_with_all_params(self, client: Runloop) -> None:
|
|
324
|
+
devbox = client.devboxes.upload_file(
|
|
325
|
+
id="id",
|
|
326
|
+
file=b"raw file contents",
|
|
327
|
+
path="path",
|
|
328
|
+
)
|
|
329
|
+
assert_matches_type(object, devbox, path=["response"])
|
|
330
|
+
|
|
331
|
+
@parametrize
|
|
332
|
+
def test_raw_response_upload_file(self, client: Runloop) -> None:
|
|
333
|
+
response = client.devboxes.with_raw_response.upload_file(
|
|
334
|
+
id="id",
|
|
335
|
+
)
|
|
336
|
+
|
|
337
|
+
assert response.is_closed is True
|
|
338
|
+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
339
|
+
devbox = response.parse()
|
|
340
|
+
assert_matches_type(object, devbox, path=["response"])
|
|
341
|
+
|
|
342
|
+
@parametrize
|
|
343
|
+
def test_streaming_response_upload_file(self, client: Runloop) -> None:
|
|
344
|
+
with client.devboxes.with_streaming_response.upload_file(
|
|
345
|
+
id="id",
|
|
346
|
+
) as response:
|
|
347
|
+
assert not response.is_closed
|
|
348
|
+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
349
|
+
|
|
350
|
+
devbox = response.parse()
|
|
351
|
+
assert_matches_type(object, devbox, path=["response"])
|
|
352
|
+
|
|
353
|
+
assert cast(Any, response.is_closed) is True
|
|
354
|
+
|
|
355
|
+
@parametrize
|
|
356
|
+
def test_path_params_upload_file(self, client: Runloop) -> None:
|
|
357
|
+
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
|
|
358
|
+
client.devboxes.with_raw_response.upload_file(
|
|
359
|
+
id="",
|
|
360
|
+
)
|
|
361
|
+
|
|
315
362
|
@parametrize
|
|
316
363
|
def test_method_write_file(self, client: Runloop) -> None:
|
|
317
364
|
devbox = client.devboxes.write_file(
|
|
@@ -377,9 +424,9 @@ class TestAsyncDevboxes:
|
|
|
377
424
|
environment_variables={"foo": "string"},
|
|
378
425
|
file_mounts={"foo": "string"},
|
|
379
426
|
launch_parameters={
|
|
427
|
+
"keep_alive_time_seconds": 0,
|
|
380
428
|
"launch_commands": ["string", "string", "string"],
|
|
381
429
|
"resource_size_request": "MINI",
|
|
382
|
-
"keep_alive_time_seconds": 0,
|
|
383
430
|
},
|
|
384
431
|
name="name",
|
|
385
432
|
setup_commands=["string", "string", "string"],
|
|
@@ -654,6 +701,53 @@ class TestAsyncDevboxes:
|
|
|
654
701
|
"",
|
|
655
702
|
)
|
|
656
703
|
|
|
704
|
+
@parametrize
|
|
705
|
+
async def test_method_upload_file(self, async_client: AsyncRunloop) -> None:
|
|
706
|
+
devbox = await async_client.devboxes.upload_file(
|
|
707
|
+
id="id",
|
|
708
|
+
)
|
|
709
|
+
assert_matches_type(object, devbox, path=["response"])
|
|
710
|
+
|
|
711
|
+
@parametrize
|
|
712
|
+
async def test_method_upload_file_with_all_params(self, async_client: AsyncRunloop) -> None:
|
|
713
|
+
devbox = await async_client.devboxes.upload_file(
|
|
714
|
+
id="id",
|
|
715
|
+
file=b"raw file contents",
|
|
716
|
+
path="path",
|
|
717
|
+
)
|
|
718
|
+
assert_matches_type(object, devbox, path=["response"])
|
|
719
|
+
|
|
720
|
+
@parametrize
|
|
721
|
+
async def test_raw_response_upload_file(self, async_client: AsyncRunloop) -> None:
|
|
722
|
+
response = await async_client.devboxes.with_raw_response.upload_file(
|
|
723
|
+
id="id",
|
|
724
|
+
)
|
|
725
|
+
|
|
726
|
+
assert response.is_closed is True
|
|
727
|
+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
728
|
+
devbox = await response.parse()
|
|
729
|
+
assert_matches_type(object, devbox, path=["response"])
|
|
730
|
+
|
|
731
|
+
@parametrize
|
|
732
|
+
async def test_streaming_response_upload_file(self, async_client: AsyncRunloop) -> None:
|
|
733
|
+
async with async_client.devboxes.with_streaming_response.upload_file(
|
|
734
|
+
id="id",
|
|
735
|
+
) as response:
|
|
736
|
+
assert not response.is_closed
|
|
737
|
+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
738
|
+
|
|
739
|
+
devbox = await response.parse()
|
|
740
|
+
assert_matches_type(object, devbox, path=["response"])
|
|
741
|
+
|
|
742
|
+
assert cast(Any, response.is_closed) is True
|
|
743
|
+
|
|
744
|
+
@parametrize
|
|
745
|
+
async def test_path_params_upload_file(self, async_client: AsyncRunloop) -> None:
|
|
746
|
+
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
|
|
747
|
+
await async_client.devboxes.with_raw_response.upload_file(
|
|
748
|
+
id="",
|
|
749
|
+
)
|
|
750
|
+
|
|
657
751
|
@parametrize
|
|
658
752
|
async def test_method_write_file(self, async_client: AsyncRunloop) -> None:
|
|
659
753
|
devbox = await async_client.devboxes.write_file(
|
|
@@ -87,7 +87,7 @@ class TestRunloop:
|
|
|
87
87
|
# options that have a default are overridden correctly
|
|
88
88
|
copied = self.client.copy(max_retries=7)
|
|
89
89
|
assert copied.max_retries == 7
|
|
90
|
-
assert self.client.max_retries ==
|
|
90
|
+
assert self.client.max_retries == 0
|
|
91
91
|
|
|
92
92
|
copied2 = copied.copy(max_retries=6)
|
|
93
93
|
assert copied2.max_retries == 6
|
|
@@ -706,20 +706,20 @@ class TestRunloop:
|
|
|
706
706
|
"remaining_retries,retry_after,timeout",
|
|
707
707
|
[
|
|
708
708
|
[3, "20", 20],
|
|
709
|
-
[3, "0",
|
|
710
|
-
[3, "-10",
|
|
709
|
+
[3, "0", 1],
|
|
710
|
+
[3, "-10", 1],
|
|
711
711
|
[3, "60", 60],
|
|
712
|
-
[3, "61",
|
|
712
|
+
[3, "61", 1],
|
|
713
713
|
[3, "Fri, 29 Sep 2023 16:26:57 GMT", 20],
|
|
714
|
-
[3, "Fri, 29 Sep 2023 16:26:37 GMT",
|
|
715
|
-
[3, "Fri, 29 Sep 2023 16:26:27 GMT",
|
|
714
|
+
[3, "Fri, 29 Sep 2023 16:26:37 GMT", 1],
|
|
715
|
+
[3, "Fri, 29 Sep 2023 16:26:27 GMT", 1],
|
|
716
716
|
[3, "Fri, 29 Sep 2023 16:27:37 GMT", 60],
|
|
717
|
-
[3, "Fri, 29 Sep 2023 16:27:38 GMT",
|
|
718
|
-
[3, "99999999999999999999999999999999999",
|
|
719
|
-
[3, "Zun, 29 Sep 2023 16:26:27 GMT",
|
|
720
|
-
[3, "",
|
|
721
|
-
[2, "",
|
|
722
|
-
[1, "",
|
|
717
|
+
[3, "Fri, 29 Sep 2023 16:27:38 GMT", 1],
|
|
718
|
+
[3, "99999999999999999999999999999999999", 1],
|
|
719
|
+
[3, "Zun, 29 Sep 2023 16:26:27 GMT", 1],
|
|
720
|
+
[3, "", 1],
|
|
721
|
+
[2, "", 1 * 2.0],
|
|
722
|
+
[1, "", 1 * 4.0],
|
|
723
723
|
],
|
|
724
724
|
)
|
|
725
725
|
@mock.patch("time.time", mock.MagicMock(return_value=1696004797))
|
|
@@ -729,7 +729,7 @@ class TestRunloop:
|
|
|
729
729
|
headers = httpx.Headers({"retry-after": retry_after})
|
|
730
730
|
options = FinalRequestOptions(method="get", url="/foo", max_retries=3)
|
|
731
731
|
calculated = client._calculate_retry_timeout(remaining_retries, options, headers)
|
|
732
|
-
assert calculated == pytest.approx(timeout,
|
|
732
|
+
assert calculated == pytest.approx(timeout, 1 * 0.875) # pyright: ignore[reportUnknownMemberType]
|
|
733
733
|
|
|
734
734
|
@mock.patch("runloop_api_client._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout)
|
|
735
735
|
@pytest.mark.respx(base_url=base_url)
|
|
@@ -820,7 +820,7 @@ class TestAsyncRunloop:
|
|
|
820
820
|
# options that have a default are overridden correctly
|
|
821
821
|
copied = self.client.copy(max_retries=7)
|
|
822
822
|
assert copied.max_retries == 7
|
|
823
|
-
assert self.client.max_retries ==
|
|
823
|
+
assert self.client.max_retries == 0
|
|
824
824
|
|
|
825
825
|
copied2 = copied.copy(max_retries=6)
|
|
826
826
|
assert copied2.max_retries == 6
|
|
@@ -1442,20 +1442,20 @@ class TestAsyncRunloop:
|
|
|
1442
1442
|
"remaining_retries,retry_after,timeout",
|
|
1443
1443
|
[
|
|
1444
1444
|
[3, "20", 20],
|
|
1445
|
-
[3, "0",
|
|
1446
|
-
[3, "-10",
|
|
1445
|
+
[3, "0", 1],
|
|
1446
|
+
[3, "-10", 1],
|
|
1447
1447
|
[3, "60", 60],
|
|
1448
|
-
[3, "61",
|
|
1448
|
+
[3, "61", 1],
|
|
1449
1449
|
[3, "Fri, 29 Sep 2023 16:26:57 GMT", 20],
|
|
1450
|
-
[3, "Fri, 29 Sep 2023 16:26:37 GMT",
|
|
1451
|
-
[3, "Fri, 29 Sep 2023 16:26:27 GMT",
|
|
1450
|
+
[3, "Fri, 29 Sep 2023 16:26:37 GMT", 1],
|
|
1451
|
+
[3, "Fri, 29 Sep 2023 16:26:27 GMT", 1],
|
|
1452
1452
|
[3, "Fri, 29 Sep 2023 16:27:37 GMT", 60],
|
|
1453
|
-
[3, "Fri, 29 Sep 2023 16:27:38 GMT",
|
|
1454
|
-
[3, "99999999999999999999999999999999999",
|
|
1455
|
-
[3, "Zun, 29 Sep 2023 16:26:27 GMT",
|
|
1456
|
-
[3, "",
|
|
1457
|
-
[2, "",
|
|
1458
|
-
[1, "",
|
|
1453
|
+
[3, "Fri, 29 Sep 2023 16:27:38 GMT", 1],
|
|
1454
|
+
[3, "99999999999999999999999999999999999", 1],
|
|
1455
|
+
[3, "Zun, 29 Sep 2023 16:26:27 GMT", 1],
|
|
1456
|
+
[3, "", 1],
|
|
1457
|
+
[2, "", 1 * 2.0],
|
|
1458
|
+
[1, "", 1 * 4.0],
|
|
1459
1459
|
],
|
|
1460
1460
|
)
|
|
1461
1461
|
@mock.patch("time.time", mock.MagicMock(return_value=1696004797))
|
|
@@ -1466,7 +1466,7 @@ class TestAsyncRunloop:
|
|
|
1466
1466
|
headers = httpx.Headers({"retry-after": retry_after})
|
|
1467
1467
|
options = FinalRequestOptions(method="get", url="/foo", max_retries=3)
|
|
1468
1468
|
calculated = client._calculate_retry_timeout(remaining_retries, options, headers)
|
|
1469
|
-
assert calculated == pytest.approx(timeout,
|
|
1469
|
+
assert calculated == pytest.approx(timeout, 1 * 0.875) # pyright: ignore[reportUnknownMemberType]
|
|
1470
1470
|
|
|
1471
1471
|
@mock.patch("runloop_api_client._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout)
|
|
1472
1472
|
@pytest.mark.respx(base_url=base_url)
|