runloop-api-client 0.1.0a10__tar.gz → 0.1.0a12__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.0a12/.release-please-manifest.json +3 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/CHANGELOG.md +48 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/PKG-INFO +13 -13
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/README.md +12 -12
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/api.md +9 -1
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/pyproject.toml +12 -8
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/requirements-dev.lock +2 -2
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/_base_client.py +31 -44
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/_compat.py +12 -17
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/_constants.py +3 -3
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/_files.py +4 -8
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/_response.py +9 -8
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/_types.py +3 -6
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/_utils/_proxy.py +1 -2
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/_utils/_reflection.py +1 -1
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/_utils/_utils.py +6 -12
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/_version.py +1 -1
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/resources/devboxes/devboxes.py +199 -9
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/resources/functions/invocations.py +2 -2
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/__init__.py +3 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/blueprint_build_parameters.py +6 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/blueprint_create_params.py +6 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/blueprint_preview_params.py +6 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/devbox_create_params.py +20 -4
- runloop_api_client-0.1.0a12/src/runloop_api_client/types/devbox_read_file_contents_params.py +12 -0
- runloop_api_client-0.1.0a12/src/runloop_api_client/types/devbox_read_file_contents_response.py +7 -0
- runloop_api_client-0.1.0a12/src/runloop_api_client/types/devbox_upload_file_params.py +16 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/devbox_view.py +2 -5
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/functions/invocation_list_params.py +1 -1
- runloop_api_client-0.1.0a12/src/runloop_api_client/types/resource_size.py +7 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/tests/api_resources/functions/test_invocations.py +2 -2
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/tests/api_resources/test_blueprints.py +28 -24
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/tests/api_resources/test_devboxes.py +196 -2
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/tests/test_client.py +84 -36
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/tests/test_deepcopy.py +1 -2
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/tests/test_response.py +4 -8
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/tests/test_utils/test_typing.py +5 -10
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/tests/utils.py +7 -3
- runloop_api_client-0.1.0a10/.release-please-manifest.json +0 -3
- runloop_api_client-0.1.0a10/src/runloop_api_client/types/resource_size.py +0 -7
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/.gitignore +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/CONTRIBUTING.md +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/LICENSE +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/SECURITY.md +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/bin/check-release-environment +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/bin/publish-pypi +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/examples/.keep +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/mypy.ini +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/noxfile.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/release-please-config.json +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/requirements.lock +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop/lib/.keep +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/__init__.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/_client.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/_exceptions.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/_models.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/_qs.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/_resource.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/_streaming.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/_utils/__init__.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/_utils/_logs.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/_utils/_streams.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/_utils/_sync.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/_utils/_transform.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/_utils/_typing.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/lib/.keep +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/py.typed +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/resources/__init__.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/resources/blueprints.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/resources/devboxes/__init__.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/resources/devboxes/logs.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/resources/functions/__init__.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/resources/functions/functions.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/resources/projects/__init__.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/resources/projects/logs.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/resources/projects/projects.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/blueprint_build_log.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/blueprint_build_logs_list_view.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/blueprint_list_params.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/blueprint_list_view.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/blueprint_preview_view.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/blueprint_view.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/code_mount_parameters.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/code_mount_parameters_param.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/devbox_execute_sync_params.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/devbox_execution_detail_view.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/devbox_list_params.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/devbox_list_view.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/devbox_read_file_params.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/devbox_write_file_params.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/devboxes/__init__.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/devboxes/devbox_logs_list_view.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/function_invoke_async_params.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/function_invoke_sync_params.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/function_list_view.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/functions/__init__.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/functions/function_invocation_list_view.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/project_list_view.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/projects/__init__.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/shared/__init__.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/shared/function_invocation_execution_detail_view.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/src/runloop_api_client/types/shared/project_logs_view.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/tests/__init__.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/tests/api_resources/__init__.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/tests/api_resources/devboxes/__init__.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/tests/api_resources/devboxes/test_logs.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/tests/api_resources/functions/__init__.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/tests/api_resources/projects/__init__.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/tests/api_resources/projects/test_logs.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/tests/api_resources/test_functions.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/tests/api_resources/test_projects.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/tests/conftest.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/tests/sample_file.txt +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/tests/test_extract_files.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/tests/test_files.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/tests/test_models.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/tests/test_qs.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/tests/test_required_args.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/tests/test_streaming.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/tests/test_transform.py +0 -0
- {runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/tests/test_utils/test_proxy.py +0 -0
|
@@ -1,5 +1,53 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.12 (2024-08-15)
|
|
4
|
+
|
|
5
|
+
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)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **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))
|
|
10
|
+
* **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))
|
|
11
|
+
* **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))
|
|
12
|
+
* **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))
|
|
13
|
+
* **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))
|
|
14
|
+
* **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))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Chores
|
|
18
|
+
|
|
19
|
+
* **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))
|
|
20
|
+
* **ci:** minor changes ([#84](https://github.com/runloopai/api-client-python/issues/84)) ([32f527f](https://github.com/runloopai/api-client-python/commit/32f527f1802bfc63c2156ad7eefd7773a007f501))
|
|
21
|
+
* **examples:** minor formatting changes ([#87](https://github.com/runloopai/api-client-python/issues/87)) ([64c9bd5](https://github.com/runloopai/api-client-python/commit/64c9bd5c499d56772028679aa974eac5e78c3b15))
|
|
22
|
+
* **internal:** codegen related update ([#92](https://github.com/runloopai/api-client-python/issues/92)) ([0c34d9a](https://github.com/runloopai/api-client-python/commit/0c34d9a7a296d0e0fd4626b6f9629ff737e61590))
|
|
23
|
+
* **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))
|
|
24
|
+
* **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))
|
|
25
|
+
* **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))
|
|
26
|
+
|
|
27
|
+
## 0.1.0-alpha.11 (2024-08-07)
|
|
28
|
+
|
|
29
|
+
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)
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
|
|
33
|
+
* **api:** OpenAPI spec update via Stainless API ([#66](https://github.com/runloopai/api-client-python/issues/66)) ([291eddb](https://github.com/runloopai/api-client-python/commit/291eddbf05d2e12d882f8d53baac9617149a1e34))
|
|
34
|
+
* **api:** OpenAPI spec update via Stainless API ([#68](https://github.com/runloopai/api-client-python/issues/68)) ([91913d6](https://github.com/runloopai/api-client-python/commit/91913d6fc7582204fbfa37bf780ea287c0940e97))
|
|
35
|
+
* **api:** OpenAPI spec update via Stainless API ([#69](https://github.com/runloopai/api-client-python/issues/69)) ([f82c51c](https://github.com/runloopai/api-client-python/commit/f82c51cc8d5a5b8588d0b8e98cae7bcbf06d4f09))
|
|
36
|
+
* **api:** OpenAPI spec update via Stainless API ([#70](https://github.com/runloopai/api-client-python/issues/70)) ([b0ffcf0](https://github.com/runloopai/api-client-python/commit/b0ffcf0031ac84240728907ee722ed3e21de3735))
|
|
37
|
+
* **api:** OpenAPI spec update via Stainless API ([#75](https://github.com/runloopai/api-client-python/issues/75)) ([213734e](https://github.com/runloopai/api-client-python/commit/213734e474bce92394eea0aea69132d95850f3c8))
|
|
38
|
+
* **api:** OpenAPI spec update via Stainless API ([#76](https://github.com/runloopai/api-client-python/issues/76)) ([d6370bc](https://github.com/runloopai/api-client-python/commit/d6370bce09d23275d632e1b265f6207a189fedc7))
|
|
39
|
+
* **api:** OpenAPI spec update via Stainless API ([#79](https://github.com/runloopai/api-client-python/issues/79)) ([23d4705](https://github.com/runloopai/api-client-python/commit/23d470542689d3d227ddff7c11464f6a1849003b))
|
|
40
|
+
* **client:** add `retry_count` to raw response class ([#73](https://github.com/runloopai/api-client-python/issues/73)) ([e17fb03](https://github.com/runloopai/api-client-python/commit/e17fb0352e692b04df6f67d98a67182a13cd95ee))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Chores
|
|
44
|
+
|
|
45
|
+
* **internal:** bump pyright ([#72](https://github.com/runloopai/api-client-python/issues/72)) ([3fcd1bf](https://github.com/runloopai/api-client-python/commit/3fcd1bf654826a81efea4f3b67fc85a124141d41))
|
|
46
|
+
* **internal:** bump ruff version ([#77](https://github.com/runloopai/api-client-python/issues/77)) ([240971d](https://github.com/runloopai/api-client-python/commit/240971d1eac9b67a3e85369b0617fc9821e048b3))
|
|
47
|
+
* **internal:** test updates ([#74](https://github.com/runloopai/api-client-python/issues/74)) ([cac724a](https://github.com/runloopai/api-client-python/commit/cac724a5db2acdecc40a9775dcde49b9f8f9a277))
|
|
48
|
+
* **internal:** update pydantic compat helper function ([#78](https://github.com/runloopai/api-client-python/issues/78)) ([3befea7](https://github.com/runloopai/api-client-python/commit/3befea7ec40892a6f6455d81eb87d8c4ab8a7629))
|
|
49
|
+
* **internal:** use `TypeAlias` marker for type assignments ([#71](https://github.com/runloopai/api-client-python/issues/71)) ([4de0849](https://github.com/runloopai/api-client-python/commit/4de08497452923cfa328aadfd6626286b3248d17))
|
|
50
|
+
|
|
3
51
|
## 0.1.0-alpha.10 (2024-08-02)
|
|
4
52
|
|
|
5
53
|
Full Changelog: [v0.1.0-alpha.9...v0.1.0-alpha.10](https://github.com/runloopai/api-client-python/compare/v0.1.0-alpha.9...v0.1.0-alpha.10)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: runloop_api_client
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.0a12
|
|
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
|
|
@@ -66,8 +66,8 @@ client = Runloop(
|
|
|
66
66
|
bearer_token=os.environ.get("RUNLOOP_API_KEY"),
|
|
67
67
|
)
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
print(
|
|
69
|
+
devbox_view = client.devboxes.create()
|
|
70
|
+
print(devbox_view.id)
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
While you can provide a `bearer_token` keyword argument,
|
|
@@ -91,8 +91,8 @@ client = AsyncRunloop(
|
|
|
91
91
|
|
|
92
92
|
|
|
93
93
|
async def main() -> None:
|
|
94
|
-
|
|
95
|
-
print(
|
|
94
|
+
devbox_view = await client.devboxes.create()
|
|
95
|
+
print(devbox_view.id)
|
|
96
96
|
|
|
97
97
|
|
|
98
98
|
asyncio.run(main())
|
|
@@ -125,7 +125,7 @@ from runloop_api_client import Runloop
|
|
|
125
125
|
client = Runloop()
|
|
126
126
|
|
|
127
127
|
try:
|
|
128
|
-
client.
|
|
128
|
+
client.devboxes.create()
|
|
129
129
|
except runloop_api_client.APIConnectionError as e:
|
|
130
130
|
print("The server could not be reached")
|
|
131
131
|
print(e.__cause__) # an underlying Exception, likely raised within httpx.
|
|
@@ -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
|
|
|
@@ -168,7 +168,7 @@ client = Runloop(
|
|
|
168
168
|
)
|
|
169
169
|
|
|
170
170
|
# Or, configure per-request:
|
|
171
|
-
client.with_options(max_retries=5).
|
|
171
|
+
client.with_options(max_retries=5).devboxes.create()
|
|
172
172
|
```
|
|
173
173
|
|
|
174
174
|
### Timeouts
|
|
@@ -191,7 +191,7 @@ client = Runloop(
|
|
|
191
191
|
)
|
|
192
192
|
|
|
193
193
|
# Override per-request:
|
|
194
|
-
client.with_options(timeout=5.0).
|
|
194
|
+
client.with_options(timeout=5.0).devboxes.create()
|
|
195
195
|
```
|
|
196
196
|
|
|
197
197
|
On timeout, an `APITimeoutError` is thrown.
|
|
@@ -230,11 +230,11 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
|
|
|
230
230
|
from runloop_api_client import Runloop
|
|
231
231
|
|
|
232
232
|
client = Runloop()
|
|
233
|
-
response = client.
|
|
233
|
+
response = client.devboxes.with_raw_response.create()
|
|
234
234
|
print(response.headers.get('X-My-Header'))
|
|
235
235
|
|
|
236
|
-
|
|
237
|
-
print(
|
|
236
|
+
devbox = response.parse() # get the object that `devboxes.create()` would have returned
|
|
237
|
+
print(devbox.id)
|
|
238
238
|
```
|
|
239
239
|
|
|
240
240
|
These methods return an [`APIResponse`](https://github.com/runloopai/api-client-python/tree/main/src/runloop_api_client/_response.py) object.
|
|
@@ -248,7 +248,7 @@ The above interface eagerly reads the full response body when you make the reque
|
|
|
248
248
|
To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
|
|
249
249
|
|
|
250
250
|
```python
|
|
251
|
-
with client.
|
|
251
|
+
with client.devboxes.with_streaming_response.create() as response:
|
|
252
252
|
print(response.headers.get("X-My-Header"))
|
|
253
253
|
|
|
254
254
|
for line in response.iter_lines():
|
|
@@ -32,8 +32,8 @@ client = Runloop(
|
|
|
32
32
|
bearer_token=os.environ.get("RUNLOOP_API_KEY"),
|
|
33
33
|
)
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
print(
|
|
35
|
+
devbox_view = client.devboxes.create()
|
|
36
|
+
print(devbox_view.id)
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
While you can provide a `bearer_token` keyword argument,
|
|
@@ -57,8 +57,8 @@ client = AsyncRunloop(
|
|
|
57
57
|
|
|
58
58
|
|
|
59
59
|
async def main() -> None:
|
|
60
|
-
|
|
61
|
-
print(
|
|
60
|
+
devbox_view = await client.devboxes.create()
|
|
61
|
+
print(devbox_view.id)
|
|
62
62
|
|
|
63
63
|
|
|
64
64
|
asyncio.run(main())
|
|
@@ -91,7 +91,7 @@ from runloop_api_client import Runloop
|
|
|
91
91
|
client = Runloop()
|
|
92
92
|
|
|
93
93
|
try:
|
|
94
|
-
client.
|
|
94
|
+
client.devboxes.create()
|
|
95
95
|
except runloop_api_client.APIConnectionError as e:
|
|
96
96
|
print("The server could not be reached")
|
|
97
97
|
print(e.__cause__) # an underlying Exception, likely raised within httpx.
|
|
@@ -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
|
|
|
@@ -134,7 +134,7 @@ client = Runloop(
|
|
|
134
134
|
)
|
|
135
135
|
|
|
136
136
|
# Or, configure per-request:
|
|
137
|
-
client.with_options(max_retries=5).
|
|
137
|
+
client.with_options(max_retries=5).devboxes.create()
|
|
138
138
|
```
|
|
139
139
|
|
|
140
140
|
### Timeouts
|
|
@@ -157,7 +157,7 @@ client = Runloop(
|
|
|
157
157
|
)
|
|
158
158
|
|
|
159
159
|
# Override per-request:
|
|
160
|
-
client.with_options(timeout=5.0).
|
|
160
|
+
client.with_options(timeout=5.0).devboxes.create()
|
|
161
161
|
```
|
|
162
162
|
|
|
163
163
|
On timeout, an `APITimeoutError` is thrown.
|
|
@@ -196,11 +196,11 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
|
|
|
196
196
|
from runloop_api_client import Runloop
|
|
197
197
|
|
|
198
198
|
client = Runloop()
|
|
199
|
-
response = client.
|
|
199
|
+
response = client.devboxes.with_raw_response.create()
|
|
200
200
|
print(response.headers.get('X-My-Header'))
|
|
201
201
|
|
|
202
|
-
|
|
203
|
-
print(
|
|
202
|
+
devbox = response.parse() # get the object that `devboxes.create()` would have returned
|
|
203
|
+
print(devbox.id)
|
|
204
204
|
```
|
|
205
205
|
|
|
206
206
|
These methods return an [`APIResponse`](https://github.com/runloopai/api-client-python/tree/main/src/runloop_api_client/_response.py) object.
|
|
@@ -214,7 +214,7 @@ The above interface eagerly reads the full response body when you make the reque
|
|
|
214
214
|
To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
|
|
215
215
|
|
|
216
216
|
```python
|
|
217
|
-
with client.
|
|
217
|
+
with client.devboxes.with_streaming_response.create() as response:
|
|
218
218
|
print(response.headers.get("X-My-Header"))
|
|
219
219
|
|
|
220
220
|
for line in response.iter_lines():
|
|
@@ -48,7 +48,13 @@ from runloop_api_client.types import CodeMountParameters
|
|
|
48
48
|
Types:
|
|
49
49
|
|
|
50
50
|
```python
|
|
51
|
-
from runloop_api_client.types import
|
|
51
|
+
from runloop_api_client.types import (
|
|
52
|
+
DevboxExecutionDetailView,
|
|
53
|
+
DevboxListView,
|
|
54
|
+
DevboxView,
|
|
55
|
+
DevboxReadFileContentsResponse,
|
|
56
|
+
DevboxUploadFileResponse,
|
|
57
|
+
)
|
|
52
58
|
```
|
|
53
59
|
|
|
54
60
|
Methods:
|
|
@@ -58,7 +64,9 @@ Methods:
|
|
|
58
64
|
- <code title="get /v1/devboxes">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">list</a>(\*\*<a href="src/runloop_api_client/types/devbox_list_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_list_view.py">DevboxListView</a></code>
|
|
59
65
|
- <code title="post /v1/devboxes/{id}/execute_sync">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">execute_sync</a>(id, \*\*<a href="src/runloop_api_client/types/devbox_execute_sync_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_execution_detail_view.py">DevboxExecutionDetailView</a></code>
|
|
60
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>
|
|
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>
|
|
61
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>
|
|
62
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>
|
|
63
71
|
|
|
64
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.12"
|
|
4
4
|
description = "The official Python library for the runloop API"
|
|
5
5
|
dynamic = ["readme"]
|
|
6
6
|
license = "MIT"
|
|
@@ -76,9 +76,12 @@ format = { chain = [
|
|
|
76
76
|
"lint" = { chain = [
|
|
77
77
|
"check:ruff",
|
|
78
78
|
"typecheck",
|
|
79
|
+
"check:importable",
|
|
79
80
|
]}
|
|
80
|
-
"check:ruff" = "ruff ."
|
|
81
|
-
"fix:ruff" = "ruff --fix ."
|
|
81
|
+
"check:ruff" = "ruff check ."
|
|
82
|
+
"fix:ruff" = "ruff check --fix ."
|
|
83
|
+
|
|
84
|
+
"check:importable" = "python -c 'import runloop_api_client'"
|
|
82
85
|
|
|
83
86
|
typecheck = { chain = [
|
|
84
87
|
"typecheck:pyright",
|
|
@@ -162,6 +165,11 @@ reportPrivateUsage = false
|
|
|
162
165
|
line-length = 120
|
|
163
166
|
output-format = "grouped"
|
|
164
167
|
target-version = "py37"
|
|
168
|
+
|
|
169
|
+
[tool.ruff.format]
|
|
170
|
+
docstring-code-format = true
|
|
171
|
+
|
|
172
|
+
[tool.ruff.lint]
|
|
165
173
|
select = [
|
|
166
174
|
# isort
|
|
167
175
|
"I",
|
|
@@ -190,10 +198,6 @@ unfixable = [
|
|
|
190
198
|
"T201",
|
|
191
199
|
"T203",
|
|
192
200
|
]
|
|
193
|
-
ignore-init-module-imports = true
|
|
194
|
-
|
|
195
|
-
[tool.ruff.format]
|
|
196
|
-
docstring-code-format = true
|
|
197
201
|
|
|
198
202
|
[tool.ruff.lint.flake8-tidy-imports.banned-api]
|
|
199
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"
|
|
@@ -205,7 +209,7 @@ combine-as-imports = true
|
|
|
205
209
|
extra-standard-library = ["typing_extensions"]
|
|
206
210
|
known-first-party = ["runloop_api_client", "tests"]
|
|
207
211
|
|
|
208
|
-
[tool.ruff.per-file-ignores]
|
|
212
|
+
[tool.ruff.lint.per-file-ignores]
|
|
209
213
|
"bin/**.py" = ["T201", "T203"]
|
|
210
214
|
"scripts/**.py" = ["T201", "T203"]
|
|
211
215
|
"tests/**.py" = ["T201", "T203"]
|
|
@@ -70,7 +70,7 @@ pydantic-core==2.18.2
|
|
|
70
70
|
# via pydantic
|
|
71
71
|
pygments==2.18.0
|
|
72
72
|
# via rich
|
|
73
|
-
pyright==1.1.
|
|
73
|
+
pyright==1.1.374
|
|
74
74
|
pytest==7.1.1
|
|
75
75
|
# via pytest-asyncio
|
|
76
76
|
pytest-asyncio==0.21.1
|
|
@@ -80,7 +80,7 @@ pytz==2023.3.post1
|
|
|
80
80
|
# via dirty-equals
|
|
81
81
|
respx==0.20.2
|
|
82
82
|
rich==13.7.1
|
|
83
|
-
ruff==0.
|
|
83
|
+
ruff==0.5.6
|
|
84
84
|
setuptools==68.2.2
|
|
85
85
|
# via nodeenv
|
|
86
86
|
six==1.16.0
|
{runloop_api_client-0.1.0a10 → runloop_api_client-0.1.0a12}/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
|
|
@@ -124,16 +125,14 @@ class PageInfo:
|
|
|
124
125
|
self,
|
|
125
126
|
*,
|
|
126
127
|
url: URL,
|
|
127
|
-
) -> None:
|
|
128
|
-
...
|
|
128
|
+
) -> None: ...
|
|
129
129
|
|
|
130
130
|
@overload
|
|
131
131
|
def __init__(
|
|
132
132
|
self,
|
|
133
133
|
*,
|
|
134
134
|
params: Query,
|
|
135
|
-
) -> None:
|
|
136
|
-
...
|
|
135
|
+
) -> None: ...
|
|
137
136
|
|
|
138
137
|
def __init__(
|
|
139
138
|
self,
|
|
@@ -166,8 +165,7 @@ class BasePage(GenericModel, Generic[_T]):
|
|
|
166
165
|
return False
|
|
167
166
|
return self.next_page_info() is not None
|
|
168
167
|
|
|
169
|
-
def next_page_info(self) -> Optional[PageInfo]:
|
|
170
|
-
...
|
|
168
|
+
def next_page_info(self) -> Optional[PageInfo]: ...
|
|
171
169
|
|
|
172
170
|
def _get_page_items(self) -> Iterable[_T]: # type: ignore[empty-body]
|
|
173
171
|
...
|
|
@@ -903,8 +901,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
903
901
|
*,
|
|
904
902
|
stream: Literal[True],
|
|
905
903
|
stream_cls: Type[_StreamT],
|
|
906
|
-
) -> _StreamT:
|
|
907
|
-
...
|
|
904
|
+
) -> _StreamT: ...
|
|
908
905
|
|
|
909
906
|
@overload
|
|
910
907
|
def request(
|
|
@@ -914,8 +911,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
914
911
|
remaining_retries: Optional[int] = None,
|
|
915
912
|
*,
|
|
916
913
|
stream: Literal[False] = False,
|
|
917
|
-
) -> ResponseT:
|
|
918
|
-
...
|
|
914
|
+
) -> ResponseT: ...
|
|
919
915
|
|
|
920
916
|
@overload
|
|
921
917
|
def request(
|
|
@@ -926,8 +922,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
926
922
|
*,
|
|
927
923
|
stream: bool = False,
|
|
928
924
|
stream_cls: Type[_StreamT] | None = None,
|
|
929
|
-
) -> ResponseT | _StreamT:
|
|
930
|
-
...
|
|
925
|
+
) -> ResponseT | _StreamT: ...
|
|
931
926
|
|
|
932
927
|
def request(
|
|
933
928
|
self,
|
|
@@ -1049,6 +1044,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
1049
1044
|
response=response,
|
|
1050
1045
|
stream=stream,
|
|
1051
1046
|
stream_cls=stream_cls,
|
|
1047
|
+
retries_taken=options.get_max_retries(self.max_retries) - retries,
|
|
1052
1048
|
)
|
|
1053
1049
|
|
|
1054
1050
|
def _retry_request(
|
|
@@ -1090,6 +1086,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
1090
1086
|
response: httpx.Response,
|
|
1091
1087
|
stream: bool,
|
|
1092
1088
|
stream_cls: type[Stream[Any]] | type[AsyncStream[Any]] | None,
|
|
1089
|
+
retries_taken: int = 0,
|
|
1093
1090
|
) -> ResponseT:
|
|
1094
1091
|
origin = get_origin(cast_to) or cast_to
|
|
1095
1092
|
|
|
@@ -1107,6 +1104,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
1107
1104
|
stream=stream,
|
|
1108
1105
|
stream_cls=stream_cls,
|
|
1109
1106
|
options=options,
|
|
1107
|
+
retries_taken=retries_taken,
|
|
1110
1108
|
),
|
|
1111
1109
|
)
|
|
1112
1110
|
|
|
@@ -1120,6 +1118,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
1120
1118
|
stream=stream,
|
|
1121
1119
|
stream_cls=stream_cls,
|
|
1122
1120
|
options=options,
|
|
1121
|
+
retries_taken=retries_taken,
|
|
1123
1122
|
)
|
|
1124
1123
|
if bool(response.request.headers.get(RAW_RESPONSE_HEADER)):
|
|
1125
1124
|
return cast(ResponseT, api_response)
|
|
@@ -1152,8 +1151,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
1152
1151
|
cast_to: Type[ResponseT],
|
|
1153
1152
|
options: RequestOptions = {},
|
|
1154
1153
|
stream: Literal[False] = False,
|
|
1155
|
-
) -> ResponseT:
|
|
1156
|
-
...
|
|
1154
|
+
) -> ResponseT: ...
|
|
1157
1155
|
|
|
1158
1156
|
@overload
|
|
1159
1157
|
def get(
|
|
@@ -1164,8 +1162,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
1164
1162
|
options: RequestOptions = {},
|
|
1165
1163
|
stream: Literal[True],
|
|
1166
1164
|
stream_cls: type[_StreamT],
|
|
1167
|
-
) -> _StreamT:
|
|
1168
|
-
...
|
|
1165
|
+
) -> _StreamT: ...
|
|
1169
1166
|
|
|
1170
1167
|
@overload
|
|
1171
1168
|
def get(
|
|
@@ -1176,8 +1173,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
1176
1173
|
options: RequestOptions = {},
|
|
1177
1174
|
stream: bool,
|
|
1178
1175
|
stream_cls: type[_StreamT] | None = None,
|
|
1179
|
-
) -> ResponseT | _StreamT:
|
|
1180
|
-
...
|
|
1176
|
+
) -> ResponseT | _StreamT: ...
|
|
1181
1177
|
|
|
1182
1178
|
def get(
|
|
1183
1179
|
self,
|
|
@@ -1203,8 +1199,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
1203
1199
|
options: RequestOptions = {},
|
|
1204
1200
|
files: RequestFiles | None = None,
|
|
1205
1201
|
stream: Literal[False] = False,
|
|
1206
|
-
) -> ResponseT:
|
|
1207
|
-
...
|
|
1202
|
+
) -> ResponseT: ...
|
|
1208
1203
|
|
|
1209
1204
|
@overload
|
|
1210
1205
|
def post(
|
|
@@ -1217,8 +1212,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
1217
1212
|
files: RequestFiles | None = None,
|
|
1218
1213
|
stream: Literal[True],
|
|
1219
1214
|
stream_cls: type[_StreamT],
|
|
1220
|
-
) -> _StreamT:
|
|
1221
|
-
...
|
|
1215
|
+
) -> _StreamT: ...
|
|
1222
1216
|
|
|
1223
1217
|
@overload
|
|
1224
1218
|
def post(
|
|
@@ -1231,8 +1225,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
1231
1225
|
files: RequestFiles | None = None,
|
|
1232
1226
|
stream: bool,
|
|
1233
1227
|
stream_cls: type[_StreamT] | None = None,
|
|
1234
|
-
) -> ResponseT | _StreamT:
|
|
1235
|
-
...
|
|
1228
|
+
) -> ResponseT | _StreamT: ...
|
|
1236
1229
|
|
|
1237
1230
|
def post(
|
|
1238
1231
|
self,
|
|
@@ -1465,8 +1458,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1465
1458
|
*,
|
|
1466
1459
|
stream: Literal[False] = False,
|
|
1467
1460
|
remaining_retries: Optional[int] = None,
|
|
1468
|
-
) -> ResponseT:
|
|
1469
|
-
...
|
|
1461
|
+
) -> ResponseT: ...
|
|
1470
1462
|
|
|
1471
1463
|
@overload
|
|
1472
1464
|
async def request(
|
|
@@ -1477,8 +1469,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1477
1469
|
stream: Literal[True],
|
|
1478
1470
|
stream_cls: type[_AsyncStreamT],
|
|
1479
1471
|
remaining_retries: Optional[int] = None,
|
|
1480
|
-
) -> _AsyncStreamT:
|
|
1481
|
-
...
|
|
1472
|
+
) -> _AsyncStreamT: ...
|
|
1482
1473
|
|
|
1483
1474
|
@overload
|
|
1484
1475
|
async def request(
|
|
@@ -1489,8 +1480,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1489
1480
|
stream: bool,
|
|
1490
1481
|
stream_cls: type[_AsyncStreamT] | None = None,
|
|
1491
1482
|
remaining_retries: Optional[int] = None,
|
|
1492
|
-
) -> ResponseT | _AsyncStreamT:
|
|
1493
|
-
...
|
|
1483
|
+
) -> ResponseT | _AsyncStreamT: ...
|
|
1494
1484
|
|
|
1495
1485
|
async def request(
|
|
1496
1486
|
self,
|
|
@@ -1610,6 +1600,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1610
1600
|
response=response,
|
|
1611
1601
|
stream=stream,
|
|
1612
1602
|
stream_cls=stream_cls,
|
|
1603
|
+
retries_taken=options.get_max_retries(self.max_retries) - retries,
|
|
1613
1604
|
)
|
|
1614
1605
|
|
|
1615
1606
|
async def _retry_request(
|
|
@@ -1649,6 +1640,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1649
1640
|
response: httpx.Response,
|
|
1650
1641
|
stream: bool,
|
|
1651
1642
|
stream_cls: type[Stream[Any]] | type[AsyncStream[Any]] | None,
|
|
1643
|
+
retries_taken: int = 0,
|
|
1652
1644
|
) -> ResponseT:
|
|
1653
1645
|
origin = get_origin(cast_to) or cast_to
|
|
1654
1646
|
|
|
@@ -1666,6 +1658,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1666
1658
|
stream=stream,
|
|
1667
1659
|
stream_cls=stream_cls,
|
|
1668
1660
|
options=options,
|
|
1661
|
+
retries_taken=retries_taken,
|
|
1669
1662
|
),
|
|
1670
1663
|
)
|
|
1671
1664
|
|
|
@@ -1679,6 +1672,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1679
1672
|
stream=stream,
|
|
1680
1673
|
stream_cls=stream_cls,
|
|
1681
1674
|
options=options,
|
|
1675
|
+
retries_taken=retries_taken,
|
|
1682
1676
|
)
|
|
1683
1677
|
if bool(response.request.headers.get(RAW_RESPONSE_HEADER)):
|
|
1684
1678
|
return cast(ResponseT, api_response)
|
|
@@ -1701,8 +1695,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1701
1695
|
cast_to: Type[ResponseT],
|
|
1702
1696
|
options: RequestOptions = {},
|
|
1703
1697
|
stream: Literal[False] = False,
|
|
1704
|
-
) -> ResponseT:
|
|
1705
|
-
...
|
|
1698
|
+
) -> ResponseT: ...
|
|
1706
1699
|
|
|
1707
1700
|
@overload
|
|
1708
1701
|
async def get(
|
|
@@ -1713,8 +1706,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1713
1706
|
options: RequestOptions = {},
|
|
1714
1707
|
stream: Literal[True],
|
|
1715
1708
|
stream_cls: type[_AsyncStreamT],
|
|
1716
|
-
) -> _AsyncStreamT:
|
|
1717
|
-
...
|
|
1709
|
+
) -> _AsyncStreamT: ...
|
|
1718
1710
|
|
|
1719
1711
|
@overload
|
|
1720
1712
|
async def get(
|
|
@@ -1725,8 +1717,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1725
1717
|
options: RequestOptions = {},
|
|
1726
1718
|
stream: bool,
|
|
1727
1719
|
stream_cls: type[_AsyncStreamT] | None = None,
|
|
1728
|
-
) -> ResponseT | _AsyncStreamT:
|
|
1729
|
-
...
|
|
1720
|
+
) -> ResponseT | _AsyncStreamT: ...
|
|
1730
1721
|
|
|
1731
1722
|
async def get(
|
|
1732
1723
|
self,
|
|
@@ -1750,8 +1741,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1750
1741
|
files: RequestFiles | None = None,
|
|
1751
1742
|
options: RequestOptions = {},
|
|
1752
1743
|
stream: Literal[False] = False,
|
|
1753
|
-
) -> ResponseT:
|
|
1754
|
-
...
|
|
1744
|
+
) -> ResponseT: ...
|
|
1755
1745
|
|
|
1756
1746
|
@overload
|
|
1757
1747
|
async def post(
|
|
@@ -1764,8 +1754,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1764
1754
|
options: RequestOptions = {},
|
|
1765
1755
|
stream: Literal[True],
|
|
1766
1756
|
stream_cls: type[_AsyncStreamT],
|
|
1767
|
-
) -> _AsyncStreamT:
|
|
1768
|
-
...
|
|
1757
|
+
) -> _AsyncStreamT: ...
|
|
1769
1758
|
|
|
1770
1759
|
@overload
|
|
1771
1760
|
async def post(
|
|
@@ -1778,8 +1767,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1778
1767
|
options: RequestOptions = {},
|
|
1779
1768
|
stream: bool,
|
|
1780
1769
|
stream_cls: type[_AsyncStreamT] | None = None,
|
|
1781
|
-
) -> ResponseT | _AsyncStreamT:
|
|
1782
|
-
...
|
|
1770
|
+
) -> ResponseT | _AsyncStreamT: ...
|
|
1783
1771
|
|
|
1784
1772
|
async def post(
|
|
1785
1773
|
self,
|
|
@@ -1995,7 +1983,6 @@ def get_python_version() -> str:
|
|
|
1995
1983
|
|
|
1996
1984
|
def get_architecture() -> Arch:
|
|
1997
1985
|
try:
|
|
1998
|
-
python_bitness, _ = platform.architecture()
|
|
1999
1986
|
machine = platform.machine().lower()
|
|
2000
1987
|
except Exception:
|
|
2001
1988
|
return "unknown"
|
|
@@ -2011,7 +1998,7 @@ def get_architecture() -> Arch:
|
|
|
2011
1998
|
return "x64"
|
|
2012
1999
|
|
|
2013
2000
|
# TODO: untested
|
|
2014
|
-
if
|
|
2001
|
+
if sys.maxsize <= 2**32:
|
|
2015
2002
|
return "x32"
|
|
2016
2003
|
|
|
2017
2004
|
if machine:
|