runloop-api-client 0.1.0a22__tar.gz → 0.1.0a23__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.
Files changed (129) hide show
  1. runloop_api_client-0.1.0a23/.release-please-manifest.json +3 -0
  2. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/CHANGELOG.md +22 -0
  3. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/PKG-INFO +1 -1
  4. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/api.md +1 -0
  5. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/pyproject.toml +1 -1
  6. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/_base_client.py +8 -1
  7. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/_response.py +3 -0
  8. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/_version.py +1 -1
  9. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/resources/blueprints.py +2 -2
  10. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/resources/devboxes/devboxes.py +101 -0
  11. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/__init__.py +1 -0
  12. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/blueprint_list_params.py +1 -1
  13. runloop_api_client-0.1.0a23/src/runloop_api_client/types/devbox_download_file_params.py +12 -0
  14. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/tests/api_resources/test_blueprints.py +2 -2
  15. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/tests/api_resources/test_devboxes.py +116 -0
  16. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/tests/test_client.py +2 -0
  17. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/tests/test_response.py +50 -0
  18. runloop_api_client-0.1.0a22/.release-please-manifest.json +0 -3
  19. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/.gitignore +0 -0
  20. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/CONTRIBUTING.md +0 -0
  21. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/LICENSE +0 -0
  22. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/README.md +0 -0
  23. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/SECURITY.md +0 -0
  24. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/bin/check-release-environment +0 -0
  25. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/bin/publish-pypi +0 -0
  26. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/examples/.keep +0 -0
  27. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/mypy.ini +0 -0
  28. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/noxfile.py +0 -0
  29. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/release-please-config.json +0 -0
  30. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/requirements-dev.lock +0 -0
  31. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/requirements.lock +0 -0
  32. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop/lib/.keep +0 -0
  33. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/__init__.py +0 -0
  34. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/_client.py +0 -0
  35. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/_compat.py +0 -0
  36. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/_constants.py +0 -0
  37. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/_exceptions.py +0 -0
  38. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/_files.py +0 -0
  39. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/_models.py +0 -0
  40. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/_qs.py +0 -0
  41. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/_resource.py +0 -0
  42. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/_streaming.py +0 -0
  43. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/_types.py +0 -0
  44. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/_utils/__init__.py +0 -0
  45. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/_utils/_logs.py +0 -0
  46. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/_utils/_proxy.py +0 -0
  47. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/_utils/_reflection.py +0 -0
  48. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/_utils/_streams.py +0 -0
  49. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/_utils/_sync.py +0 -0
  50. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/_utils/_transform.py +0 -0
  51. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/_utils/_typing.py +0 -0
  52. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/_utils/_utils.py +0 -0
  53. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/lib/.keep +0 -0
  54. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/py.typed +0 -0
  55. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/resources/__init__.py +0 -0
  56. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/resources/devboxes/__init__.py +0 -0
  57. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/resources/devboxes/executions.py +0 -0
  58. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/resources/devboxes/logs.py +0 -0
  59. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/resources/functions/__init__.py +0 -0
  60. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/resources/functions/functions.py +0 -0
  61. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/resources/functions/invocations.py +0 -0
  62. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/resources/projects/__init__.py +0 -0
  63. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/resources/projects/logs.py +0 -0
  64. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/resources/projects/projects.py +0 -0
  65. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/blueprint_build_log.py +0 -0
  66. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/blueprint_build_logs_list_view.py +0 -0
  67. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/blueprint_build_parameters.py +0 -0
  68. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/blueprint_create_params.py +0 -0
  69. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/blueprint_list_view.py +0 -0
  70. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/blueprint_preview_params.py +0 -0
  71. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/blueprint_preview_view.py +0 -0
  72. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/blueprint_view.py +0 -0
  73. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/code_mount_parameters.py +0 -0
  74. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/code_mount_parameters_param.py +0 -0
  75. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/devbox_async_execution_detail_view.py +0 -0
  76. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/devbox_create_params.py +0 -0
  77. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/devbox_create_ssh_key_response.py +0 -0
  78. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/devbox_execute_async_params.py +0 -0
  79. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/devbox_execute_sync_params.py +0 -0
  80. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/devbox_execution_detail_view.py +0 -0
  81. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/devbox_list_params.py +0 -0
  82. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/devbox_list_view.py +0 -0
  83. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/devbox_read_file_contents_params.py +0 -0
  84. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/devbox_read_file_contents_response.py +0 -0
  85. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/devbox_upload_file_params.py +0 -0
  86. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/devbox_view.py +0 -0
  87. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/devbox_write_file_params.py +0 -0
  88. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/devboxes/__init__.py +0 -0
  89. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/devboxes/devbox_logs_list_view.py +0 -0
  90. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/devboxes/execution_execute_async_params.py +0 -0
  91. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/devboxes/execution_execute_sync_params.py +0 -0
  92. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/devboxes/execution_retrieve_params.py +0 -0
  93. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/devboxes/log_list_params.py +0 -0
  94. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/function_invoke_async_params.py +0 -0
  95. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/function_invoke_sync_params.py +0 -0
  96. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/function_list_view.py +0 -0
  97. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/functions/__init__.py +0 -0
  98. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/functions/function_invocation_list_view.py +0 -0
  99. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/functions/invocation_list_params.py +0 -0
  100. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/project_list_view.py +0 -0
  101. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/projects/__init__.py +0 -0
  102. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/resource_size.py +0 -0
  103. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/shared/__init__.py +0 -0
  104. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/shared/function_invocation_execution_detail_view.py +0 -0
  105. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/src/runloop_api_client/types/shared/project_logs_view.py +0 -0
  106. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/tests/__init__.py +0 -0
  107. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/tests/api_resources/__init__.py +0 -0
  108. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/tests/api_resources/devboxes/__init__.py +0 -0
  109. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/tests/api_resources/devboxes/test_executions.py +0 -0
  110. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/tests/api_resources/devboxes/test_logs.py +0 -0
  111. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/tests/api_resources/functions/__init__.py +0 -0
  112. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/tests/api_resources/functions/test_invocations.py +0 -0
  113. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/tests/api_resources/projects/__init__.py +0 -0
  114. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/tests/api_resources/projects/test_logs.py +0 -0
  115. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/tests/api_resources/test_functions.py +0 -0
  116. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/tests/api_resources/test_projects.py +0 -0
  117. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/tests/conftest.py +0 -0
  118. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/tests/sample_file.txt +0 -0
  119. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/tests/test_deepcopy.py +0 -0
  120. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/tests/test_extract_files.py +0 -0
  121. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/tests/test_files.py +0 -0
  122. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/tests/test_models.py +0 -0
  123. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/tests/test_qs.py +0 -0
  124. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/tests/test_required_args.py +0 -0
  125. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/tests/test_streaming.py +0 -0
  126. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/tests/test_transform.py +0 -0
  127. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/tests/test_utils/test_proxy.py +0 -0
  128. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/tests/test_utils/test_typing.py +0 -0
  129. {runloop_api_client-0.1.0a22 → runloop_api_client-0.1.0a23}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0-alpha.23"
3
+ }
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.23 (2024-10-07)
4
+
5
+ Full Changelog: [v0.1.0-alpha.22...v0.1.0-alpha.23](https://github.com/runloopai/api-client-python/compare/v0.1.0-alpha.22...v0.1.0-alpha.23)
6
+
7
+ ### Features
8
+
9
+ * **api:** OpenAPI spec update via Stainless API ([#177](https://github.com/runloopai/api-client-python/issues/177)) ([ffb1036](https://github.com/runloopai/api-client-python/commit/ffb1036dbfc4cbd07a13ecdd2b18325604d7674c))
10
+ * **api:** OpenAPI spec update via Stainless API ([#179](https://github.com/runloopai/api-client-python/issues/179)) ([77911b5](https://github.com/runloopai/api-client-python/commit/77911b5618161d23bba170802f102308ba21c13e))
11
+ * **api:** OpenAPI spec update via Stainless API ([#180](https://github.com/runloopai/api-client-python/issues/180)) ([0849ddb](https://github.com/runloopai/api-client-python/commit/0849ddb9062ba0c2e3d2adfb2e2b3f2f72f4c29b))
12
+ * **api:** OpenAPI spec update via Stainless API ([#184](https://github.com/runloopai/api-client-python/issues/184)) ([7022855](https://github.com/runloopai/api-client-python/commit/702285559eac8be1082f7a0b7a8f66d034377286))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * **client:** avoid OverflowError with very large retry counts ([#182](https://github.com/runloopai/api-client-python/issues/182)) ([c183989](https://github.com/runloopai/api-client-python/commit/c183989104d3e2e283a082999ca5c6b5e93a463e))
18
+
19
+
20
+ ### Chores
21
+
22
+ * add repr to PageInfo class ([#183](https://github.com/runloopai/api-client-python/issues/183)) ([29b7283](https://github.com/runloopai/api-client-python/commit/29b7283228e3fa02621d65b93efff058c4330cba))
23
+ * **internal:** add support for parsing bool response content ([#181](https://github.com/runloopai/api-client-python/issues/181)) ([e2f1795](https://github.com/runloopai/api-client-python/commit/e2f1795c158baaf93118af62d4156629aa2ac816))
24
+
3
25
  ## 0.1.0-alpha.22 (2024-10-01)
4
26
 
5
27
  Full Changelog: [v0.1.0-alpha.21...v0.1.0-alpha.22](https://github.com/runloopai/api-client-python/compare/v0.1.0-alpha.21...v0.1.0-alpha.22)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: runloop_api_client
3
- Version: 0.1.0a22
3
+ Version: 0.1.0a23
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
@@ -65,6 +65,7 @@ Methods:
65
65
  - <code title="get /v1/devboxes/{id}">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">retrieve</a>(id) -> <a href="./src/runloop_api_client/types/devbox_view.py">DevboxView</a></code>
66
66
  - <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>
67
67
  - <code title="post /v1/devboxes/{id}/create_ssh_key">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">create_ssh_key</a>(id) -> <a href="./src/runloop_api_client/types/devbox_create_ssh_key_response.py">DevboxCreateSSHKeyResponse</a></code>
68
+ - <code title="post /v1/devboxes/{id}/download_file">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">download_file</a>(id, \*\*<a href="src/runloop_api_client/types/devbox_download_file_params.py">params</a>) -> BinaryAPIResponse</code>
68
69
  - <code title="post /v1/devboxes/{id}/execute_async">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">execute_async</a>(id, \*\*<a href="src/runloop_api_client/types/devbox_execute_async_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_async_execution_detail_view.py">DevboxAsyncExecutionDetailView</a></code>
69
70
  - <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>
70
71
  - <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>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "runloop_api_client"
3
- version = "0.1.0-alpha.22"
3
+ version = "0.1.0-alpha.23"
4
4
  description = "The official Python library for the runloop API"
5
5
  dynamic = ["readme"]
6
6
  license = "MIT"
@@ -143,6 +143,12 @@ class PageInfo:
143
143
  self.url = url
144
144
  self.params = params
145
145
 
146
+ @override
147
+ def __repr__(self) -> str:
148
+ if self.url:
149
+ return f"{self.__class__.__name__}(url={self.url})"
150
+ return f"{self.__class__.__name__}(params={self.params})"
151
+
146
152
 
147
153
  class BasePage(GenericModel, Generic[_T]):
148
154
  """
@@ -689,7 +695,8 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
689
695
  if retry_after is not None and 0 < retry_after <= 60:
690
696
  return retry_after
691
697
 
692
- nb_retries = max_retries - remaining_retries
698
+ # Also cap retry count to 1000 to avoid any potential overflows with `pow`
699
+ nb_retries = min(max_retries - remaining_retries, 1000)
693
700
 
694
701
  # Apply exponential backoff, but not more than the max.
695
702
  sleep_seconds = min(INITIAL_RETRY_DELAY * pow(2.0, nb_retries), MAX_RETRY_DELAY)
@@ -192,6 +192,9 @@ class BaseAPIResponse(Generic[R]):
192
192
  if cast_to == float:
193
193
  return cast(R, float(response.text))
194
194
 
195
+ if cast_to == bool:
196
+ return cast(R, response.text.lower() == "true")
197
+
195
198
  origin = get_origin(cast_to) or cast_to
196
199
 
197
200
  if origin == APIResponse:
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "runloop_api_client"
4
- __version__ = "0.1.0-alpha.22" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.23" # x-release-please-version
@@ -148,7 +148,7 @@ class BlueprintsResource(SyncAPIResource):
148
148
  def list(
149
149
  self,
150
150
  *,
151
- limit: str | NotGiven = NOT_GIVEN,
151
+ limit: int | NotGiven = NOT_GIVEN,
152
152
  name: str | NotGiven = NOT_GIVEN,
153
153
  starting_after: str | NotGiven = NOT_GIVEN,
154
154
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -410,7 +410,7 @@ class AsyncBlueprintsResource(AsyncAPIResource):
410
410
  async def list(
411
411
  self,
412
412
  *,
413
- limit: str | NotGiven = NOT_GIVEN,
413
+ limit: int | NotGiven = NOT_GIVEN,
414
414
  name: str | NotGiven = NOT_GIVEN,
415
415
  starting_after: str | NotGiven = NOT_GIVEN,
416
416
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -20,6 +20,7 @@ from ...types import (
20
20
  devbox_write_file_params,
21
21
  devbox_upload_file_params,
22
22
  devbox_execute_sync_params,
23
+ devbox_download_file_params,
23
24
  devbox_execute_async_params,
24
25
  devbox_read_file_contents_params,
25
26
  )
@@ -41,10 +42,18 @@ from .executions import (
41
42
  )
42
43
  from ..._resource import SyncAPIResource, AsyncAPIResource
43
44
  from ..._response import (
45
+ BinaryAPIResponse,
46
+ AsyncBinaryAPIResponse,
47
+ StreamedBinaryAPIResponse,
48
+ AsyncStreamedBinaryAPIResponse,
44
49
  to_raw_response_wrapper,
45
50
  to_streamed_response_wrapper,
46
51
  async_to_raw_response_wrapper,
52
+ to_custom_raw_response_wrapper,
47
53
  async_to_streamed_response_wrapper,
54
+ to_custom_streamed_response_wrapper,
55
+ async_to_custom_raw_response_wrapper,
56
+ async_to_custom_streamed_response_wrapper,
48
57
  )
49
58
  from ..._base_client import make_request_options
50
59
  from ...types.devbox_view import DevboxView
@@ -291,6 +300,44 @@ class DevboxesResource(SyncAPIResource):
291
300
  cast_to=DevboxCreateSSHKeyResponse,
292
301
  )
293
302
 
303
+ def download_file(
304
+ self,
305
+ id: str,
306
+ *,
307
+ path: str,
308
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
309
+ # The extra values given here take precedence over values defined on the client or passed to this method.
310
+ extra_headers: Headers | None = None,
311
+ extra_query: Query | None = None,
312
+ extra_body: Body | None = None,
313
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
314
+ ) -> BinaryAPIResponse:
315
+ """
316
+ Download file contents to a file at path on the Devbox.
317
+
318
+ Args:
319
+ path: The path on the devbox to read the file
320
+
321
+ extra_headers: Send extra headers
322
+
323
+ extra_query: Add additional query parameters to the request
324
+
325
+ extra_body: Add additional JSON properties to the request
326
+
327
+ timeout: Override the client-level default timeout for this request, in seconds
328
+ """
329
+ if not id:
330
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
331
+ extra_headers = {"Accept": "application/octet-stream", **(extra_headers or {})}
332
+ return self._post(
333
+ f"/v1/devboxes/{id}/download_file",
334
+ body=maybe_transform({"path": path}, devbox_download_file_params.DevboxDownloadFileParams),
335
+ options=make_request_options(
336
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
337
+ ),
338
+ cast_to=BinaryAPIResponse,
339
+ )
340
+
294
341
  def execute_async(
295
342
  self,
296
343
  id: str,
@@ -786,6 +833,44 @@ class AsyncDevboxesResource(AsyncAPIResource):
786
833
  cast_to=DevboxCreateSSHKeyResponse,
787
834
  )
788
835
 
836
+ async def download_file(
837
+ self,
838
+ id: str,
839
+ *,
840
+ path: str,
841
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
842
+ # The extra values given here take precedence over values defined on the client or passed to this method.
843
+ extra_headers: Headers | None = None,
844
+ extra_query: Query | None = None,
845
+ extra_body: Body | None = None,
846
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
847
+ ) -> AsyncBinaryAPIResponse:
848
+ """
849
+ Download file contents to a file at path on the Devbox.
850
+
851
+ Args:
852
+ path: The path on the devbox to read the file
853
+
854
+ extra_headers: Send extra headers
855
+
856
+ extra_query: Add additional query parameters to the request
857
+
858
+ extra_body: Add additional JSON properties to the request
859
+
860
+ timeout: Override the client-level default timeout for this request, in seconds
861
+ """
862
+ if not id:
863
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
864
+ extra_headers = {"Accept": "application/octet-stream", **(extra_headers or {})}
865
+ return await self._post(
866
+ f"/v1/devboxes/{id}/download_file",
867
+ body=await async_maybe_transform({"path": path}, devbox_download_file_params.DevboxDownloadFileParams),
868
+ options=make_request_options(
869
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
870
+ ),
871
+ cast_to=AsyncBinaryAPIResponse,
872
+ )
873
+
789
874
  async def execute_async(
790
875
  self,
791
876
  id: str,
@@ -1063,6 +1148,10 @@ class DevboxesResourceWithRawResponse:
1063
1148
  self.create_ssh_key = to_raw_response_wrapper(
1064
1149
  devboxes.create_ssh_key,
1065
1150
  )
1151
+ self.download_file = to_custom_raw_response_wrapper(
1152
+ devboxes.download_file,
1153
+ BinaryAPIResponse,
1154
+ )
1066
1155
  self.execute_async = to_raw_response_wrapper(
1067
1156
  devboxes.execute_async,
1068
1157
  )
@@ -1107,6 +1196,10 @@ class AsyncDevboxesResourceWithRawResponse:
1107
1196
  self.create_ssh_key = async_to_raw_response_wrapper(
1108
1197
  devboxes.create_ssh_key,
1109
1198
  )
1199
+ self.download_file = async_to_custom_raw_response_wrapper(
1200
+ devboxes.download_file,
1201
+ AsyncBinaryAPIResponse,
1202
+ )
1110
1203
  self.execute_async = async_to_raw_response_wrapper(
1111
1204
  devboxes.execute_async,
1112
1205
  )
@@ -1151,6 +1244,10 @@ class DevboxesResourceWithStreamingResponse:
1151
1244
  self.create_ssh_key = to_streamed_response_wrapper(
1152
1245
  devboxes.create_ssh_key,
1153
1246
  )
1247
+ self.download_file = to_custom_streamed_response_wrapper(
1248
+ devboxes.download_file,
1249
+ StreamedBinaryAPIResponse,
1250
+ )
1154
1251
  self.execute_async = to_streamed_response_wrapper(
1155
1252
  devboxes.execute_async,
1156
1253
  )
@@ -1195,6 +1292,10 @@ class AsyncDevboxesResourceWithStreamingResponse:
1195
1292
  self.create_ssh_key = async_to_streamed_response_wrapper(
1196
1293
  devboxes.create_ssh_key,
1197
1294
  )
1295
+ self.download_file = async_to_custom_streamed_response_wrapper(
1296
+ devboxes.download_file,
1297
+ AsyncStreamedBinaryAPIResponse,
1298
+ )
1198
1299
  self.execute_async = async_to_streamed_response_wrapper(
1199
1300
  devboxes.execute_async,
1200
1301
  )
@@ -26,6 +26,7 @@ from .devbox_upload_file_params import DevboxUploadFileParams as DevboxUploadFil
26
26
  from .blueprint_build_parameters import BlueprintBuildParameters as BlueprintBuildParameters
27
27
  from .devbox_execute_sync_params import DevboxExecuteSyncParams as DevboxExecuteSyncParams
28
28
  from .code_mount_parameters_param import CodeMountParametersParam as CodeMountParametersParam
29
+ from .devbox_download_file_params import DevboxDownloadFileParams as DevboxDownloadFileParams
29
30
  from .devbox_execute_async_params import DevboxExecuteAsyncParams as DevboxExecuteAsyncParams
30
31
  from .function_invoke_sync_params import FunctionInvokeSyncParams as FunctionInvokeSyncParams
31
32
  from .devbox_execution_detail_view import DevboxExecutionDetailView as DevboxExecutionDetailView
@@ -8,7 +8,7 @@ __all__ = ["BlueprintListParams"]
8
8
 
9
9
 
10
10
  class BlueprintListParams(TypedDict, total=False):
11
- limit: str
11
+ limit: int
12
12
  """Page Limit"""
13
13
 
14
14
  name: str
@@ -0,0 +1,12 @@
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 Required, TypedDict
6
+
7
+ __all__ = ["DevboxDownloadFileParams"]
8
+
9
+
10
+ class DevboxDownloadFileParams(TypedDict, total=False):
11
+ path: Required[str]
12
+ """The path on the devbox to read the file"""
@@ -134,7 +134,7 @@ class TestBlueprints:
134
134
  @parametrize
135
135
  def test_method_list_with_all_params(self, client: Runloop) -> None:
136
136
  blueprint = client.blueprints.list(
137
- limit="limit",
137
+ limit=0,
138
138
  name="name",
139
139
  starting_after="starting_after",
140
140
  )
@@ -380,7 +380,7 @@ class TestAsyncBlueprints:
380
380
  @parametrize
381
381
  async def test_method_list_with_all_params(self, async_client: AsyncRunloop) -> None:
382
382
  blueprint = await async_client.blueprints.list(
383
- limit="limit",
383
+ limit=0,
384
384
  name="name",
385
385
  starting_after="starting_after",
386
386
  )
@@ -5,7 +5,9 @@ from __future__ import annotations
5
5
  import os
6
6
  from typing import Any, cast
7
7
 
8
+ import httpx
8
9
  import pytest
10
+ from respx import MockRouter
9
11
 
10
12
  from tests.utils import assert_matches_type
11
13
  from runloop_api_client import Runloop, AsyncRunloop
@@ -16,6 +18,12 @@ from runloop_api_client.types import (
16
18
  DevboxCreateSSHKeyResponse,
17
19
  DevboxAsyncExecutionDetailView,
18
20
  )
21
+ from runloop_api_client._response import (
22
+ BinaryAPIResponse,
23
+ AsyncBinaryAPIResponse,
24
+ StreamedBinaryAPIResponse,
25
+ AsyncStreamedBinaryAPIResponse,
26
+ )
19
27
 
20
28
  base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
21
29
 
@@ -198,6 +206,60 @@ class TestDevboxes:
198
206
  "",
199
207
  )
200
208
 
209
+ @parametrize
210
+ @pytest.mark.respx(base_url=base_url)
211
+ def test_method_download_file(self, client: Runloop, respx_mock: MockRouter) -> None:
212
+ respx_mock.post("/v1/devboxes/id/download_file").mock(return_value=httpx.Response(200, json={"foo": "bar"}))
213
+ devbox = client.devboxes.download_file(
214
+ id="id",
215
+ path="path",
216
+ )
217
+ assert devbox.is_closed
218
+ assert devbox.json() == {"foo": "bar"}
219
+ assert cast(Any, devbox.is_closed) is True
220
+ assert isinstance(devbox, BinaryAPIResponse)
221
+
222
+ @parametrize
223
+ @pytest.mark.respx(base_url=base_url)
224
+ def test_raw_response_download_file(self, client: Runloop, respx_mock: MockRouter) -> None:
225
+ respx_mock.post("/v1/devboxes/id/download_file").mock(return_value=httpx.Response(200, json={"foo": "bar"}))
226
+
227
+ devbox = client.devboxes.with_raw_response.download_file(
228
+ id="id",
229
+ path="path",
230
+ )
231
+
232
+ assert devbox.is_closed is True
233
+ assert devbox.http_request.headers.get("X-Stainless-Lang") == "python"
234
+ assert devbox.json() == {"foo": "bar"}
235
+ assert isinstance(devbox, BinaryAPIResponse)
236
+
237
+ @parametrize
238
+ @pytest.mark.respx(base_url=base_url)
239
+ def test_streaming_response_download_file(self, client: Runloop, respx_mock: MockRouter) -> None:
240
+ respx_mock.post("/v1/devboxes/id/download_file").mock(return_value=httpx.Response(200, json={"foo": "bar"}))
241
+ with client.devboxes.with_streaming_response.download_file(
242
+ id="id",
243
+ path="path",
244
+ ) as devbox:
245
+ assert not devbox.is_closed
246
+ assert devbox.http_request.headers.get("X-Stainless-Lang") == "python"
247
+
248
+ assert devbox.json() == {"foo": "bar"}
249
+ assert cast(Any, devbox.is_closed) is True
250
+ assert isinstance(devbox, StreamedBinaryAPIResponse)
251
+
252
+ assert cast(Any, devbox.is_closed) is True
253
+
254
+ @parametrize
255
+ @pytest.mark.respx(base_url=base_url)
256
+ def test_path_params_download_file(self, client: Runloop) -> None:
257
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
258
+ client.devboxes.with_raw_response.download_file(
259
+ id="",
260
+ path="path",
261
+ )
262
+
201
263
  @parametrize
202
264
  def test_method_execute_async(self, client: Runloop) -> None:
203
265
  devbox = client.devboxes.execute_async(
@@ -652,6 +714,60 @@ class TestAsyncDevboxes:
652
714
  "",
653
715
  )
654
716
 
717
+ @parametrize
718
+ @pytest.mark.respx(base_url=base_url)
719
+ async def test_method_download_file(self, async_client: AsyncRunloop, respx_mock: MockRouter) -> None:
720
+ respx_mock.post("/v1/devboxes/id/download_file").mock(return_value=httpx.Response(200, json={"foo": "bar"}))
721
+ devbox = await async_client.devboxes.download_file(
722
+ id="id",
723
+ path="path",
724
+ )
725
+ assert devbox.is_closed
726
+ assert await devbox.json() == {"foo": "bar"}
727
+ assert cast(Any, devbox.is_closed) is True
728
+ assert isinstance(devbox, AsyncBinaryAPIResponse)
729
+
730
+ @parametrize
731
+ @pytest.mark.respx(base_url=base_url)
732
+ async def test_raw_response_download_file(self, async_client: AsyncRunloop, respx_mock: MockRouter) -> None:
733
+ respx_mock.post("/v1/devboxes/id/download_file").mock(return_value=httpx.Response(200, json={"foo": "bar"}))
734
+
735
+ devbox = await async_client.devboxes.with_raw_response.download_file(
736
+ id="id",
737
+ path="path",
738
+ )
739
+
740
+ assert devbox.is_closed is True
741
+ assert devbox.http_request.headers.get("X-Stainless-Lang") == "python"
742
+ assert await devbox.json() == {"foo": "bar"}
743
+ assert isinstance(devbox, AsyncBinaryAPIResponse)
744
+
745
+ @parametrize
746
+ @pytest.mark.respx(base_url=base_url)
747
+ async def test_streaming_response_download_file(self, async_client: AsyncRunloop, respx_mock: MockRouter) -> None:
748
+ respx_mock.post("/v1/devboxes/id/download_file").mock(return_value=httpx.Response(200, json={"foo": "bar"}))
749
+ async with async_client.devboxes.with_streaming_response.download_file(
750
+ id="id",
751
+ path="path",
752
+ ) as devbox:
753
+ assert not devbox.is_closed
754
+ assert devbox.http_request.headers.get("X-Stainless-Lang") == "python"
755
+
756
+ assert await devbox.json() == {"foo": "bar"}
757
+ assert cast(Any, devbox.is_closed) is True
758
+ assert isinstance(devbox, AsyncStreamedBinaryAPIResponse)
759
+
760
+ assert cast(Any, devbox.is_closed) is True
761
+
762
+ @parametrize
763
+ @pytest.mark.respx(base_url=base_url)
764
+ async def test_path_params_download_file(self, async_client: AsyncRunloop) -> None:
765
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
766
+ await async_client.devboxes.with_raw_response.download_file(
767
+ id="",
768
+ path="path",
769
+ )
770
+
655
771
  @parametrize
656
772
  async def test_method_execute_async(self, async_client: AsyncRunloop) -> None:
657
773
  devbox = await async_client.devboxes.execute_async(
@@ -720,6 +720,7 @@ class TestRunloop:
720
720
  [3, "", 0.5],
721
721
  [2, "", 0.5 * 2.0],
722
722
  [1, "", 0.5 * 4.0],
723
+ [-1100, "", 7.8], # test large number potentially overflowing
723
724
  ],
724
725
  )
725
726
  @mock.patch("time.time", mock.MagicMock(return_value=1696004797))
@@ -1503,6 +1504,7 @@ class TestAsyncRunloop:
1503
1504
  [3, "", 0.5],
1504
1505
  [2, "", 0.5 * 2.0],
1505
1506
  [1, "", 0.5 * 4.0],
1507
+ [-1100, "", 7.8], # test large number potentially overflowing
1506
1508
  ],
1507
1509
  )
1508
1510
  @mock.patch("time.time", mock.MagicMock(return_value=1696004797))
@@ -190,6 +190,56 @@ async def test_async_response_parse_annotated_type(async_client: AsyncRunloop) -
190
190
  assert obj.bar == 2
191
191
 
192
192
 
193
+ @pytest.mark.parametrize(
194
+ "content, expected",
195
+ [
196
+ ("false", False),
197
+ ("true", True),
198
+ ("False", False),
199
+ ("True", True),
200
+ ("TrUe", True),
201
+ ("FalSe", False),
202
+ ],
203
+ )
204
+ def test_response_parse_bool(client: Runloop, content: str, expected: bool) -> None:
205
+ response = APIResponse(
206
+ raw=httpx.Response(200, content=content),
207
+ client=client,
208
+ stream=False,
209
+ stream_cls=None,
210
+ cast_to=str,
211
+ options=FinalRequestOptions.construct(method="get", url="/foo"),
212
+ )
213
+
214
+ result = response.parse(to=bool)
215
+ assert result is expected
216
+
217
+
218
+ @pytest.mark.parametrize(
219
+ "content, expected",
220
+ [
221
+ ("false", False),
222
+ ("true", True),
223
+ ("False", False),
224
+ ("True", True),
225
+ ("TrUe", True),
226
+ ("FalSe", False),
227
+ ],
228
+ )
229
+ async def test_async_response_parse_bool(client: AsyncRunloop, content: str, expected: bool) -> None:
230
+ response = AsyncAPIResponse(
231
+ raw=httpx.Response(200, content=content),
232
+ client=client,
233
+ stream=False,
234
+ stream_cls=None,
235
+ cast_to=str,
236
+ options=FinalRequestOptions.construct(method="get", url="/foo"),
237
+ )
238
+
239
+ result = await response.parse(to=bool)
240
+ assert result is expected
241
+
242
+
193
243
  class OtherModel(BaseModel):
194
244
  a: str
195
245
 
@@ -1,3 +0,0 @@
1
- {
2
- ".": "0.1.0-alpha.22"
3
- }