modal 1.1.5.dev78__tar.gz → 1.1.5.dev82__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.

Potentially problematic release.


This version of modal might be problematic. Click here for more details.

Files changed (196) hide show
  1. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/PKG-INFO +1 -1
  2. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/app.py +34 -5
  3. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/app.pyi +82 -16
  4. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/client.pyi +2 -2
  5. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal.egg-info/PKG-INFO +1 -1
  6. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_proto/sandbox_router.proto +24 -2
  7. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_proto/sandbox_router_grpc.py +16 -0
  8. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_proto/sandbox_router_pb2.py +45 -25
  9. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_proto/sandbox_router_pb2.pyi +44 -0
  10. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_proto/sandbox_router_pb2_grpc.py +34 -0
  11. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_proto/sandbox_router_pb2_grpc.pyi +12 -0
  12. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_version/__init__.py +1 -1
  13. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/LICENSE +0 -0
  14. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/README.md +0 -0
  15. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/__init__.py +0 -0
  16. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/__main__.py +0 -0
  17. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_clustered_functions.py +0 -0
  18. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_clustered_functions.pyi +0 -0
  19. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_container_entrypoint.py +0 -0
  20. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_functions.py +0 -0
  21. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_ipython.py +0 -0
  22. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_location.py +0 -0
  23. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_object.py +0 -0
  24. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_output.py +0 -0
  25. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_partial_function.py +0 -0
  26. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_pty.py +0 -0
  27. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_resolver.py +0 -0
  28. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_resources.py +0 -0
  29. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_runtime/__init__.py +0 -0
  30. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_runtime/asgi.py +0 -0
  31. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_runtime/container_io_manager.py +0 -0
  32. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_runtime/container_io_manager.pyi +0 -0
  33. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_runtime/execution_context.py +0 -0
  34. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_runtime/execution_context.pyi +0 -0
  35. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_runtime/gpu_memory_snapshot.py +0 -0
  36. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_runtime/telemetry.py +0 -0
  37. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_runtime/user_code_imports.py +0 -0
  38. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_serialization.py +0 -0
  39. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_traceback.py +0 -0
  40. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_tunnel.py +0 -0
  41. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_tunnel.pyi +0 -0
  42. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_type_manager.py +0 -0
  43. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_utils/__init__.py +0 -0
  44. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_utils/app_utils.py +0 -0
  45. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_utils/async_utils.py +0 -0
  46. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_utils/auth_token_manager.py +0 -0
  47. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_utils/blob_utils.py +0 -0
  48. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_utils/bytes_io_segment_payload.py +0 -0
  49. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_utils/deprecation.py +0 -0
  50. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_utils/docker_utils.py +0 -0
  51. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_utils/function_utils.py +0 -0
  52. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_utils/git_utils.py +0 -0
  53. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_utils/grpc_testing.py +0 -0
  54. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_utils/grpc_utils.py +0 -0
  55. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_utils/hash_utils.py +0 -0
  56. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_utils/http_utils.py +0 -0
  57. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_utils/jwt_utils.py +0 -0
  58. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_utils/logger.py +0 -0
  59. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_utils/mount_utils.py +0 -0
  60. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_utils/name_utils.py +0 -0
  61. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_utils/package_utils.py +0 -0
  62. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_utils/pattern_utils.py +0 -0
  63. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_utils/rand_pb_testing.py +0 -0
  64. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_utils/shell_utils.py +0 -0
  65. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_utils/time_utils.py +0 -0
  66. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_vendor/__init__.py +0 -0
  67. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_vendor/a2wsgi_wsgi.py +0 -0
  68. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_vendor/cloudpickle.py +0 -0
  69. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_vendor/tblib.py +0 -0
  70. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/_watcher.py +0 -0
  71. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/builder/2023.12.312.txt +0 -0
  72. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/builder/2023.12.txt +0 -0
  73. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/builder/2024.04.txt +0 -0
  74. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/builder/2024.10.txt +0 -0
  75. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/builder/2025.06.txt +0 -0
  76. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/builder/PREVIEW.txt +0 -0
  77. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/builder/README.md +0 -0
  78. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/builder/base-images.json +0 -0
  79. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/call_graph.py +0 -0
  80. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cli/__init__.py +0 -0
  81. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cli/_download.py +0 -0
  82. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cli/_traceback.py +0 -0
  83. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cli/app.py +0 -0
  84. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cli/cluster.py +0 -0
  85. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cli/config.py +0 -0
  86. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cli/container.py +0 -0
  87. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cli/dict.py +0 -0
  88. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cli/entry_point.py +0 -0
  89. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cli/environment.py +0 -0
  90. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cli/import_refs.py +0 -0
  91. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cli/launch.py +0 -0
  92. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cli/network_file_system.py +0 -0
  93. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cli/profile.py +0 -0
  94. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cli/programs/__init__.py +0 -0
  95. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cli/programs/launch_instance_ssh.py +0 -0
  96. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cli/programs/run_jupyter.py +0 -0
  97. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cli/programs/run_marimo.py +0 -0
  98. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cli/programs/vscode.py +0 -0
  99. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cli/queues.py +0 -0
  100. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cli/run.py +0 -0
  101. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cli/secret.py +0 -0
  102. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cli/token.py +0 -0
  103. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cli/utils.py +0 -0
  104. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cli/volume.py +0 -0
  105. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/client.py +0 -0
  106. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cloud_bucket_mount.py +0 -0
  107. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cloud_bucket_mount.pyi +0 -0
  108. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cls.py +0 -0
  109. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/cls.pyi +0 -0
  110. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/config.py +0 -0
  111. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/container_process.py +0 -0
  112. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/container_process.pyi +0 -0
  113. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/dict.py +0 -0
  114. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/dict.pyi +0 -0
  115. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/environments.py +0 -0
  116. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/environments.pyi +0 -0
  117. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/exception.py +0 -0
  118. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/experimental/__init__.py +0 -0
  119. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/experimental/flash.py +0 -0
  120. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/experimental/flash.pyi +0 -0
  121. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/experimental/ipython.py +0 -0
  122. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/file_io.py +0 -0
  123. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/file_io.pyi +0 -0
  124. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/file_pattern_matcher.py +0 -0
  125. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/functions.py +0 -0
  126. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/functions.pyi +0 -0
  127. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/gpu.py +0 -0
  128. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/image.py +0 -0
  129. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/image.pyi +0 -0
  130. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/io_streams.py +0 -0
  131. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/io_streams.pyi +0 -0
  132. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/mount.py +0 -0
  133. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/mount.pyi +0 -0
  134. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/network_file_system.py +0 -0
  135. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/network_file_system.pyi +0 -0
  136. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/object.py +0 -0
  137. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/object.pyi +0 -0
  138. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/output.py +0 -0
  139. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/parallel_map.py +0 -0
  140. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/parallel_map.pyi +0 -0
  141. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/partial_function.py +0 -0
  142. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/partial_function.pyi +0 -0
  143. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/proxy.py +0 -0
  144. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/proxy.pyi +0 -0
  145. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/py.typed +0 -0
  146. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/queue.py +0 -0
  147. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/queue.pyi +0 -0
  148. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/retries.py +0 -0
  149. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/runner.py +0 -0
  150. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/runner.pyi +0 -0
  151. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/running_app.py +0 -0
  152. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/sandbox.py +0 -0
  153. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/sandbox.pyi +0 -0
  154. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/schedule.py +0 -0
  155. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/scheduler_placement.py +0 -0
  156. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/secret.py +0 -0
  157. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/secret.pyi +0 -0
  158. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/serving.py +0 -0
  159. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/serving.pyi +0 -0
  160. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/snapshot.py +0 -0
  161. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/snapshot.pyi +0 -0
  162. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/stream_type.py +0 -0
  163. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/token_flow.py +0 -0
  164. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/token_flow.pyi +0 -0
  165. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/volume.py +0 -0
  166. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal/volume.pyi +0 -0
  167. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal.egg-info/SOURCES.txt +0 -0
  168. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal.egg-info/dependency_links.txt +0 -0
  169. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal.egg-info/entry_points.txt +0 -0
  170. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal.egg-info/requires.txt +0 -0
  171. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal.egg-info/top_level.txt +0 -0
  172. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_docs/__init__.py +0 -0
  173. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_docs/gen_cli_docs.py +0 -0
  174. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_docs/gen_reference_docs.py +0 -0
  175. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_docs/mdmd/__init__.py +0 -0
  176. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_docs/mdmd/mdmd.py +0 -0
  177. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_docs/mdmd/signatures.py +0 -0
  178. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_proto/__init__.py +0 -0
  179. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_proto/api.proto +0 -0
  180. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_proto/api_grpc.py +0 -0
  181. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_proto/api_pb2.py +0 -0
  182. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_proto/api_pb2.pyi +0 -0
  183. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_proto/api_pb2_grpc.py +0 -0
  184. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_proto/api_pb2_grpc.pyi +0 -0
  185. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_proto/modal_api_grpc.py +0 -0
  186. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_proto/modal_options_grpc.py +0 -0
  187. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_proto/options.proto +0 -0
  188. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_proto/options_grpc.py +0 -0
  189. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_proto/options_pb2.py +0 -0
  190. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_proto/options_pb2.pyi +0 -0
  191. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_proto/options_pb2_grpc.py +0 -0
  192. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_proto/options_pb2_grpc.pyi +0 -0
  193. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_proto/py.typed +0 -0
  194. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/modal_version/__main__.py +0 -0
  195. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/pyproject.toml +0 -0
  196. {modal-1.1.5.dev78 → modal-1.1.5.dev82}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 1.1.5.dev78
3
+ Version: 1.1.5.dev82
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License: Apache-2.0
@@ -227,7 +227,12 @@ class _App:
227
227
 
228
228
  @property
229
229
  def is_interactive(self) -> bool:
230
- """Whether the current app for the app is running in interactive mode."""
230
+ """mdmd:hidden
231
+ Whether the current app for the app is running in interactive mode.
232
+
233
+ Note: this method will likely be deprecated in the future.
234
+
235
+ """
231
236
  # return self._name
232
237
  if self._running_app:
233
238
  return self._running_app.interactive
@@ -285,6 +290,11 @@ class _App:
285
290
  return app
286
291
 
287
292
  def set_description(self, description: str):
293
+ """mdmd:hidden
294
+ Set the description of the App before it starts running.
295
+
296
+ Note: we don't recommend using the method and may deprecate it in the future.
297
+ """
288
298
  self._description = description
289
299
 
290
300
  def _validate_blueprint_value(self, key: str, value: Any):
@@ -293,10 +303,18 @@ class _App:
293
303
 
294
304
  @property
295
305
  def image(self) -> _Image:
306
+ """mdmd:hidden
307
+ Retrieve the Image that will be used as the default for any Functions registered to the App.
308
+
309
+ Note: This property is only relevant in the build phase and won't be populated on a deployed
310
+ App that is retrieved via `modal.App.lookup`. It is likely to be deprecated in the future.
311
+
312
+ """
296
313
  return self._image
297
314
 
298
315
  @image.setter
299
316
  def image(self, value):
317
+ """mdmd:hidden"""
300
318
  self._image = value
301
319
 
302
320
  def _uncreate_all_objects(self):
@@ -515,37 +533,48 @@ class _App:
515
533
 
516
534
  @property
517
535
  def registered_functions(self) -> dict[str, _Function]:
518
- """All modal.Function objects registered on the app.
536
+ """mdmd:hidden
537
+ All modal.Function objects registered on the app.
519
538
 
520
539
  Note: this property is populated only during the build phase, and it is not
521
540
  expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
541
+ This method is likely to be deprecated in the future in favor of a different
542
+ approach for retrieving the layout of a deployed App.
522
543
  """
523
544
  return self._functions
524
545
 
525
546
  @property
526
547
  def registered_classes(self) -> dict[str, _Cls]:
527
- """All modal.Cls objects registered on the app.
548
+ """mdmd:hidden
549
+ All modal.Cls objects registered on the app.
528
550
 
529
551
  Note: this property is populated only during the build phase, and it is not
530
552
  expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
553
+ This method is likely to be deprecated in the future in favor of a different
554
+ approach for retrieving the layout of a deployed App.
531
555
  """
532
556
  return self._classes
533
557
 
534
558
  @property
535
559
  def registered_entrypoints(self) -> dict[str, _LocalEntrypoint]:
536
- """All local CLI entrypoints registered on the app.
560
+ """mdmd:hidden
561
+ All local CLI entrypoints registered on the app.
537
562
 
538
563
  Note: this property is populated only during the build phase, and it is not
539
564
  expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
565
+ This method is likely to be deprecated in the future.
540
566
  """
541
567
  return self._local_entrypoints
542
568
 
543
569
  @property
544
570
  def registered_web_endpoints(self) -> list[str]:
545
- """Names of web endpoint (ie. webhook) functions registered on the app.
571
+ """mdmd:hidden
572
+ Names of web endpoint (ie. webhook) functions registered on the app.
546
573
 
547
574
  Note: this property is populated only during the build phase, and it is not
548
575
  expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
576
+ This method is likely to be deprecated in the future in favor of a different
577
+ approach for retrieving the layout of a deployed App.
549
578
  """
550
579
  return self._web_endpoints
551
580
 
@@ -151,7 +151,11 @@ class _App:
151
151
 
152
152
  @property
153
153
  def is_interactive(self) -> bool:
154
- """Whether the current app for the app is running in interactive mode."""
154
+ """mdmd:hidden
155
+ Whether the current app for the app is running in interactive mode.
156
+
157
+ Note: this method will likely be deprecated in the future.
158
+ """
155
159
  ...
156
160
 
157
161
  @property
@@ -185,12 +189,30 @@ class _App:
185
189
  """
186
190
  ...
187
191
 
188
- def set_description(self, description: str): ...
192
+ def set_description(self, description: str):
193
+ """mdmd:hidden
194
+ Set the description of the App before it starts running.
195
+
196
+ Note: we don't recommend using the method and may deprecate it in the future.
197
+ """
198
+ ...
199
+
189
200
  def _validate_blueprint_value(self, key: str, value: typing.Any): ...
190
201
  @property
191
- def image(self) -> modal.image._Image: ...
202
+ def image(self) -> modal.image._Image:
203
+ """mdmd:hidden
204
+ Retrieve the Image that will be used as the default for any Functions registered to the App.
205
+
206
+ Note: This property is only relevant in the build phase and won't be populated on a deployed
207
+ App that is retrieved via `modal.App.lookup`. It is likely to be deprecated in the future.
208
+ """
209
+ ...
210
+
192
211
  @image.setter
193
- def image(self, value): ...
212
+ def image(self, value):
213
+ """mdmd:hidden"""
214
+ ...
215
+
194
216
  def _uncreate_all_objects(self): ...
195
217
  def _set_local_app(
196
218
  self, client: modal.client._Client, running_app: modal.running_app.RunningApp
@@ -301,37 +323,48 @@ class _App:
301
323
  def _init_container(self, client: modal.client._Client, running_app: modal.running_app.RunningApp): ...
302
324
  @property
303
325
  def registered_functions(self) -> dict[str, modal._functions._Function]:
304
- """All modal.Function objects registered on the app.
326
+ """mdmd:hidden
327
+ All modal.Function objects registered on the app.
305
328
 
306
329
  Note: this property is populated only during the build phase, and it is not
307
330
  expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
331
+ This method is likely to be deprecated in the future in favor of a different
332
+ approach for retrieving the layout of a deployed App.
308
333
  """
309
334
  ...
310
335
 
311
336
  @property
312
337
  def registered_classes(self) -> dict[str, modal.cls._Cls]:
313
- """All modal.Cls objects registered on the app.
338
+ """mdmd:hidden
339
+ All modal.Cls objects registered on the app.
314
340
 
315
341
  Note: this property is populated only during the build phase, and it is not
316
342
  expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
343
+ This method is likely to be deprecated in the future in favor of a different
344
+ approach for retrieving the layout of a deployed App.
317
345
  """
318
346
  ...
319
347
 
320
348
  @property
321
349
  def registered_entrypoints(self) -> dict[str, _LocalEntrypoint]:
322
- """All local CLI entrypoints registered on the app.
350
+ """mdmd:hidden
351
+ All local CLI entrypoints registered on the app.
323
352
 
324
353
  Note: this property is populated only during the build phase, and it is not
325
354
  expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
355
+ This method is likely to be deprecated in the future.
326
356
  """
327
357
  ...
328
358
 
329
359
  @property
330
360
  def registered_web_endpoints(self) -> list[str]:
331
- """Names of web endpoint (ie. webhook) functions registered on the app.
361
+ """mdmd:hidden
362
+ Names of web endpoint (ie. webhook) functions registered on the app.
332
363
 
333
364
  Note: this property is populated only during the build phase, and it is not
334
365
  expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
366
+ This method is likely to be deprecated in the future in favor of a different
367
+ approach for retrieving the layout of a deployed App.
335
368
  """
336
369
  ...
337
370
 
@@ -638,7 +671,11 @@ class App:
638
671
 
639
672
  @property
640
673
  def is_interactive(self) -> bool:
641
- """Whether the current app for the app is running in interactive mode."""
674
+ """mdmd:hidden
675
+ Whether the current app for the app is running in interactive mode.
676
+
677
+ Note: this method will likely be deprecated in the future.
678
+ """
642
679
  ...
643
680
 
644
681
  @property
@@ -698,12 +735,30 @@ class App:
698
735
 
699
736
  lookup: __lookup_spec
700
737
 
701
- def set_description(self, description: str): ...
738
+ def set_description(self, description: str):
739
+ """mdmd:hidden
740
+ Set the description of the App before it starts running.
741
+
742
+ Note: we don't recommend using the method and may deprecate it in the future.
743
+ """
744
+ ...
745
+
702
746
  def _validate_blueprint_value(self, key: str, value: typing.Any): ...
703
747
  @property
704
- def image(self) -> modal.image.Image: ...
748
+ def image(self) -> modal.image.Image:
749
+ """mdmd:hidden
750
+ Retrieve the Image that will be used as the default for any Functions registered to the App.
751
+
752
+ Note: This property is only relevant in the build phase and won't be populated on a deployed
753
+ App that is retrieved via `modal.App.lookup`. It is likely to be deprecated in the future.
754
+ """
755
+ ...
756
+
705
757
  @image.setter
706
- def image(self, value): ...
758
+ def image(self, value):
759
+ """mdmd:hidden"""
760
+ ...
761
+
707
762
  def _uncreate_all_objects(self): ...
708
763
 
709
764
  class ___set_local_app_spec(typing_extensions.Protocol[SUPERSELF]):
@@ -931,37 +986,48 @@ class App:
931
986
  def _init_container(self, client: modal.client.Client, running_app: modal.running_app.RunningApp): ...
932
987
  @property
933
988
  def registered_functions(self) -> dict[str, modal.functions.Function]:
934
- """All modal.Function objects registered on the app.
989
+ """mdmd:hidden
990
+ All modal.Function objects registered on the app.
935
991
 
936
992
  Note: this property is populated only during the build phase, and it is not
937
993
  expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
994
+ This method is likely to be deprecated in the future in favor of a different
995
+ approach for retrieving the layout of a deployed App.
938
996
  """
939
997
  ...
940
998
 
941
999
  @property
942
1000
  def registered_classes(self) -> dict[str, modal.cls.Cls]:
943
- """All modal.Cls objects registered on the app.
1001
+ """mdmd:hidden
1002
+ All modal.Cls objects registered on the app.
944
1003
 
945
1004
  Note: this property is populated only during the build phase, and it is not
946
1005
  expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
1006
+ This method is likely to be deprecated in the future in favor of a different
1007
+ approach for retrieving the layout of a deployed App.
947
1008
  """
948
1009
  ...
949
1010
 
950
1011
  @property
951
1012
  def registered_entrypoints(self) -> dict[str, LocalEntrypoint]:
952
- """All local CLI entrypoints registered on the app.
1013
+ """mdmd:hidden
1014
+ All local CLI entrypoints registered on the app.
953
1015
 
954
1016
  Note: this property is populated only during the build phase, and it is not
955
1017
  expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
1018
+ This method is likely to be deprecated in the future.
956
1019
  """
957
1020
  ...
958
1021
 
959
1022
  @property
960
1023
  def registered_web_endpoints(self) -> list[str]:
961
- """Names of web endpoint (ie. webhook) functions registered on the app.
1024
+ """mdmd:hidden
1025
+ Names of web endpoint (ie. webhook) functions registered on the app.
962
1026
 
963
1027
  Note: this property is populated only during the build phase, and it is not
964
1028
  expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
1029
+ This method is likely to be deprecated in the future in favor of a different
1030
+ approach for retrieving the layout of a deployed App.
965
1031
  """
966
1032
  ...
967
1033
 
@@ -33,7 +33,7 @@ class _Client:
33
33
  server_url: str,
34
34
  client_type: int,
35
35
  credentials: typing.Optional[tuple[str, str]],
36
- version: str = "1.1.5.dev78",
36
+ version: str = "1.1.5.dev82",
37
37
  ):
38
38
  """mdmd:hidden
39
39
  The Modal client object is not intended to be instantiated directly by users.
@@ -164,7 +164,7 @@ class Client:
164
164
  server_url: str,
165
165
  client_type: int,
166
166
  credentials: typing.Optional[tuple[str, str]],
167
- version: str = "1.1.5.dev78",
167
+ version: str = "1.1.5.dev82",
168
168
  ):
169
169
  """mdmd:hidden
170
170
  The Modal client object is not intended to be instantiated directly by users.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 1.1.5.dev78
3
+ Version: 1.1.5.dev82
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License: Apache-2.0
@@ -28,6 +28,26 @@ enum SandboxExecStdoutConfig {
28
28
  SANDBOX_EXEC_STDOUT_CONFIG_PIPE = 1;
29
29
  }
30
30
 
31
+ message SandboxExecPollRequest {
32
+ // The task ID of the sandbox running the exec'd command.
33
+ string task_id = 1;
34
+ // The execution ID of the command to wait on.
35
+ string exec_id = 2;
36
+ }
37
+
38
+ // The response to a SandboxExecPollRequest. If the exec'd command has not
39
+ // completed, exit_status will be unset.
40
+ message SandboxExecPollResponse {
41
+ oneof exit_status {
42
+ // The exit code of the command.
43
+ int32 code = 1;
44
+ // The signal that terminated the command.
45
+ int32 signal = 2;
46
+ }
47
+ // TODO(saltzm): Give a way for the user to distinguish between normal exit
48
+ // and termination by Modal (due to sandbox timeout, exec exceeded deadline, etc.)
49
+ }
50
+
31
51
  message SandboxExecStartRequest {
32
52
  // The task ID of the sandbox to execute the command in.
33
53
  string task_id = 1;
@@ -105,15 +125,17 @@ message SandboxExecWaitRequest {
105
125
  message SandboxExecWaitResponse {
106
126
  oneof exit_status {
107
127
  // The exit code of the command.
108
- int32 code = 3;
128
+ int32 code = 1;
109
129
  // The signal that terminated the command.
110
- int32 signal = 4;
130
+ int32 signal = 2;
111
131
  }
112
132
  // TODO(saltzm): Give a way for the user to distinguish between normal exit
113
133
  // and termination by Modal (due to sandbox timeout, exec exceeded deadline, etc.)
114
134
  }
115
135
 
116
136
  service SandboxRouter {
137
+ // Poll for the exit status of an exec'd command.
138
+ rpc SandboxExecPoll(SandboxExecPollRequest) returns (SandboxExecPollResponse);
117
139
  // Execute a command in the sandbox.
118
140
  rpc SandboxExecStart(SandboxExecStartRequest) returns (SandboxExecStartResponse);
119
141
  // Write to the stdin stream of an exec'd command.
@@ -15,6 +15,10 @@ import modal_proto.sandbox_router_pb2
15
15
 
16
16
  class SandboxRouterBase(abc.ABC):
17
17
 
18
+ @abc.abstractmethod
19
+ async def SandboxExecPoll(self, stream: 'grpclib.server.Stream[modal_proto.sandbox_router_pb2.SandboxExecPollRequest, modal_proto.sandbox_router_pb2.SandboxExecPollResponse]') -> None:
20
+ pass
21
+
18
22
  @abc.abstractmethod
19
23
  async def SandboxExecStart(self, stream: 'grpclib.server.Stream[modal_proto.sandbox_router_pb2.SandboxExecStartRequest, modal_proto.sandbox_router_pb2.SandboxExecStartResponse]') -> None:
20
24
  pass
@@ -33,6 +37,12 @@ class SandboxRouterBase(abc.ABC):
33
37
 
34
38
  def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
35
39
  return {
40
+ '/modal.sandbox_router.SandboxRouter/SandboxExecPoll': grpclib.const.Handler(
41
+ self.SandboxExecPoll,
42
+ grpclib.const.Cardinality.UNARY_UNARY,
43
+ modal_proto.sandbox_router_pb2.SandboxExecPollRequest,
44
+ modal_proto.sandbox_router_pb2.SandboxExecPollResponse,
45
+ ),
36
46
  '/modal.sandbox_router.SandboxRouter/SandboxExecStart': grpclib.const.Handler(
37
47
  self.SandboxExecStart,
38
48
  grpclib.const.Cardinality.UNARY_UNARY,
@@ -63,6 +73,12 @@ class SandboxRouterBase(abc.ABC):
63
73
  class SandboxRouterStub:
64
74
 
65
75
  def __init__(self, channel: grpclib.client.Channel) -> None:
76
+ self.SandboxExecPoll = grpclib.client.UnaryUnaryMethod(
77
+ channel,
78
+ '/modal.sandbox_router.SandboxRouter/SandboxExecPoll',
79
+ modal_proto.sandbox_router_pb2.SandboxExecPollRequest,
80
+ modal_proto.sandbox_router_pb2.SandboxExecPollResponse,
81
+ )
66
82
  self.SandboxExecStart = grpclib.client.UnaryUnaryMethod(
67
83
  channel,
68
84
  '/modal.sandbox_router.SandboxRouter/SandboxExecStart',
@@ -16,7 +16,7 @@ _sym_db = _symbol_database.Default()
16
16
  from modal_proto import api_pb2 as modal__proto_dot_api__pb2
17
17
 
18
18
 
19
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n modal_proto/sandbox_router.proto\x12\x14modal.sandbox_router\x1a\x15modal_proto/api.proto\"\x91\x03\n\x17SandboxExecStartRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12\x14\n\x0c\x63ommand_args\x18\x03 \x03(\t\x12\x44\n\rstdout_config\x18\x04 \x01(\x0e\x32-.modal.sandbox_router.SandboxExecStdoutConfig\x12\x44\n\rstderr_config\x18\x05 \x01(\x0e\x32-.modal.sandbox_router.SandboxExecStderrConfig\x12\x19\n\x0ctimeout_secs\x18\x06 \x01(\rH\x00\x88\x01\x01\x12\x14\n\x07workdir\x18\x07 \x01(\tH\x01\x88\x01\x01\x12\x12\n\nsecret_ids\x18\x08 \x03(\t\x12,\n\x08pty_info\x18\t \x01(\x0b\x32\x15.modal.client.PTYInfoH\x02\x88\x01\x01\x12\x15\n\rruntime_debug\x18\n \x01(\x08\x42\x0f\n\r_timeout_secsB\n\n\x08_workdirB\x0b\n\t_pty_info\"\x1a\n\x18SandboxExecStartResponse\"k\n\x1cSandboxExecStdinWriteRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12\x0e\n\x06offset\x18\x03 \x01(\x04\x12\x0c\n\x04\x64\x61ta\x18\x04 \x01(\x0c\x12\x0b\n\x03\x65of\x18\x05 \x01(\x08\"\x1f\n\x1dSandboxExecStdinWriteResponse\"\x9e\x01\n\x1bSandboxExecStdioReadRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12\x0e\n\x06offset\x18\x03 \x01(\x04\x12M\n\x0f\x66ile_descriptor\x18\x04 \x01(\x0e\x32\x34.modal.sandbox_router.SandboxExecStdioFileDescriptor\",\n\x1cSandboxExecStdioReadResponse\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\":\n\x16SandboxExecWaitRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\"J\n\x17SandboxExecWaitResponse\x12\x0e\n\x04\x63ode\x18\x03 \x01(\x05H\x00\x12\x10\n\x06signal\x18\x04 \x01(\x05H\x00\x42\r\n\x0b\x65xit_status*\x8d\x01\n\x17SandboxExecStderrConfig\x12&\n\"SANDBOX_EXEC_STDERR_CONFIG_DEVNULL\x10\x00\x12#\n\x1fSANDBOX_EXEC_STDERR_CONFIG_PIPE\x10\x01\x12%\n!SANDBOX_EXEC_STDERR_CONFIG_STDOUT\x10\x02*~\n\x1eSandboxExecStdioFileDescriptor\x12-\n)SANDBOX_EXEC_STDIO_FILE_DESCRIPTOR_STDOUT\x10\x00\x12-\n)SANDBOX_EXEC_STDIO_FILE_DESCRIPTOR_STDERR\x10\x01*f\n\x17SandboxExecStdoutConfig\x12&\n\"SANDBOX_EXEC_STDOUT_CONFIG_DEVNULL\x10\x00\x12#\n\x1fSANDBOX_EXEC_STDOUT_CONFIG_PIPE\x10\x01\x32\xf6\x03\n\rSandboxRouter\x12q\n\x10SandboxExecStart\x12-.modal.sandbox_router.SandboxExecStartRequest\x1a..modal.sandbox_router.SandboxExecStartResponse\x12\x80\x01\n\x15SandboxExecStdinWrite\x12\x32.modal.sandbox_router.SandboxExecStdinWriteRequest\x1a\x33.modal.sandbox_router.SandboxExecStdinWriteResponse\x12\x7f\n\x14SandboxExecStdioRead\x12\x31.modal.sandbox_router.SandboxExecStdioReadRequest\x1a\x32.modal.sandbox_router.SandboxExecStdioReadResponse0\x01\x12n\n\x0fSandboxExecWait\x12,.modal.sandbox_router.SandboxExecWaitRequest\x1a-.modal.sandbox_router.SandboxExecWaitResponseb\x06proto3')
19
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n modal_proto/sandbox_router.proto\x12\x14modal.sandbox_router\x1a\x15modal_proto/api.proto\":\n\x16SandboxExecPollRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\"J\n\x17SandboxExecPollResponse\x12\x0e\n\x04\x63ode\x18\x01 \x01(\x05H\x00\x12\x10\n\x06signal\x18\x02 \x01(\x05H\x00\x42\r\n\x0b\x65xit_status\"\x91\x03\n\x17SandboxExecStartRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12\x14\n\x0c\x63ommand_args\x18\x03 \x03(\t\x12\x44\n\rstdout_config\x18\x04 \x01(\x0e\x32-.modal.sandbox_router.SandboxExecStdoutConfig\x12\x44\n\rstderr_config\x18\x05 \x01(\x0e\x32-.modal.sandbox_router.SandboxExecStderrConfig\x12\x19\n\x0ctimeout_secs\x18\x06 \x01(\rH\x00\x88\x01\x01\x12\x14\n\x07workdir\x18\x07 \x01(\tH\x01\x88\x01\x01\x12\x12\n\nsecret_ids\x18\x08 \x03(\t\x12,\n\x08pty_info\x18\t \x01(\x0b\x32\x15.modal.client.PTYInfoH\x02\x88\x01\x01\x12\x15\n\rruntime_debug\x18\n \x01(\x08\x42\x0f\n\r_timeout_secsB\n\n\x08_workdirB\x0b\n\t_pty_info\"\x1a\n\x18SandboxExecStartResponse\"k\n\x1cSandboxExecStdinWriteRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12\x0e\n\x06offset\x18\x03 \x01(\x04\x12\x0c\n\x04\x64\x61ta\x18\x04 \x01(\x0c\x12\x0b\n\x03\x65of\x18\x05 \x01(\x08\"\x1f\n\x1dSandboxExecStdinWriteResponse\"\x9e\x01\n\x1bSandboxExecStdioReadRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\x12\x0e\n\x06offset\x18\x03 \x01(\x04\x12M\n\x0f\x66ile_descriptor\x18\x04 \x01(\x0e\x32\x34.modal.sandbox_router.SandboxExecStdioFileDescriptor\",\n\x1cSandboxExecStdioReadResponse\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\":\n\x16SandboxExecWaitRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x65xec_id\x18\x02 \x01(\t\"J\n\x17SandboxExecWaitResponse\x12\x0e\n\x04\x63ode\x18\x01 \x01(\x05H\x00\x12\x10\n\x06signal\x18\x02 \x01(\x05H\x00\x42\r\n\x0b\x65xit_status*\x8d\x01\n\x17SandboxExecStderrConfig\x12&\n\"SANDBOX_EXEC_STDERR_CONFIG_DEVNULL\x10\x00\x12#\n\x1fSANDBOX_EXEC_STDERR_CONFIG_PIPE\x10\x01\x12%\n!SANDBOX_EXEC_STDERR_CONFIG_STDOUT\x10\x02*~\n\x1eSandboxExecStdioFileDescriptor\x12-\n)SANDBOX_EXEC_STDIO_FILE_DESCRIPTOR_STDOUT\x10\x00\x12-\n)SANDBOX_EXEC_STDIO_FILE_DESCRIPTOR_STDERR\x10\x01*f\n\x17SandboxExecStdoutConfig\x12&\n\"SANDBOX_EXEC_STDOUT_CONFIG_DEVNULL\x10\x00\x12#\n\x1fSANDBOX_EXEC_STDOUT_CONFIG_PIPE\x10\x01\x32\xe6\x04\n\rSandboxRouter\x12n\n\x0fSandboxExecPoll\x12,.modal.sandbox_router.SandboxExecPollRequest\x1a-.modal.sandbox_router.SandboxExecPollResponse\x12q\n\x10SandboxExecStart\x12-.modal.sandbox_router.SandboxExecStartRequest\x1a..modal.sandbox_router.SandboxExecStartResponse\x12\x80\x01\n\x15SandboxExecStdinWrite\x12\x32.modal.sandbox_router.SandboxExecStdinWriteRequest\x1a\x33.modal.sandbox_router.SandboxExecStdinWriteResponse\x12\x7f\n\x14SandboxExecStdioRead\x12\x31.modal.sandbox_router.SandboxExecStdioReadRequest\x1a\x32.modal.sandbox_router.SandboxExecStdioReadResponse0\x01\x12n\n\x0fSandboxExecWait\x12,.modal.sandbox_router.SandboxExecWaitRequest\x1a-.modal.sandbox_router.SandboxExecWaitResponseb\x06proto3')
20
20
 
21
21
  _SANDBOXEXECSTDERRCONFIG = DESCRIPTOR.enum_types_by_name['SandboxExecStderrConfig']
22
22
  SandboxExecStderrConfig = enum_type_wrapper.EnumTypeWrapper(_SANDBOXEXECSTDERRCONFIG)
@@ -33,6 +33,8 @@ SANDBOX_EXEC_STDOUT_CONFIG_DEVNULL = 0
33
33
  SANDBOX_EXEC_STDOUT_CONFIG_PIPE = 1
34
34
 
35
35
 
36
+ _SANDBOXEXECPOLLREQUEST = DESCRIPTOR.message_types_by_name['SandboxExecPollRequest']
37
+ _SANDBOXEXECPOLLRESPONSE = DESCRIPTOR.message_types_by_name['SandboxExecPollResponse']
36
38
  _SANDBOXEXECSTARTREQUEST = DESCRIPTOR.message_types_by_name['SandboxExecStartRequest']
37
39
  _SANDBOXEXECSTARTRESPONSE = DESCRIPTOR.message_types_by_name['SandboxExecStartResponse']
38
40
  _SANDBOXEXECSTDINWRITEREQUEST = DESCRIPTOR.message_types_by_name['SandboxExecStdinWriteRequest']
@@ -41,6 +43,20 @@ _SANDBOXEXECSTDIOREADREQUEST = DESCRIPTOR.message_types_by_name['SandboxExecStdi
41
43
  _SANDBOXEXECSTDIOREADRESPONSE = DESCRIPTOR.message_types_by_name['SandboxExecStdioReadResponse']
42
44
  _SANDBOXEXECWAITREQUEST = DESCRIPTOR.message_types_by_name['SandboxExecWaitRequest']
43
45
  _SANDBOXEXECWAITRESPONSE = DESCRIPTOR.message_types_by_name['SandboxExecWaitResponse']
46
+ SandboxExecPollRequest = _reflection.GeneratedProtocolMessageType('SandboxExecPollRequest', (_message.Message,), {
47
+ 'DESCRIPTOR' : _SANDBOXEXECPOLLREQUEST,
48
+ '__module__' : 'modal_proto.sandbox_router_pb2'
49
+ # @@protoc_insertion_point(class_scope:modal.sandbox_router.SandboxExecPollRequest)
50
+ })
51
+ _sym_db.RegisterMessage(SandboxExecPollRequest)
52
+
53
+ SandboxExecPollResponse = _reflection.GeneratedProtocolMessageType('SandboxExecPollResponse', (_message.Message,), {
54
+ 'DESCRIPTOR' : _SANDBOXEXECPOLLRESPONSE,
55
+ '__module__' : 'modal_proto.sandbox_router_pb2'
56
+ # @@protoc_insertion_point(class_scope:modal.sandbox_router.SandboxExecPollResponse)
57
+ })
58
+ _sym_db.RegisterMessage(SandboxExecPollResponse)
59
+
44
60
  SandboxExecStartRequest = _reflection.GeneratedProtocolMessageType('SandboxExecStartRequest', (_message.Message,), {
45
61
  'DESCRIPTOR' : _SANDBOXEXECSTARTREQUEST,
46
62
  '__module__' : 'modal_proto.sandbox_router_pb2'
@@ -101,28 +117,32 @@ _SANDBOXROUTER = DESCRIPTOR.services_by_name['SandboxRouter']
101
117
  if _descriptor._USE_C_DESCRIPTORS == False:
102
118
 
103
119
  DESCRIPTOR._options = None
104
- _SANDBOXEXECSTDERRCONFIG._serialized_start=999
105
- _SANDBOXEXECSTDERRCONFIG._serialized_end=1140
106
- _SANDBOXEXECSTDIOFILEDESCRIPTOR._serialized_start=1142
107
- _SANDBOXEXECSTDIOFILEDESCRIPTOR._serialized_end=1268
108
- _SANDBOXEXECSTDOUTCONFIG._serialized_start=1270
109
- _SANDBOXEXECSTDOUTCONFIG._serialized_end=1372
110
- _SANDBOXEXECSTARTREQUEST._serialized_start=82
111
- _SANDBOXEXECSTARTREQUEST._serialized_end=483
112
- _SANDBOXEXECSTARTRESPONSE._serialized_start=485
113
- _SANDBOXEXECSTARTRESPONSE._serialized_end=511
114
- _SANDBOXEXECSTDINWRITEREQUEST._serialized_start=513
115
- _SANDBOXEXECSTDINWRITEREQUEST._serialized_end=620
116
- _SANDBOXEXECSTDINWRITERESPONSE._serialized_start=622
117
- _SANDBOXEXECSTDINWRITERESPONSE._serialized_end=653
118
- _SANDBOXEXECSTDIOREADREQUEST._serialized_start=656
119
- _SANDBOXEXECSTDIOREADREQUEST._serialized_end=814
120
- _SANDBOXEXECSTDIOREADRESPONSE._serialized_start=816
121
- _SANDBOXEXECSTDIOREADRESPONSE._serialized_end=860
122
- _SANDBOXEXECWAITREQUEST._serialized_start=862
123
- _SANDBOXEXECWAITREQUEST._serialized_end=920
124
- _SANDBOXEXECWAITRESPONSE._serialized_start=922
125
- _SANDBOXEXECWAITRESPONSE._serialized_end=996
126
- _SANDBOXROUTER._serialized_start=1375
127
- _SANDBOXROUTER._serialized_end=1877
120
+ _SANDBOXEXECSTDERRCONFIG._serialized_start=1135
121
+ _SANDBOXEXECSTDERRCONFIG._serialized_end=1276
122
+ _SANDBOXEXECSTDIOFILEDESCRIPTOR._serialized_start=1278
123
+ _SANDBOXEXECSTDIOFILEDESCRIPTOR._serialized_end=1404
124
+ _SANDBOXEXECSTDOUTCONFIG._serialized_start=1406
125
+ _SANDBOXEXECSTDOUTCONFIG._serialized_end=1508
126
+ _SANDBOXEXECPOLLREQUEST._serialized_start=81
127
+ _SANDBOXEXECPOLLREQUEST._serialized_end=139
128
+ _SANDBOXEXECPOLLRESPONSE._serialized_start=141
129
+ _SANDBOXEXECPOLLRESPONSE._serialized_end=215
130
+ _SANDBOXEXECSTARTREQUEST._serialized_start=218
131
+ _SANDBOXEXECSTARTREQUEST._serialized_end=619
132
+ _SANDBOXEXECSTARTRESPONSE._serialized_start=621
133
+ _SANDBOXEXECSTARTRESPONSE._serialized_end=647
134
+ _SANDBOXEXECSTDINWRITEREQUEST._serialized_start=649
135
+ _SANDBOXEXECSTDINWRITEREQUEST._serialized_end=756
136
+ _SANDBOXEXECSTDINWRITERESPONSE._serialized_start=758
137
+ _SANDBOXEXECSTDINWRITERESPONSE._serialized_end=789
138
+ _SANDBOXEXECSTDIOREADREQUEST._serialized_start=792
139
+ _SANDBOXEXECSTDIOREADREQUEST._serialized_end=950
140
+ _SANDBOXEXECSTDIOREADRESPONSE._serialized_start=952
141
+ _SANDBOXEXECSTDIOREADRESPONSE._serialized_end=996
142
+ _SANDBOXEXECWAITREQUEST._serialized_start=998
143
+ _SANDBOXEXECWAITREQUEST._serialized_end=1056
144
+ _SANDBOXEXECWAITRESPONSE._serialized_start=1058
145
+ _SANDBOXEXECWAITRESPONSE._serialized_end=1132
146
+ _SANDBOXROUTER._serialized_start=1511
147
+ _SANDBOXROUTER._serialized_end=2125
128
148
  # @@protoc_insertion_point(module_scope)
@@ -84,6 +84,50 @@ SANDBOX_EXEC_STDOUT_CONFIG_PIPE: SandboxExecStdoutConfig.ValueType # 1
84
84
  """The output will be streamed to the client."""
85
85
  global___SandboxExecStdoutConfig = SandboxExecStdoutConfig
86
86
 
87
+ class SandboxExecPollRequest(google.protobuf.message.Message):
88
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
89
+
90
+ TASK_ID_FIELD_NUMBER: builtins.int
91
+ EXEC_ID_FIELD_NUMBER: builtins.int
92
+ task_id: builtins.str
93
+ """The task ID of the sandbox running the exec'd command."""
94
+ exec_id: builtins.str
95
+ """The execution ID of the command to wait on."""
96
+ def __init__(
97
+ self,
98
+ *,
99
+ task_id: builtins.str = ...,
100
+ exec_id: builtins.str = ...,
101
+ ) -> None: ...
102
+ def ClearField(self, field_name: typing_extensions.Literal["exec_id", b"exec_id", "task_id", b"task_id"]) -> None: ...
103
+
104
+ global___SandboxExecPollRequest = SandboxExecPollRequest
105
+
106
+ class SandboxExecPollResponse(google.protobuf.message.Message):
107
+ """The response to a SandboxExecPollRequest. If the exec'd command has not
108
+ completed, exit_status will be unset.
109
+ """
110
+
111
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
112
+
113
+ CODE_FIELD_NUMBER: builtins.int
114
+ SIGNAL_FIELD_NUMBER: builtins.int
115
+ code: builtins.int
116
+ """The exit code of the command."""
117
+ signal: builtins.int
118
+ """The signal that terminated the command."""
119
+ def __init__(
120
+ self,
121
+ *,
122
+ code: builtins.int = ...,
123
+ signal: builtins.int = ...,
124
+ ) -> None: ...
125
+ def HasField(self, field_name: typing_extensions.Literal["code", b"code", "exit_status", b"exit_status", "signal", b"signal"]) -> builtins.bool: ...
126
+ def ClearField(self, field_name: typing_extensions.Literal["code", b"code", "exit_status", b"exit_status", "signal", b"signal"]) -> None: ...
127
+ def WhichOneof(self, oneof_group: typing_extensions.Literal["exit_status", b"exit_status"]) -> typing_extensions.Literal["code", "signal"] | None: ...
128
+
129
+ global___SandboxExecPollResponse = SandboxExecPollResponse
130
+
87
131
  class SandboxExecStartRequest(google.protobuf.message.Message):
88
132
  DESCRIPTOR: google.protobuf.descriptor.Descriptor
89
133
 
@@ -14,6 +14,11 @@ class SandboxRouterStub(object):
14
14
  Args:
15
15
  channel: A grpc.Channel.
16
16
  """
17
+ self.SandboxExecPoll = channel.unary_unary(
18
+ '/modal.sandbox_router.SandboxRouter/SandboxExecPoll',
19
+ request_serializer=modal__proto_dot_sandbox__router__pb2.SandboxExecPollRequest.SerializeToString,
20
+ response_deserializer=modal__proto_dot_sandbox__router__pb2.SandboxExecPollResponse.FromString,
21
+ )
17
22
  self.SandboxExecStart = channel.unary_unary(
18
23
  '/modal.sandbox_router.SandboxRouter/SandboxExecStart',
19
24
  request_serializer=modal__proto_dot_sandbox__router__pb2.SandboxExecStartRequest.SerializeToString,
@@ -39,6 +44,13 @@ class SandboxRouterStub(object):
39
44
  class SandboxRouterServicer(object):
40
45
  """Missing associated documentation comment in .proto file."""
41
46
 
47
+ def SandboxExecPoll(self, request, context):
48
+ """Poll for the exit status of an exec'd command.
49
+ """
50
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
51
+ context.set_details('Method not implemented!')
52
+ raise NotImplementedError('Method not implemented!')
53
+
42
54
  def SandboxExecStart(self, request, context):
43
55
  """Execute a command in the sandbox.
44
56
  """
@@ -70,6 +82,11 @@ class SandboxRouterServicer(object):
70
82
 
71
83
  def add_SandboxRouterServicer_to_server(servicer, server):
72
84
  rpc_method_handlers = {
85
+ 'SandboxExecPoll': grpc.unary_unary_rpc_method_handler(
86
+ servicer.SandboxExecPoll,
87
+ request_deserializer=modal__proto_dot_sandbox__router__pb2.SandboxExecPollRequest.FromString,
88
+ response_serializer=modal__proto_dot_sandbox__router__pb2.SandboxExecPollResponse.SerializeToString,
89
+ ),
73
90
  'SandboxExecStart': grpc.unary_unary_rpc_method_handler(
74
91
  servicer.SandboxExecStart,
75
92
  request_deserializer=modal__proto_dot_sandbox__router__pb2.SandboxExecStartRequest.FromString,
@@ -100,6 +117,23 @@ def add_SandboxRouterServicer_to_server(servicer, server):
100
117
  class SandboxRouter(object):
101
118
  """Missing associated documentation comment in .proto file."""
102
119
 
120
+ @staticmethod
121
+ def SandboxExecPoll(request,
122
+ target,
123
+ options=(),
124
+ channel_credentials=None,
125
+ call_credentials=None,
126
+ insecure=False,
127
+ compression=None,
128
+ wait_for_ready=None,
129
+ timeout=None,
130
+ metadata=None):
131
+ return grpc.experimental.unary_unary(request, target, '/modal.sandbox_router.SandboxRouter/SandboxExecPoll',
132
+ modal__proto_dot_sandbox__router__pb2.SandboxExecPollRequest.SerializeToString,
133
+ modal__proto_dot_sandbox__router__pb2.SandboxExecPollResponse.FromString,
134
+ options, channel_credentials,
135
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
136
+
103
137
  @staticmethod
104
138
  def SandboxExecStart(request,
105
139
  target,
@@ -9,6 +9,11 @@ import modal_proto.sandbox_router_pb2
9
9
 
10
10
  class SandboxRouterStub:
11
11
  def __init__(self, channel: grpc.Channel) -> None: ...
12
+ SandboxExecPoll: grpc.UnaryUnaryMultiCallable[
13
+ modal_proto.sandbox_router_pb2.SandboxExecPollRequest,
14
+ modal_proto.sandbox_router_pb2.SandboxExecPollResponse,
15
+ ]
16
+ """Poll for the exit status of an exec'd command."""
12
17
  SandboxExecStart: grpc.UnaryUnaryMultiCallable[
13
18
  modal_proto.sandbox_router_pb2.SandboxExecStartRequest,
14
19
  modal_proto.sandbox_router_pb2.SandboxExecStartResponse,
@@ -32,6 +37,13 @@ class SandboxRouterStub:
32
37
 
33
38
  class SandboxRouterServicer(metaclass=abc.ABCMeta):
34
39
  @abc.abstractmethod
40
+ def SandboxExecPoll(
41
+ self,
42
+ request: modal_proto.sandbox_router_pb2.SandboxExecPollRequest,
43
+ context: grpc.ServicerContext,
44
+ ) -> modal_proto.sandbox_router_pb2.SandboxExecPollResponse:
45
+ """Poll for the exit status of an exec'd command."""
46
+ @abc.abstractmethod
35
47
  def SandboxExecStart(
36
48
  self,
37
49
  request: modal_proto.sandbox_router_pb2.SandboxExecStartRequest,