modal 1.0.6.dev34__tar.gz → 1.0.6.dev35__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 (186) hide show
  1. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/PKG-INFO +1 -1
  2. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/app.py +20 -4
  3. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/app.pyi +40 -8
  4. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/client.pyi +2 -2
  5. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/experimental/__init__.py +47 -1
  6. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal.egg-info/PKG-INFO +1 -1
  7. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_version/__init__.py +1 -1
  8. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/LICENSE +0 -0
  9. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/README.md +0 -0
  10. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/__init__.py +0 -0
  11. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/__main__.py +0 -0
  12. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_clustered_functions.py +0 -0
  13. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_clustered_functions.pyi +0 -0
  14. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_container_entrypoint.py +0 -0
  15. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_functions.py +0 -0
  16. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_ipython.py +0 -0
  17. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_location.py +0 -0
  18. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_object.py +0 -0
  19. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_output.py +0 -0
  20. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_partial_function.py +0 -0
  21. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_pty.py +0 -0
  22. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_resolver.py +0 -0
  23. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_resources.py +0 -0
  24. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_runtime/__init__.py +0 -0
  25. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_runtime/asgi.py +0 -0
  26. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_runtime/container_io_manager.py +0 -0
  27. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_runtime/container_io_manager.pyi +0 -0
  28. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_runtime/execution_context.py +0 -0
  29. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_runtime/execution_context.pyi +0 -0
  30. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_runtime/gpu_memory_snapshot.py +0 -0
  31. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_runtime/telemetry.py +0 -0
  32. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_runtime/user_code_imports.py +0 -0
  33. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_serialization.py +0 -0
  34. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_traceback.py +0 -0
  35. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_tunnel.py +0 -0
  36. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_tunnel.pyi +0 -0
  37. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_type_manager.py +0 -0
  38. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/__init__.py +0 -0
  39. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/app_utils.py +0 -0
  40. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/async_utils.py +0 -0
  41. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/auth_token_manager.py +0 -0
  42. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/blob_utils.py +0 -0
  43. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/bytes_io_segment_payload.py +0 -0
  44. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/deprecation.py +0 -0
  45. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/docker_utils.py +0 -0
  46. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/function_utils.py +0 -0
  47. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/git_utils.py +0 -0
  48. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/grpc_testing.py +0 -0
  49. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/grpc_utils.py +0 -0
  50. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/hash_utils.py +0 -0
  51. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/http_utils.py +0 -0
  52. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/jwt_utils.py +0 -0
  53. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/logger.py +0 -0
  54. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/mount_utils.py +0 -0
  55. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/name_utils.py +0 -0
  56. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/package_utils.py +0 -0
  57. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/pattern_utils.py +0 -0
  58. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/rand_pb_testing.py +0 -0
  59. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/shell_utils.py +0 -0
  60. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_utils/time_utils.py +0 -0
  61. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_vendor/__init__.py +0 -0
  62. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_vendor/a2wsgi_wsgi.py +0 -0
  63. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_vendor/cloudpickle.py +0 -0
  64. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_vendor/tblib.py +0 -0
  65. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/_watcher.py +0 -0
  66. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/call_graph.py +0 -0
  67. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/__init__.py +0 -0
  68. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/_download.py +0 -0
  69. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/_traceback.py +0 -0
  70. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/app.py +0 -0
  71. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/cluster.py +0 -0
  72. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/config.py +0 -0
  73. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/container.py +0 -0
  74. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/dict.py +0 -0
  75. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/entry_point.py +0 -0
  76. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/environment.py +0 -0
  77. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/import_refs.py +0 -0
  78. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/launch.py +0 -0
  79. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/network_file_system.py +0 -0
  80. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/profile.py +0 -0
  81. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/programs/__init__.py +0 -0
  82. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/programs/run_jupyter.py +0 -0
  83. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/programs/vscode.py +0 -0
  84. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/queues.py +0 -0
  85. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/run.py +0 -0
  86. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/secret.py +0 -0
  87. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/token.py +0 -0
  88. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/utils.py +0 -0
  89. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cli/volume.py +0 -0
  90. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/client.py +0 -0
  91. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cloud_bucket_mount.py +0 -0
  92. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cloud_bucket_mount.pyi +0 -0
  93. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cls.py +0 -0
  94. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/cls.pyi +0 -0
  95. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/config.py +0 -0
  96. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/container_process.py +0 -0
  97. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/container_process.pyi +0 -0
  98. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/dict.py +0 -0
  99. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/dict.pyi +0 -0
  100. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/environments.py +0 -0
  101. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/environments.pyi +0 -0
  102. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/exception.py +0 -0
  103. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/experimental/ipython.py +0 -0
  104. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/file_io.py +0 -0
  105. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/file_io.pyi +0 -0
  106. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/file_pattern_matcher.py +0 -0
  107. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/functions.py +0 -0
  108. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/functions.pyi +0 -0
  109. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/gpu.py +0 -0
  110. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/image.py +0 -0
  111. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/image.pyi +0 -0
  112. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/io_streams.py +0 -0
  113. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/io_streams.pyi +0 -0
  114. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/mount.py +0 -0
  115. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/mount.pyi +0 -0
  116. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/network_file_system.py +0 -0
  117. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/network_file_system.pyi +0 -0
  118. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/object.py +0 -0
  119. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/object.pyi +0 -0
  120. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/output.py +0 -0
  121. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/parallel_map.py +0 -0
  122. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/parallel_map.pyi +0 -0
  123. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/partial_function.py +0 -0
  124. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/partial_function.pyi +0 -0
  125. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/proxy.py +0 -0
  126. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/proxy.pyi +0 -0
  127. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/py.typed +0 -0
  128. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/queue.py +0 -0
  129. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/queue.pyi +0 -0
  130. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/requirements/2023.12.312.txt +0 -0
  131. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/requirements/2023.12.txt +0 -0
  132. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/requirements/2024.04.txt +0 -0
  133. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/requirements/2024.10.txt +0 -0
  134. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/requirements/2025.06.txt +0 -0
  135. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/requirements/PREVIEW.txt +0 -0
  136. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/requirements/README.md +0 -0
  137. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/requirements/base-images.json +0 -0
  138. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/retries.py +0 -0
  139. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/runner.py +0 -0
  140. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/runner.pyi +0 -0
  141. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/running_app.py +0 -0
  142. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/sandbox.py +0 -0
  143. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/sandbox.pyi +0 -0
  144. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/schedule.py +0 -0
  145. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/scheduler_placement.py +0 -0
  146. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/secret.py +0 -0
  147. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/secret.pyi +0 -0
  148. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/serving.py +0 -0
  149. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/serving.pyi +0 -0
  150. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/snapshot.py +0 -0
  151. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/snapshot.pyi +0 -0
  152. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/stream_type.py +0 -0
  153. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/token_flow.py +0 -0
  154. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/token_flow.pyi +0 -0
  155. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/volume.py +0 -0
  156. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal/volume.pyi +0 -0
  157. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal.egg-info/SOURCES.txt +0 -0
  158. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal.egg-info/dependency_links.txt +0 -0
  159. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal.egg-info/entry_points.txt +0 -0
  160. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal.egg-info/requires.txt +0 -0
  161. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal.egg-info/top_level.txt +0 -0
  162. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_docs/__init__.py +0 -0
  163. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_docs/gen_cli_docs.py +0 -0
  164. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_docs/gen_reference_docs.py +0 -0
  165. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_docs/mdmd/__init__.py +0 -0
  166. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_docs/mdmd/mdmd.py +0 -0
  167. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_docs/mdmd/signatures.py +0 -0
  168. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/__init__.py +0 -0
  169. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/api.proto +0 -0
  170. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/api_grpc.py +0 -0
  171. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/api_pb2.py +0 -0
  172. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/api_pb2.pyi +0 -0
  173. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/api_pb2_grpc.py +0 -0
  174. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/api_pb2_grpc.pyi +0 -0
  175. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/modal_api_grpc.py +0 -0
  176. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/modal_options_grpc.py +0 -0
  177. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/options.proto +0 -0
  178. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/options_grpc.py +0 -0
  179. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/options_pb2.py +0 -0
  180. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/options_pb2.pyi +0 -0
  181. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/options_pb2_grpc.py +0 -0
  182. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/options_pb2_grpc.pyi +0 -0
  183. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_proto/py.typed +0 -0
  184. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/modal_version/__main__.py +0 -0
  185. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/pyproject.toml +0 -0
  186. {modal-1.0.6.dev34 → modal-1.0.6.dev35}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 1.0.6.dev34
3
+ Version: 1.0.6.dev35
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License: Apache-2.0
@@ -508,22 +508,38 @@ class _App:
508
508
 
509
509
  @property
510
510
  def registered_functions(self) -> dict[str, _Function]:
511
- """All modal.Function objects registered on the app."""
511
+ """All modal.Function objects registered on the app.
512
+
513
+ Note: this property is populated only during the build phase, and it is not
514
+ expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
515
+ """
512
516
  return self._functions
513
517
 
514
518
  @property
515
519
  def registered_classes(self) -> dict[str, _Cls]:
516
- """All modal.Cls objects registered on the app."""
520
+ """All modal.Cls objects registered on the app.
521
+
522
+ Note: this property is populated only during the build phase, and it is not
523
+ expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
524
+ """
517
525
  return self._classes
518
526
 
519
527
  @property
520
528
  def registered_entrypoints(self) -> dict[str, _LocalEntrypoint]:
521
- """All local CLI entrypoints registered on the app."""
529
+ """All local CLI entrypoints registered on the app.
530
+
531
+ Note: this property is populated only during the build phase, and it is not
532
+ expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
533
+ """
522
534
  return self._local_entrypoints
523
535
 
524
536
  @property
525
537
  def registered_web_endpoints(self) -> list[str]:
526
- """Names of web endpoint (ie. webhook) functions registered on the app."""
538
+ """Names of web endpoint (ie. webhook) functions registered on the app.
539
+
540
+ Note: this property is populated only during the build phase, and it is not
541
+ expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
542
+ """
527
543
  return self._web_endpoints
528
544
 
529
545
  def local_entrypoint(
@@ -299,22 +299,38 @@ class _App:
299
299
  def _init_container(self, client: modal.client._Client, running_app: modal.running_app.RunningApp): ...
300
300
  @property
301
301
  def registered_functions(self) -> dict[str, modal._functions._Function]:
302
- """All modal.Function objects registered on the app."""
302
+ """All modal.Function objects registered on the app.
303
+
304
+ Note: this property is populated only during the build phase, and it is not
305
+ expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
306
+ """
303
307
  ...
304
308
 
305
309
  @property
306
310
  def registered_classes(self) -> dict[str, modal.cls._Cls]:
307
- """All modal.Cls objects registered on the app."""
311
+ """All modal.Cls objects registered on the app.
312
+
313
+ Note: this property is populated only during the build phase, and it is not
314
+ expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
315
+ """
308
316
  ...
309
317
 
310
318
  @property
311
319
  def registered_entrypoints(self) -> dict[str, _LocalEntrypoint]:
312
- """All local CLI entrypoints registered on the app."""
320
+ """All local CLI entrypoints registered on the app.
321
+
322
+ Note: this property is populated only during the build phase, and it is not
323
+ expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
324
+ """
313
325
  ...
314
326
 
315
327
  @property
316
328
  def registered_web_endpoints(self) -> list[str]:
317
- """Names of web endpoint (ie. webhook) functions registered on the app."""
329
+ """Names of web endpoint (ie. webhook) functions registered on the app.
330
+
331
+ Note: this property is populated only during the build phase, and it is not
332
+ expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
333
+ """
318
334
  ...
319
335
 
320
336
  def local_entrypoint(
@@ -888,22 +904,38 @@ class App:
888
904
  def _init_container(self, client: modal.client.Client, running_app: modal.running_app.RunningApp): ...
889
905
  @property
890
906
  def registered_functions(self) -> dict[str, modal.functions.Function]:
891
- """All modal.Function objects registered on the app."""
907
+ """All modal.Function objects registered on the app.
908
+
909
+ Note: this property is populated only during the build phase, and it is not
910
+ expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
911
+ """
892
912
  ...
893
913
 
894
914
  @property
895
915
  def registered_classes(self) -> dict[str, modal.cls.Cls]:
896
- """All modal.Cls objects registered on the app."""
916
+ """All modal.Cls objects registered on the app.
917
+
918
+ Note: this property is populated only during the build phase, and it is not
919
+ expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
920
+ """
897
921
  ...
898
922
 
899
923
  @property
900
924
  def registered_entrypoints(self) -> dict[str, LocalEntrypoint]:
901
- """All local CLI entrypoints registered on the app."""
925
+ """All local CLI entrypoints registered on the app.
926
+
927
+ Note: this property is populated only during the build phase, and it is not
928
+ expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
929
+ """
902
930
  ...
903
931
 
904
932
  @property
905
933
  def registered_web_endpoints(self) -> list[str]:
906
- """Names of web endpoint (ie. webhook) functions registered on the app."""
934
+ """Names of web endpoint (ie. webhook) functions registered on the app.
935
+
936
+ Note: this property is populated only during the build phase, and it is not
937
+ expected to work when a deplyoed App has been retrieved via `modal.App.lookup`.
938
+ """
907
939
  ...
908
940
 
909
941
  def local_entrypoint(
@@ -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.0.6.dev34",
36
+ version: str = "1.0.6.dev35",
37
37
  ):
38
38
  """mdmd:hidden
39
39
  The Modal client object is not intended to be instantiated directly by users.
@@ -163,7 +163,7 @@ class Client:
163
163
  server_url: str,
164
164
  client_type: int,
165
165
  credentials: typing.Optional[tuple[str, str]],
166
- version: str = "1.0.6.dev34",
166
+ version: str = "1.0.6.dev35",
167
167
  ):
168
168
  """mdmd:hidden
169
169
  The Modal client object is not intended to be instantiated directly by users.
@@ -17,8 +17,9 @@ from .._tunnel import _forward as _forward_tunnel
17
17
  from .._utils.async_utils import synchronize_api, synchronizer
18
18
  from .._utils.deprecation import deprecation_warning
19
19
  from .._utils.grpc_utils import retry_transient_errors
20
+ from ..app import _App
20
21
  from ..client import _Client
21
- from ..cls import _Obj
22
+ from ..cls import _Cls, _Obj
22
23
  from ..config import logger
23
24
  from ..exception import InvalidError
24
25
  from ..image import DockerfileSpec, ImageBuilderVersion, _Image, _ImageRegistryConfig
@@ -88,6 +89,51 @@ async def list_deployed_apps(environment_name: str = "", client: Optional[_Clien
88
89
  return app_infos
89
90
 
90
91
 
92
+ @synchronizer.create_blocking
93
+ async def get_app_objects(
94
+ app_name: str, *, environment_name: Optional[str] = None, client: Optional[_Client] = None
95
+ ) -> dict[str, Union[_Function, _Cls]]:
96
+ """Experimental interface for retrieving a dictionary of the Functions / Clses in an App.
97
+
98
+ The return value is a dictionary mapping names to unhydrated Function or Cls objects.
99
+
100
+ We plan to support this functionality through a stable API in the future. It's likely that
101
+ the stable API will look different (it will probably be a method on the App object itself).
102
+
103
+ """
104
+ # This is implemented through a somewhat odd mixture of internal RPCs and public APIs.
105
+ # While AppGetLayout provides the object ID and metadata for each object in the App, it's
106
+ # currently somewhere between very awkward and impossible to hydrate a modal.Cls with just
107
+ # that information, since the "class service function" needs to be loaded first
108
+ # (and it's not always possible to do that without knowledge of the parameterization).
109
+ # So instead we just use AppGetLayout to retrieve the names of the Functions / Clsices on
110
+ # the App and then use the public .from_name constructors to return unhydrated handles.
111
+
112
+ # Additionally, since we need to know the environment name to use `.from_name`, and the App's
113
+ # environment name isn't stored anywhere on the App (and cannot be retrieved via an RPC), the
114
+ # experimental function is parameterized by an App name while the stable API would instead
115
+ # be a method on the App itself.
116
+
117
+ if client is None:
118
+ client = await _Client.from_env()
119
+
120
+ app = await _App.lookup(app_name, environment_name=environment_name, client=client)
121
+ req = api_pb2.AppGetLayoutRequest(app_id=app.app_id)
122
+ app_layout_resp = await retry_transient_errors(client.stub.AppGetLayout, req)
123
+
124
+ app_objects: dict[str, Union[_Function, _Cls]] = {}
125
+
126
+ for cls_name in app_layout_resp.app_layout.class_ids:
127
+ app_objects[cls_name] = _Cls.from_name(app_name, cls_name, environment_name=environment_name)
128
+
129
+ for func_name in app_layout_resp.app_layout.function_ids:
130
+ if func_name.endswith(".*"):
131
+ continue # TODO explain
132
+ app_objects[func_name] = _Function.from_name(app_name, func_name, environment_name=environment_name)
133
+
134
+ return app_objects
135
+
136
+
91
137
  @synchronizer.create_blocking
92
138
  async def raw_dockerfile_image(
93
139
  path: Union[str, Path],
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 1.0.6.dev34
3
+ Version: 1.0.6.dev35
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License: Apache-2.0
@@ -1,4 +1,4 @@
1
1
  # Copyright Modal Labs 2025
2
2
  """Supplies the current version of the modal client library."""
3
3
 
4
- __version__ = "1.0.6.dev34"
4
+ __version__ = "1.0.6.dev35"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes