modal 1.5.1.dev8__tar.gz → 1.5.1.dev9__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 (225) hide show
  1. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/PKG-INFO +2 -2
  2. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/README.md +1 -1
  3. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_billing.py +2 -2
  4. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_environments.py +3 -2
  5. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_functions.py +4 -4
  6. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_partial_function.py +1 -1
  7. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_server.py +1 -1
  8. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_utils/task_command_router_client.py +27 -0
  9. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_workspace.py +3 -2
  10. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/app.py +6 -3
  11. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/app.pyi +10 -6
  12. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/billing.pyi +2 -2
  13. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/_help.py +3 -3
  14. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/billing.py +1 -1
  15. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/changelog.py +1 -1
  16. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/config.py +1 -1
  17. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/environment.py +2 -1
  18. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/shell.py +1 -1
  19. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/client.py +1 -1
  20. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/client.pyi +2 -2
  21. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cls.py +2 -2
  22. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cls.pyi +4 -4
  23. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/exception.py +1 -1
  24. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/functions.pyi +8 -8
  25. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/partial_function.pyi +1 -1
  26. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/runner.py +16 -12
  27. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/sandbox.py +93 -26
  28. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/sandbox.pyi +78 -15
  29. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/schedule.py +1 -1
  30. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/server.pyi +1 -1
  31. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal.egg-info/PKG-INFO +2 -2
  32. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal_docs/gen_cli_docs.py +48 -2
  33. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal_proto/api_grpc.py +16 -0
  34. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal_proto/api_pb2.py +870 -837
  35. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal_proto/api_pb2.pyi +62 -5
  36. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal_proto/api_pb2_grpc.py +33 -0
  37. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal_proto/api_pb2_grpc.pyi +10 -0
  38. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal_proto/modal_api_grpc.py +1 -0
  39. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal_version/__init__.py +1 -1
  40. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/LICENSE +0 -0
  41. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/__init__.py +0 -0
  42. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/__main__.py +0 -0
  43. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_clustered_functions.py +0 -0
  44. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_clustered_functions.pyi +0 -0
  45. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_container_entrypoint.py +0 -0
  46. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_function_variants.py +0 -0
  47. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_grpc_client.py +0 -0
  48. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_image.py +0 -0
  49. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_ipython.py +0 -0
  50. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_load_context.py +0 -0
  51. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_location.py +0 -0
  52. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_logs.py +0 -0
  53. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_object.py +0 -0
  54. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_output/__init__.py +0 -0
  55. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_output/manager.py +0 -0
  56. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_output/pty.py +0 -0
  57. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_output/rich.py +0 -0
  58. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_output/status.py +0 -0
  59. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_resolver.py +0 -0
  60. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_resources.py +0 -0
  61. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_runtime/__init__.py +0 -0
  62. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_runtime/asgi.py +0 -0
  63. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_runtime/container_io_manager.py +0 -0
  64. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_runtime/container_io_manager.pyi +0 -0
  65. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_runtime/execution_context.py +0 -0
  66. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_runtime/execution_context.pyi +0 -0
  67. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_runtime/gpu_memory_snapshot.py +0 -0
  68. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_runtime/task_lifecycle_manager.py +0 -0
  69. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_runtime/task_lifecycle_manager.pyi +0 -0
  70. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_runtime/telemetry.py +0 -0
  71. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_runtime/user_code_event_loop.py +0 -0
  72. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_runtime/user_code_imports.py +0 -0
  73. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_serialization.py +0 -0
  74. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_traceback.py +0 -0
  75. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_tunnel.py +0 -0
  76. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_tunnel.pyi +0 -0
  77. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_type_manager.py +0 -0
  78. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_utils/__init__.py +0 -0
  79. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_utils/app_utils.py +0 -0
  80. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_utils/async_utils.py +0 -0
  81. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_utils/auth_token_manager.py +0 -0
  82. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_utils/blob_utils.py +0 -0
  83. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_utils/browser_utils.py +0 -0
  84. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_utils/bytes_io_segment_payload.py +0 -0
  85. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_utils/deprecation.py +0 -0
  86. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_utils/docker_utils.py +0 -0
  87. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_utils/function_utils.py +0 -0
  88. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_utils/git_utils.py +0 -0
  89. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_utils/grpc_testing.py +0 -0
  90. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_utils/grpc_utils.py +0 -0
  91. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_utils/hash_utils.py +0 -0
  92. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_utils/http_utils.py +0 -0
  93. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_utils/jwt_utils.py +0 -0
  94. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_utils/logger.py +0 -0
  95. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_utils/mount_utils.py +0 -0
  96. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_utils/name_utils.py +0 -0
  97. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_utils/package_utils.py +0 -0
  98. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_utils/pattern_utils.py +0 -0
  99. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_utils/rand_pb_testing.py +0 -0
  100. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_utils/sandbox_fs_utils.py +0 -0
  101. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_utils/shell_utils.py +0 -0
  102. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_utils/time_utils.py +0 -0
  103. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_vendor/__init__.py +0 -0
  104. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_vendor/a2wsgi_wsgi.py +0 -0
  105. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_vendor/cloudpickle.py +0 -0
  106. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_vendor/tblib.py +0 -0
  107. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_vendor/version.py +0 -0
  108. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/_watcher.py +0 -0
  109. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/billing.py +0 -0
  110. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/builder/2023.12.312.txt +0 -0
  111. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/builder/2023.12.txt +0 -0
  112. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/builder/2024.04.txt +0 -0
  113. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/builder/2024.10.txt +0 -0
  114. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/builder/2025.06.txt +0 -0
  115. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/builder/PREVIEW.txt +0 -0
  116. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/builder/README.md +0 -0
  117. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/builder/base-images.json +0 -0
  118. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/call_graph.py +0 -0
  119. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/__init__.py +0 -0
  120. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/_download.py +0 -0
  121. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/_traceback.py +0 -0
  122. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/app.py +0 -0
  123. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/bootstrap.py +0 -0
  124. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/cluster.py +0 -0
  125. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/container.py +0 -0
  126. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/dashboard.py +0 -0
  127. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/dict.py +0 -0
  128. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/entry_point.py +0 -0
  129. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/image.py +0 -0
  130. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/import_refs.py +0 -0
  131. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/launch.py +0 -0
  132. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/logo.py +0 -0
  133. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/network_file_system.py +0 -0
  134. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/profile.py +0 -0
  135. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/programs/__init__.py +0 -0
  136. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/programs/run_jupyter.py +0 -0
  137. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/programs/vscode.py +0 -0
  138. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/queues.py +0 -0
  139. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/run.py +0 -0
  140. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/secret.py +0 -0
  141. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/selector.py +0 -0
  142. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/skills.py +0 -0
  143. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/token.py +0 -0
  144. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/utils.py +0 -0
  145. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cli/volume.py +0 -0
  146. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cloud_bucket_mount.py +0 -0
  147. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/cloud_bucket_mount.pyi +0 -0
  148. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/config.py +0 -0
  149. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/container_process.py +0 -0
  150. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/container_process.pyi +0 -0
  151. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/dict.py +0 -0
  152. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/dict.pyi +0 -0
  153. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/environments.py +0 -0
  154. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/environments.pyi +0 -0
  155. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/experimental/__init__.py +0 -0
  156. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/experimental/flash.py +0 -0
  157. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/experimental/flash.pyi +0 -0
  158. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/experimental/ipython.py +0 -0
  159. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/file_io.py +0 -0
  160. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/file_io.pyi +0 -0
  161. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/file_pattern_matcher.py +0 -0
  162. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/functions.py +0 -0
  163. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/image.py +0 -0
  164. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/image.pyi +0 -0
  165. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/io_streams.py +0 -0
  166. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/io_streams.pyi +0 -0
  167. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/mount.py +0 -0
  168. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/mount.pyi +0 -0
  169. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/network_file_system.py +0 -0
  170. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/network_file_system.pyi +0 -0
  171. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/object.py +0 -0
  172. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/object.pyi +0 -0
  173. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/output.py +0 -0
  174. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/parallel_map.py +0 -0
  175. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/parallel_map.pyi +0 -0
  176. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/partial_function.py +0 -0
  177. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/proxy.py +0 -0
  178. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/proxy.pyi +0 -0
  179. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/py.typed +0 -0
  180. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/queue.py +0 -0
  181. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/queue.pyi +0 -0
  182. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/retries.py +0 -0
  183. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/runner.pyi +0 -0
  184. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/running_app.py +0 -0
  185. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/sandbox_fs.py +0 -0
  186. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/sandbox_fs.pyi +0 -0
  187. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/scheduler_placement.py +0 -0
  188. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/secret.py +0 -0
  189. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/secret.pyi +0 -0
  190. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/server.py +0 -0
  191. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/serving.py +0 -0
  192. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/serving.pyi +0 -0
  193. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/skills/modal/SKILL.md +0 -0
  194. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/snapshot.py +0 -0
  195. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/snapshot.pyi +0 -0
  196. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/stream_type.py +0 -0
  197. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/token_flow.py +0 -0
  198. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/token_flow.pyi +0 -0
  199. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/volume.py +0 -0
  200. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/volume.pyi +0 -0
  201. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/workspace.py +0 -0
  202. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal/workspace.pyi +0 -0
  203. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal.egg-info/SOURCES.txt +0 -0
  204. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal.egg-info/dependency_links.txt +0 -0
  205. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal.egg-info/entry_points.txt +0 -0
  206. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal.egg-info/requires.txt +0 -0
  207. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal.egg-info/top_level.txt +0 -0
  208. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal_docs/__init__.py +0 -0
  209. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal_docs/gen_cli_docs_main.py +0 -0
  210. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal_docs/gen_reference_docs.py +0 -0
  211. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal_docs/gen_reference_docs_main.py +0 -0
  212. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal_docs/mdmd/__init__.py +0 -0
  213. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal_docs/mdmd/mdmd.py +0 -0
  214. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal_docs/mdmd/signatures.py +0 -0
  215. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal_docs/mdmd/types.py +0 -0
  216. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal_proto/__init__.py +0 -0
  217. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal_proto/py.typed +0 -0
  218. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal_proto/task_command_router_grpc.py +0 -0
  219. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal_proto/task_command_router_pb2.py +0 -0
  220. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal_proto/task_command_router_pb2.pyi +0 -0
  221. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal_proto/task_command_router_pb2_grpc.py +0 -0
  222. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal_proto/task_command_router_pb2_grpc.pyi +0 -0
  223. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/modal_version/__main__.py +0 -0
  224. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/pyproject.toml +0 -0
  225. {modal-1.5.1.dev8 → modal-1.5.1.dev9}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 1.5.1.dev8
3
+ Version: 1.5.1.dev9
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License-Expression: Apache-2.0
@@ -45,7 +45,7 @@ access to serverless cloud compute from Python scripts on your local computer.
45
45
  See the [online documentation](https://modal.com/docs/guide) for many
46
46
  [example applications](https://modal.com/docs/examples),
47
47
  a [user guide](https://modal.com/docs/guide), and the detailed
48
- [API reference](https://modal.com/docs/reference).
48
+ [API reference](https://modal.com/docs/sdk/py/latest).
49
49
 
50
50
  ## Installation
51
51
 
@@ -12,7 +12,7 @@ access to serverless cloud compute from Python scripts on your local computer.
12
12
  See the [online documentation](https://modal.com/docs/guide) for many
13
13
  [example applications](https://modal.com/docs/examples),
14
14
  a [user guide](https://modal.com/docs/guide), and the detailed
15
- [API reference](https://modal.com/docs/reference).
15
+ [API reference](https://modal.com/docs/sdk/py/latest).
16
16
 
17
17
  ## Installation
18
18
 
@@ -80,7 +80,7 @@ class BillingReportItem:
80
80
  environment_name=pb_item.environment_name,
81
81
  interval_start=pb_item.interval.ToDatetime().replace(tzinfo=timezone.utc),
82
82
  cost=Decimal(pb_item.cost),
83
- cost_by_resource={k: Decimal(str(v)) for k, v in pb_item.cost_by_resource.items()},
83
+ cost_by_resource={k: Decimal(v) for k, v in pb_item.cost_by_resource.items()},
84
84
  tags=dict(pb_item.tags),
85
85
  )
86
86
 
@@ -120,7 +120,7 @@ async def _workspace_billing_report(
120
120
  case, we recommend leaving a buffer after the end of the query interval.
121
121
 
122
122
  It's also possible to generate reports using the
123
- [`modal billing report`](https://modal.com/docs/reference/cli/billing) CLI command. The CLI
123
+ [`modal billing report`](https://modal.com/docs/cli/latest/billing) CLI command. The CLI
124
124
  has a few convenience features for generating reports across relative time ranges.
125
125
 
126
126
  """
@@ -428,8 +428,9 @@ class _EnvironmentBillingManager:
428
428
  Modal's billing model evolves.
429
429
 
430
430
  It's also possible to generate reports using the
431
- [`modal environment billing report`](https://modal.com/docs/reference/cli/environment) CLI command.
432
- The CLI has a few convenience features for generating reports across relative time ranges.
431
+ [`modal environment billing report`](https://modal.com/docs/cli/latest/environment#modal-environment-billing-report)
432
+ CLI command. The CLI has a few convenience features for generating
433
+ reports across relative time ranges.
433
434
 
434
435
  """
435
436
  + BILLING_DOCSTRING
@@ -1912,9 +1912,9 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
1912
1912
  **kwargs: Keyword arguments forwarded to the remote function.
1913
1913
 
1914
1914
  Returns:
1915
- A [`modal.FunctionCall`](https://modal.com/docs/reference/modal.FunctionCall) object
1915
+ A [`modal.FunctionCall`](https://modal.com/docs/sdk/py/latest/modal.FunctionCall) object
1916
1916
  that can later be polled or waited for using
1917
- [`.get(timeout=...)`](https://modal.com/docs/reference/modal.FunctionCall#get).
1917
+ [`.get(timeout=...)`](https://modal.com/docs/sdk/py/latest/modal.FunctionCall#get).
1918
1918
  """
1919
1919
  self._check_no_web_url("spawn")
1920
1920
  if self._is_generator:
@@ -2065,7 +2065,7 @@ class _FunctionCall(typing.Generic[ReturnType], _Object, type_prefix="fc"):
2065
2065
  """Returns a structure representing the call graph from a given root
2066
2066
  call ID, along with the status of execution for each node.
2067
2067
 
2068
- See [`modal.call_graph`](https://modal.com/docs/reference/modal.call_graph) reference page
2068
+ See [`modal.call_graph`](https://modal.com/docs/sdk/py/latest/modal.call_graph) reference page
2069
2069
  for documentation on the structure of the returned `InputInfo` items.
2070
2070
 
2071
2071
  Returns:
@@ -2083,7 +2083,7 @@ class _FunctionCall(typing.Generic[ReturnType], _Object, type_prefix="fc"):
2083
2083
  terminate_containers: bool = False,
2084
2084
  ):
2085
2085
  """Cancels the function call, which will stop its execution and mark its inputs as
2086
- [`TERMINATED`](https://modal.com/docs/reference/modal.call_graph#modalcall_graphinputstatus).
2086
+ [`TERMINATED`](https://modal.com/docs/sdk/py/latest/modal.call_graph#modalcall_graphinputstatus).
2087
2087
 
2088
2088
  If `terminate_containers=True` - the containers running the cancelled inputs are all terminated
2089
2089
  causing any non-cancelled inputs on those containers to be rescheduled in new containers.
@@ -477,7 +477,7 @@ def _wsgi_app(
477
477
  Web Server Gateway Interface (WSGI) is a standard for synchronous Python web apps.
478
478
  It has been [succeeded by the ASGI interface](https://asgi.readthedocs.io/en/latest/introduction.html#wsgi-compatibility)
479
479
  which is compatible with ASGI and supports additional functionality such as web sockets.
480
- Modal supports ASGI via [`asgi_app`](https://modal.com/docs/reference/modal.asgi_app).
480
+ Modal supports ASGI via [`asgi_app`](https://modal.com/docs/sdk/py/latest/modal.asgi_app).
481
481
 
482
482
  Examples:
483
483
  ```python
@@ -49,7 +49,7 @@ class _Server:
49
49
  See [lifecycle hooks](https://modal.com/docs/guide/lifecycle-functions) for more information.
50
50
 
51
51
  Generally, you will not construct a Server directly.
52
- Instead, use the [`@app.server()`](https://modal.com/docs/reference/modal.App#server) decorator.
52
+ Instead, use the [`@app.server()`](https://modal.com/docs/sdk/py/latest/modal.App#server) decorator.
53
53
 
54
54
  ```python notest
55
55
  @app.server(port=8000, routing_region="us-east")
@@ -491,6 +491,27 @@ class TaskCommandRouterClient:
491
491
  lambda: self._call_with_auth_retry(self._stub.SandboxStdinWriteV2, request)
492
492
  )
493
493
 
494
+ async def sandbox_wait_until_ready(self, task_id: str, timeout: float) -> sr_pb2.SandboxWaitUntilReadyTcrResponse:
495
+ """Wait until the sandbox's readiness probe reports ready.
496
+
497
+ Args:
498
+ task_id: The task ID hosting the sandbox.
499
+ timeout: Maximum time in seconds for the worker to wait.
500
+ Raises:
501
+ TimeoutError: If the sandbox does not become ready within `timeout`.
502
+ """
503
+ request = sr_pb2.SandboxWaitUntilReadyTcrRequest(task_id=task_id, timeout=timeout)
504
+ with grpc_error_converter():
505
+ try:
506
+ return await asyncio.wait_for(
507
+ call_with_retries_on_transient_errors(
508
+ lambda: self._call_with_auth_retry(self._stub.SandboxWaitUntilReady, request, timeout=timeout),
509
+ ),
510
+ timeout=timeout,
511
+ )
512
+ except asyncio.TimeoutError:
513
+ raise ModalTimeoutError("Timeout expired")
514
+
494
515
  async def exec_poll(self, task_id: str, exec_id: str, deadline: float | None = None) -> sr_pb2.TaskExecPollResponse:
495
516
  """Poll for the exit status of an exec'd command, properly retrying on transient errors.
496
517
 
@@ -784,6 +805,12 @@ class TaskCommandRouterClient:
784
805
  lambda: self._call_with_auth_retry(self._stub.TaskUnmountDirectory, request)
785
806
  )
786
807
 
808
+ async def set_network_access(self, request: sr_pb2.TaskSetNetworkAccessRequest):
809
+ with grpc_error_converter():
810
+ return await call_with_retries_on_transient_errors(
811
+ lambda: self._call_with_auth_retry(self._stub.TaskSetNetworkAccess, request)
812
+ )
813
+
787
814
  async def _snapshot_with_deadline(self, rpc, request, *, timeout: float, **kwargs):
788
815
  # helper method for snapshot_directory and snapshot_filesystem to handle grpc
789
816
  # deadlines in a consistent way, converting any error to TimeoutError after passing
@@ -151,8 +151,9 @@ class _WorkspaceBillingManager:
151
151
  Modal's billing model evolves.
152
152
 
153
153
  It's also possible to generate reports using the
154
- [`modal billing report`](https://modal.com/docs/reference/cli/billing) CLI command. The CLI
155
- has a few convenience features for generating reports across relative time ranges.
154
+ [`modal billing report`](https://modal.com/docs/cli/latest/billing#modal-billing-report)
155
+ CLI command. The CLI has a few convenience features for generating reports across relative
156
+ time ranges.
156
157
 
157
158
  """
158
159
  + BILLING_DOCSTRING
@@ -710,7 +710,7 @@ class _App:
710
710
  Modal functions can also be used as CLI entrypoints, but unlike `local_entrypoint`,
711
711
  those functions are executed remotely directly.
712
712
 
713
- Note that an explicit [`app.run()`](https://modal.com/docs/reference/modal.App#run) is not needed, as an
713
+ Note that an explicit [`app.run()`](https://modal.com/docs/sdk/py/latest/modal.App#run) is not needed, as an
714
714
  [app](https://modal.com/docs/guide/apps) is automatically created for you.
715
715
 
716
716
  Args:
@@ -1066,7 +1066,7 @@ class _App:
1066
1066
  max_inputs: int | None = None,
1067
1067
  ) -> Callable[[CLS_T | _PartialFunction], CLS_T]:
1068
1068
  """
1069
- Decorator to register a new Modal [Cls](https://modal.com/docs/reference/modal.Cls) with this App.
1069
+ Decorator to register a new Modal [Cls](https://modal.com/docs/sdk/py/latest/modal.Cls) with this App.
1070
1070
 
1071
1071
  Args:
1072
1072
  image: The image to run as the container for the class service.
@@ -1290,6 +1290,7 @@ class _App:
1290
1290
  scaleup_window: int | None = None, # Stabilization window (seconds) of sustained demand before scaling up
1291
1291
  scaledown_window: int | None = None, # Max idle time before scaling down (seconds)
1292
1292
  proxy: _Proxy | None = None, # Modal Proxy to use in front of this server
1293
+ unauthenticated: bool = False, # Whether the endpoint requires proxy authentication, required by default.
1293
1294
  port: int = 8000, # Port the HTTP server listens on
1294
1295
  startup_timeout: int = 30, # Maximum startup time in seconds
1295
1296
  exit_grace_period: int = 0, # Grace period for in-flight requests on shutdown
@@ -1334,10 +1335,11 @@ class _App:
1334
1335
  scaledown_window: Max idle time before scaling down (seconds).
1335
1336
  proxy: Modal Proxy to use in front of this server.
1336
1337
  port: Port the HTTP server listens on.
1338
+ unauthenticated: Whether the endpoint requires proxy authentication, required by default.
1337
1339
  startup_timeout: Maximum startup time in seconds.
1338
1340
  exit_grace_period: Grace period for in-flight requests on shutdown.
1339
1341
  routing_region: Region to route Server requests through.
1340
- h2_enabled: Enable HTTP/2 in the container.
1342
+ h2_enabled: Enable HTTP/2.
1341
1343
  target_concurrency: Target concurrency for the server; 0 disables autoscaling.
1342
1344
  cloud: Cloud provider (aws, gcp, oci, auto).
1343
1345
  region: Region(s) to run on.
@@ -1385,6 +1387,7 @@ class _App:
1385
1387
  startup_timeout=startup_timeout,
1386
1388
  exit_grace_period=exit_grace_period,
1387
1389
  h2_enabled=h2_enabled,
1390
+ unauthenticated=unauthenticated,
1388
1391
  )
1389
1392
 
1390
1393
  # Build secrets list
@@ -494,7 +494,7 @@ class _App:
494
494
  Modal functions can also be used as CLI entrypoints, but unlike `local_entrypoint`,
495
495
  those functions are executed remotely directly.
496
496
 
497
- Note that an explicit [`app.run()`](https://modal.com/docs/reference/modal.App#run) is not needed, as an
497
+ Note that an explicit [`app.run()`](https://modal.com/docs/sdk/py/latest/modal.App#run) is not needed, as an
498
498
  [app](https://modal.com/docs/guide/apps) is automatically created for you.
499
499
 
500
500
  Args:
@@ -683,7 +683,7 @@ class _App:
683
683
  _experimental_restrict_output: bool = False,
684
684
  max_inputs: typing.Optional[int] = None,
685
685
  ) -> collections.abc.Callable[[typing.Union[CLS_T, modal._partial_function._PartialFunction]], CLS_T]:
686
- """Decorator to register a new Modal [Cls](https://modal.com/docs/reference/modal.Cls) with this App.
686
+ """Decorator to register a new Modal [Cls](https://modal.com/docs/sdk/py/latest/modal.Cls) with this App.
687
687
 
688
688
  Args:
689
689
  image: The image to run as the container for the class service.
@@ -751,6 +751,7 @@ class _App:
751
751
  scaleup_window: typing.Optional[int] = None,
752
752
  scaledown_window: typing.Optional[int] = None,
753
753
  proxy: typing.Optional[modal.proxy._Proxy] = None,
754
+ unauthenticated: bool = False,
754
755
  port: int = 8000,
755
756
  startup_timeout: int = 30,
756
757
  exit_grace_period: int = 0,
@@ -795,10 +796,11 @@ class _App:
795
796
  scaledown_window: Max idle time before scaling down (seconds).
796
797
  proxy: Modal Proxy to use in front of this server.
797
798
  port: Port the HTTP server listens on.
799
+ unauthenticated: Whether the endpoint requires proxy authentication, required by default.
798
800
  startup_timeout: Maximum startup time in seconds.
799
801
  exit_grace_period: Grace period for in-flight requests on shutdown.
800
802
  routing_region: Region to route Server requests through.
801
- h2_enabled: Enable HTTP/2 in the container.
803
+ h2_enabled: Enable HTTP/2.
802
804
  target_concurrency: Target concurrency for the server; 0 disables autoscaling.
803
805
  cloud: Cloud provider (aws, gcp, oci, auto).
804
806
  region: Region(s) to run on.
@@ -1495,7 +1497,7 @@ class App:
1495
1497
  Modal functions can also be used as CLI entrypoints, but unlike `local_entrypoint`,
1496
1498
  those functions are executed remotely directly.
1497
1499
 
1498
- Note that an explicit [`app.run()`](https://modal.com/docs/reference/modal.App#run) is not needed, as an
1500
+ Note that an explicit [`app.run()`](https://modal.com/docs/sdk/py/latest/modal.App#run) is not needed, as an
1499
1501
  [app](https://modal.com/docs/guide/apps) is automatically created for you.
1500
1502
 
1501
1503
  Args:
@@ -1684,7 +1686,7 @@ class App:
1684
1686
  _experimental_restrict_output: bool = False,
1685
1687
  max_inputs: typing.Optional[int] = None,
1686
1688
  ) -> collections.abc.Callable[[typing.Union[CLS_T, modal.partial_function.PartialFunction]], CLS_T]:
1687
- """Decorator to register a new Modal [Cls](https://modal.com/docs/reference/modal.Cls) with this App.
1689
+ """Decorator to register a new Modal [Cls](https://modal.com/docs/sdk/py/latest/modal.Cls) with this App.
1688
1690
 
1689
1691
  Args:
1690
1692
  image: The image to run as the container for the class service.
@@ -1752,6 +1754,7 @@ class App:
1752
1754
  scaleup_window: typing.Optional[int] = None,
1753
1755
  scaledown_window: typing.Optional[int] = None,
1754
1756
  proxy: typing.Optional[modal.proxy.Proxy] = None,
1757
+ unauthenticated: bool = False,
1755
1758
  port: int = 8000,
1756
1759
  startup_timeout: int = 30,
1757
1760
  exit_grace_period: int = 0,
@@ -1794,10 +1797,11 @@ class App:
1794
1797
  scaledown_window: Max idle time before scaling down (seconds).
1795
1798
  proxy: Modal Proxy to use in front of this server.
1796
1799
  port: Port the HTTP server listens on.
1800
+ unauthenticated: Whether the endpoint requires proxy authentication, required by default.
1797
1801
  startup_timeout: Maximum startup time in seconds.
1798
1802
  exit_grace_period: Grace period for in-flight requests on shutdown.
1799
1803
  routing_region: Region to route Server requests through.
1800
- h2_enabled: Enable HTTP/2 in the container.
1804
+ h2_enabled: Enable HTTP/2.
1801
1805
  target_concurrency: Target concurrency for the server; 0 disables autoscaling.
1802
1806
  cloud: Cloud provider (aws, gcp, oci, auto).
1803
1807
  region: Region(s) to run on.
@@ -134,7 +134,7 @@ class __workspace_billing_report_spec(typing_extensions.Protocol):
134
134
  case, we recommend leaving a buffer after the end of the query interval.
135
135
 
136
136
  It's also possible to generate reports using the
137
- [`modal billing report`](https://modal.com/docs/reference/cli/billing) CLI command. The CLI
137
+ [`modal billing report`](https://modal.com/docs/cli/latest/billing) CLI command. The CLI
138
138
  has a few convenience features for generating reports across relative time ranges.
139
139
  """
140
140
  ...
@@ -176,7 +176,7 @@ class __workspace_billing_report_spec(typing_extensions.Protocol):
176
176
  case, we recommend leaving a buffer after the end of the query interval.
177
177
 
178
178
  It's also possible to generate reports using the
179
- [`modal billing report`](https://modal.com/docs/reference/cli/billing) CLI command. The CLI
179
+ [`modal billing report`](https://modal.com/docs/cli/latest/billing) CLI command. The CLI
180
180
  has a few convenience features for generating reports across relative time ranges.
181
181
  """
182
182
  ...
@@ -98,7 +98,7 @@ def _build_epilog(cmd: click.Command) -> RenderableType | None:
98
98
  return Text(cmd.epilog)
99
99
 
100
100
 
101
- def _group_commands_by_panel(group: click.Group) -> dict[str, list[tuple[str, click.Command]]]:
101
+ def group_commands_by_panel(group: click.Group) -> dict[str, list[tuple[str, click.Command]]]:
102
102
  """Bucket visible subcommands, preserving registration order."""
103
103
  panels: dict[str, list[tuple[str, click.Command]]] = {}
104
104
  for name, sub in group.commands.items():
@@ -109,7 +109,7 @@ def _group_commands_by_panel(group: click.Group) -> dict[str, list[tuple[str, cl
109
109
 
110
110
 
111
111
  def _build_commands(group: click.Group, available_width: int) -> RenderableType | None:
112
- panels = _group_commands_by_panel(group)
112
+ panels = group_commands_by_panel(group)
113
113
  if not panels:
114
114
  return None
115
115
 
@@ -229,7 +229,7 @@ class ModalGroup(click.Group):
229
229
  def format_commands(self, ctx: click.Context, formatter: click.HelpFormatter) -> None:
230
230
  # Replaces click's single flat "Commands:" section with one section per
231
231
  # panel so the simple-style help output still preserves grouping.
232
- for panel_name, items in _group_commands_by_panel(self).items():
232
+ for panel_name, items in group_commands_by_panel(self).items():
233
233
  rows = [(name, sub.get_short_help_str(limit=80)) for name, sub in items]
234
234
  with formatter.section(panel_name):
235
235
  formatter.write_dl(rows)
@@ -107,7 +107,7 @@ async def report(
107
107
  or by requesting a date range using `--for` (e.g., `--for today`, `--for 'last month'`).
108
108
 
109
109
  This command provides a CLI frontend for the
110
- [`Workspace.billing.report`](https://modal.com/docs/reference/modal.Workspace#billingreport) API.
110
+ [`Workspace.billing.report`](https://modal.com/docs/sdk/py/latest/modal.Workspace#billingreport) API.
111
111
 
112
112
  Note that, as with the API, the start date is inclusive and the end date is exclusive.
113
113
  Data will be reported for full intervals only. Using `--for` is a convenient way to define a
@@ -10,7 +10,7 @@ from modal._vendor.version import Version
10
10
 
11
11
  from ._help import ModalCommand
12
12
 
13
- CHANGELOG_URL = "https://modal.com/docs/reference/changelog.md"
13
+ CHANGELOG_URL = "https://modal.com/docs/sdk/py/changelog.md"
14
14
 
15
15
 
16
16
  @dataclass
@@ -14,7 +14,7 @@ config_cli = ModalGroup(
14
14
  help="""
15
15
  Manage client configuration for the current profile.
16
16
 
17
- Refer to https://modal.com/docs/reference/modal.config for a full explanation
17
+ Refer to https://modal.com/docs/sdk/py/latest/modal.config for a full explanation
18
18
  of what these options mean, and how to set them.
19
19
  """,
20
20
  )
@@ -230,7 +230,8 @@ async def environment_billing(
230
230
  or by requesting a date range using `--for` (e.g., `--for today`, `--for 'last month'`).
231
231
 
232
232
  This command provides a CLI frontend for the
233
- [`Environment.billing.report`](https://modal.com/docs/reference/modal.Environment#billingreport) API.
233
+ [`Environment.billing.report`](https://modal.com/docs/sdk/py/latest/modal.Environment#billingreport)
234
+ API.
234
235
 
235
236
  Note that, as with the API, the start date is inclusive and the end date is exclusive.
236
237
  Data will be reported for full intervals only. Using `--for` is a convenient way to define a
@@ -358,7 +358,7 @@ def shell(
358
358
  modal shell hello_world.py::my_function
359
359
  ```
360
360
 
361
- Or, if you're using a [modal.Cls](https://modal.com/docs/reference/modal.Cls)
361
+ Or, if you're using a [modal.Cls](https://modal.com/docs/sdk/py/latest/modal.Cls)
362
362
  you can refer to a `@modal.method` directly:
363
363
 
364
364
  ```
@@ -235,7 +235,7 @@ class _Client:
235
235
  else:
236
236
  raise AuthError(
237
237
  "Token missing. Could not authenticate client."
238
- " If you have token credentials, see modal.com/docs/reference/modal.config for setup help."
238
+ " If you have token credentials, see modal.com/docs/sdk/py/latest/modal.config for setup help."
239
239
  " If you are a new user, register an account at modal.com, then run `modal token new`."
240
240
  )
241
241
 
@@ -35,7 +35,7 @@ class _Client:
35
35
  server_url: str,
36
36
  client_type: int,
37
37
  credentials: typing.Optional[tuple[str, str]],
38
- version: str = "1.5.1.dev8",
38
+ version: str = "1.5.1.dev9",
39
39
  ):
40
40
  """mdmd:hidden
41
41
  The Modal client object is not intended to be instantiated directly by users.
@@ -205,7 +205,7 @@ class Client:
205
205
  server_url: str,
206
206
  client_type: int,
207
207
  credentials: typing.Optional[tuple[str, str]],
208
- version: str = "1.5.1.dev8",
208
+ version: str = "1.5.1.dev9",
209
209
  ):
210
210
  """mdmd:hidden
211
211
  The Modal client object is not intended to be instantiated directly by users.
@@ -446,10 +446,10 @@ Obj = synchronize_api(_Obj)
446
446
  class _Cls(_Object, type_prefix="cs"):
447
447
  """
448
448
  Cls adds method pooling and [lifecycle hook](https://modal.com/docs/guide/lifecycle-functions) behavior
449
- to [modal.Function](https://modal.com/docs/reference/modal.Function).
449
+ to [modal.Function](https://modal.com/docs/sdk/py/latest/modal.Function).
450
450
 
451
451
  Generally, you will not construct a Cls directly.
452
- Instead, use the [`@app.cls()`](https://modal.com/docs/reference/modal.App#cls) decorator on the App object.
452
+ Instead, use the [`@app.cls()`](https://modal.com/docs/sdk/py/latest/modal.App#cls) decorator on the App object.
453
453
  """
454
454
 
455
455
  _class_service_function: _Function | None # The _Function (read "service") serving *all* methods of the class
@@ -241,10 +241,10 @@ class Obj:
241
241
 
242
242
  class _Cls(modal._object._Object):
243
243
  """Cls adds method pooling and [lifecycle hook](https://modal.com/docs/guide/lifecycle-functions) behavior
244
- to [modal.Function](https://modal.com/docs/reference/modal.Function).
244
+ to [modal.Function](https://modal.com/docs/sdk/py/latest/modal.Function).
245
245
 
246
246
  Generally, you will not construct a Cls directly.
247
- Instead, use the [`@app.cls()`](https://modal.com/docs/reference/modal.App#cls) decorator on the App object.
247
+ Instead, use the [`@app.cls()`](https://modal.com/docs/sdk/py/latest/modal.App#cls) decorator on the App object.
248
248
  """
249
249
 
250
250
  _class_service_function: typing.Optional[modal._functions._Function]
@@ -444,10 +444,10 @@ class _Cls(modal._object._Object):
444
444
 
445
445
  class Cls(modal.object.Object):
446
446
  """Cls adds method pooling and [lifecycle hook](https://modal.com/docs/guide/lifecycle-functions) behavior
447
- to [modal.Function](https://modal.com/docs/reference/modal.Function).
447
+ to [modal.Function](https://modal.com/docs/sdk/py/latest/modal.Function).
448
448
 
449
449
  Generally, you will not construct a Cls directly.
450
- Instead, use the [`@app.cls()`](https://modal.com/docs/reference/modal.App#cls) decorator on the App object.
450
+ Instead, use the [`@app.cls()`](https://modal.com/docs/sdk/py/latest/modal.App#cls) decorator on the App object.
451
451
  """
452
452
 
453
453
  _class_service_function: typing.Optional[modal.functions.Function]
@@ -47,7 +47,7 @@ UserCodeException = synchronicity.exceptions.UserCodeException # Deprecated typ
47
47
 
48
48
  class Error(Exception):
49
49
  """
50
- Base class for all Modal errors. See [`modal.exception`](https://modal.com/docs/reference/modal.exception)
50
+ Base class for all Modal errors. See [`modal.exception`](https://modal.com/docs/sdk/py/latest/modal.exception)
51
51
  for the specialized error classes.
52
52
 
53
53
  Examples:
@@ -617,9 +617,9 @@ class Function(
617
617
  **kwargs: Keyword arguments forwarded to the remote function.
618
618
 
619
619
  Returns:
620
- A [`modal.FunctionCall`](https://modal.com/docs/reference/modal.FunctionCall) object
620
+ A [`modal.FunctionCall`](https://modal.com/docs/sdk/py/latest/modal.FunctionCall) object
621
621
  that can later be polled or waited for using
622
- [`.get(timeout=...)`](https://modal.com/docs/reference/modal.FunctionCall#get).
622
+ [`.get(timeout=...)`](https://modal.com/docs/sdk/py/latest/modal.FunctionCall#get).
623
623
  """
624
624
  ...
625
625
 
@@ -633,9 +633,9 @@ class Function(
633
633
  **kwargs: Keyword arguments forwarded to the remote function.
634
634
 
635
635
  Returns:
636
- A [`modal.FunctionCall`](https://modal.com/docs/reference/modal.FunctionCall) object
636
+ A [`modal.FunctionCall`](https://modal.com/docs/sdk/py/latest/modal.FunctionCall) object
637
637
  that can later be polled or waited for using
638
- [`.get(timeout=...)`](https://modal.com/docs/reference/modal.FunctionCall#get).
638
+ [`.get(timeout=...)`](https://modal.com/docs/sdk/py/latest/modal.FunctionCall#get).
639
639
  """
640
640
  ...
641
641
 
@@ -1031,7 +1031,7 @@ class FunctionCall(typing.Generic[modal._functions.ReturnType], modal.object.Obj
1031
1031
  """Returns a structure representing the call graph from a given root
1032
1032
  call ID, along with the status of execution for each node.
1033
1033
 
1034
- See [`modal.call_graph`](https://modal.com/docs/reference/modal.call_graph) reference page
1034
+ See [`modal.call_graph`](https://modal.com/docs/sdk/py/latest/modal.call_graph) reference page
1035
1035
  for documentation on the structure of the returned `InputInfo` items.
1036
1036
 
1037
1037
  Returns:
@@ -1043,7 +1043,7 @@ class FunctionCall(typing.Generic[modal._functions.ReturnType], modal.object.Obj
1043
1043
  """Returns a structure representing the call graph from a given root
1044
1044
  call ID, along with the status of execution for each node.
1045
1045
 
1046
- See [`modal.call_graph`](https://modal.com/docs/reference/modal.call_graph) reference page
1046
+ See [`modal.call_graph`](https://modal.com/docs/sdk/py/latest/modal.call_graph) reference page
1047
1047
  for documentation on the structure of the returned `InputInfo` items.
1048
1048
 
1049
1049
  Returns:
@@ -1056,7 +1056,7 @@ class FunctionCall(typing.Generic[modal._functions.ReturnType], modal.object.Obj
1056
1056
  class __cancel_spec(typing_extensions.Protocol):
1057
1057
  def __call__(self, /, terminate_containers: bool = False):
1058
1058
  """Cancels the function call, which will stop its execution and mark its inputs as
1059
- [`TERMINATED`](https://modal.com/docs/reference/modal.call_graph#modalcall_graphinputstatus).
1059
+ [`TERMINATED`](https://modal.com/docs/sdk/py/latest/modal.call_graph#modalcall_graphinputstatus).
1060
1060
 
1061
1061
  If `terminate_containers=True` - the containers running the cancelled inputs are all terminated
1062
1062
  causing any non-cancelled inputs on those containers to be rescheduled in new containers.
@@ -1068,7 +1068,7 @@ class FunctionCall(typing.Generic[modal._functions.ReturnType], modal.object.Obj
1068
1068
 
1069
1069
  async def aio(self, /, terminate_containers: bool = False):
1070
1070
  """Cancels the function call, which will stop its execution and mark its inputs as
1071
- [`TERMINATED`](https://modal.com/docs/reference/modal.call_graph#modalcall_graphinputstatus).
1071
+ [`TERMINATED`](https://modal.com/docs/sdk/py/latest/modal.call_graph#modalcall_graphinputstatus).
1072
1072
 
1073
1073
  If `terminate_containers=True` - the containers running the cancelled inputs are all terminated
1074
1074
  causing any non-cancelled inputs on those containers to be rescheduled in new containers.
@@ -169,7 +169,7 @@ def wsgi_app(
169
169
  Web Server Gateway Interface (WSGI) is a standard for synchronous Python web apps.
170
170
  It has been [succeeded by the ASGI interface](https://asgi.readthedocs.io/en/latest/introduction.html#wsgi-compatibility)
171
171
  which is compatible with ASGI and supports additional functionality such as web sockets.
172
- Modal supports ASGI via [`asgi_app`](https://modal.com/docs/reference/modal.asgi_app).
172
+ Modal supports ASGI via [`asgi_app`](https://modal.com/docs/sdk/py/latest/modal.asgi_app).
173
173
 
174
174
  Examples:
175
175
  ```python
@@ -149,8 +149,22 @@ async def _create_all_objects(
149
149
  resolver = Resolver()
150
150
  output_mgr = OutputManager.get()
151
151
  with output_mgr.display_object_tree():
152
- # Get current objects, and reset all objects
153
- tag_to_object_id = {**running_app.function_ids, **running_app.class_ids}
152
+ # Get current objects, and reset all objects.
153
+ # Only reuse an existing object id when its type matches the object now being
154
+ # deployed under that tag. The server tracks function and class ids separately,
155
+ # so a tag that previously named a Function (fu-) but now names a Cls (cs-), or
156
+ # vice versa, finds no match here and gets a fresh id instead of failing. The old
157
+ # object is no longer referenced and is cleaned up when the new layout is published.
158
+ tag_to_object_id = {}
159
+ for tag, obj in indexed_objects.items():
160
+ if isinstance(obj, _Function):
161
+ existing_object_id = running_app.function_ids.get(tag)
162
+ elif isinstance(obj, _Cls):
163
+ existing_object_id = running_app.class_ids.get(tag)
164
+ else:
165
+ existing_object_id = None
166
+ if existing_object_id is not None:
167
+ tag_to_object_id[tag] = existing_object_id
154
168
  running_app.function_ids = {}
155
169
  running_app.class_ids = {}
156
170
 
@@ -170,16 +184,6 @@ async def _create_all_objects(
170
184
  # Note: preload only currently implemented for Functions, returns None otherwise
171
185
  # this is to ensure that directly referenced functions from the global scope has
172
186
  # ids associated with them when they are serialized into other functions
173
- if existing_object_id is not None and not obj._is_id_type(existing_object_id):
174
- expected_type = obj.__class__.__name__.strip("_")
175
- expected_prefix = getattr(obj.__class__, "_type_prefix", None)
176
- prefix_hint = f" (expected prefix {expected_prefix}-)" if expected_prefix else ""
177
- raise InvalidError(
178
- f"Existing object id {existing_object_id} is not a {expected_type} id{prefix_hint}. "
179
- "This usually means the object name was previously used for a different type. "
180
- "Rename the object/app or stop the previous deployment and redeploy."
181
- )
182
-
183
187
  await resolver.preload(obj, load_context, existing_object_id)
184
188
  if obj.is_hydrated:
185
189
  tag_to_object_id[tag] = obj.object_id