modal 0.73.88__py3-none-any.whl → 0.73.89__py3-none-any.whl
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.
- modal/_partial_function.py +6 -0
- modal/_runtime/asgi.py +2 -2
- modal/_runtime/user_code_imports.py +1 -1
- modal/client.pyi +2 -2
- {modal-0.73.88.dist-info → modal-0.73.89.dist-info}/METADATA +1 -1
- {modal-0.73.88.dist-info → modal-0.73.89.dist-info}/RECORD +11 -11
- modal_version/_version_generated.py +1 -1
- {modal-0.73.88.dist-info → modal-0.73.89.dist-info}/LICENSE +0 -0
- {modal-0.73.88.dist-info → modal-0.73.89.dist-info}/WHEEL +0 -0
- {modal-0.73.88.dist-info → modal-0.73.89.dist-info}/entry_points.txt +0 -0
- {modal-0.73.88.dist-info → modal-0.73.89.dist-info}/top_level.txt +0 -0
modal/_partial_function.py
CHANGED
@@ -312,6 +312,8 @@ def _web_endpoint(
|
|
312
312
|
) -> Callable[[Callable[P, ReturnType]], _PartialFunction[P, ReturnType, ReturnType]]:
|
313
313
|
"""Register a basic web endpoint with this application.
|
314
314
|
|
315
|
+
DEPRECATED: This decorator has been renamed to `@modal.fastapi_endpoint`.
|
316
|
+
|
315
317
|
This is the simple way to create a web endpoint on Modal. The function
|
316
318
|
behaves as a [FastAPI](https://fastapi.tiangolo.com/) handler and should
|
317
319
|
return a response object to the caller.
|
@@ -332,6 +334,10 @@ def _web_endpoint(
|
|
332
334
|
"Positional arguments are not allowed. Did you forget parentheses? Suggestion: `@web_endpoint()`."
|
333
335
|
)
|
334
336
|
|
337
|
+
deprecation_warning(
|
338
|
+
(2025, 3, 5), "The `@modal.web_endpoint` decorator has been renamed to `@modal.fastapi_endpoint`."
|
339
|
+
)
|
340
|
+
|
335
341
|
def wrapper(raw_f: Callable[..., Any]) -> _PartialFunction:
|
336
342
|
if isinstance(raw_f, _Function):
|
337
343
|
raw_f = raw_f.get_raw_f()
|
modal/_runtime/asgi.py
CHANGED
@@ -236,14 +236,14 @@ def wsgi_app_wrapper(wsgi_app, container_io_manager):
|
|
236
236
|
return asgi_app_wrapper(asgi_app, container_io_manager)
|
237
237
|
|
238
238
|
|
239
|
-
def
|
239
|
+
def magic_fastapi_app(fn: Callable[..., Any], method: str, docs: bool):
|
240
240
|
"""Return a FastAPI app wrapping a function handler."""
|
241
241
|
try:
|
242
242
|
from fastapi import FastAPI
|
243
243
|
from fastapi.middleware.cors import CORSMiddleware
|
244
244
|
except ImportError as exc:
|
245
245
|
message = (
|
246
|
-
"Modal
|
246
|
+
"Modal functions decorated with `fastapi_endpoint` require FastAPI to be installed in the modal.Image."
|
247
247
|
' Please update your Image definition code, e.g. with `.pip_install("fastapi[standard]")`.'
|
248
248
|
)
|
249
249
|
raise InvalidError(message) from exc
|
@@ -69,7 +69,7 @@ def construct_webhook_callable(
|
|
69
69
|
elif webhook_config.type == api_pb2.WEBHOOK_TYPE_FUNCTION:
|
70
70
|
# Function is a webhook without an ASGI app. Create one for it.
|
71
71
|
return asgi.asgi_app_wrapper(
|
72
|
-
asgi.
|
72
|
+
asgi.magic_fastapi_app(user_defined_callable, webhook_config.method, webhook_config.web_endpoint_docs),
|
73
73
|
container_io_manager,
|
74
74
|
)
|
75
75
|
|
modal/client.pyi
CHANGED
@@ -27,7 +27,7 @@ class _Client:
|
|
27
27
|
_snapshotted: bool
|
28
28
|
|
29
29
|
def __init__(
|
30
|
-
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.73.
|
30
|
+
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.73.89"
|
31
31
|
): ...
|
32
32
|
def is_closed(self) -> bool: ...
|
33
33
|
@property
|
@@ -85,7 +85,7 @@ class Client:
|
|
85
85
|
_snapshotted: bool
|
86
86
|
|
87
87
|
def __init__(
|
88
|
-
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.73.
|
88
|
+
self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.73.89"
|
89
89
|
): ...
|
90
90
|
def is_closed(self) -> bool: ...
|
91
91
|
@property
|
@@ -8,7 +8,7 @@ modal/_ipython.py,sha256=TW1fkVOmZL3YYqdS2YlM1hqpf654Yf8ZyybHdBnlhSw,301
|
|
8
8
|
modal/_location.py,sha256=joiX-0ZeutEUDTrrqLF1GHXCdVLF-rHzstocbMcd_-k,366
|
9
9
|
modal/_object.py,sha256=JBIECWdfpRKCaCxVWZbC3Q1kF5Whk_EKvY9f4Y6AFyg,11446
|
10
10
|
modal/_output.py,sha256=Z0nngPh2mKHMQc4MQ92YjVPc3ewOLa3I4dFBlL9nvQY,25656
|
11
|
-
modal/_partial_function.py,sha256=
|
11
|
+
modal/_partial_function.py,sha256=IbJYiWwYB8WsuRlaBrl-19mfx3ncVkRe8mVoL8MvMLM,30272
|
12
12
|
modal/_proxy_tunnel.py,sha256=gnKyCfmVB7x2d1A6c-JDysNIP3kEFxmXzhcXhPrzPn0,1906
|
13
13
|
modal/_pty.py,sha256=JZfPDDpzqICZqtyPI_oMJf_9w-p_lLNuzHhwhodUXio,1329
|
14
14
|
modal/_resolver.py,sha256=RtoXoYzSllPlFu0D1vel_FWiEmDO7RyToiC2bxeN8ZY,6917
|
@@ -22,7 +22,7 @@ modal/app.py,sha256=ojhuLZuNZAQ1OsbDH0k6G4pm1W7bOIvZfXbaKlvQ-Ao,45622
|
|
22
22
|
modal/app.pyi,sha256=tZFbcsu20SuvfB2puxCyuXLFNJ9bQulzag55rVpgZmc,26827
|
23
23
|
modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
|
24
24
|
modal/client.py,sha256=8SQawr7P1PNUCq1UmJMUQXG2jIo4Nmdcs311XqrNLRE,15276
|
25
|
-
modal/client.pyi,sha256=
|
25
|
+
modal/client.pyi,sha256=xVoVroImdvh3pohKOh0qBjFn2hu1f-gfjk9qF8xdMa8,7593
|
26
26
|
modal/cloud_bucket_mount.py,sha256=YOe9nnvSr4ZbeCn587d7_VhE9IioZYRvF9VYQTQux08,5914
|
27
27
|
modal/cloud_bucket_mount.pyi,sha256=30T3K1a89l6wzmEJ_J9iWv9SknoGqaZDx59Xs-ZQcmk,1607
|
28
28
|
modal/cls.py,sha256=5DjpSBP1IyROKZm5ItDiEGdbRnfTT6K1Ul0jEvEKw_Q,31695
|
@@ -83,14 +83,14 @@ modal/token_flow.pyi,sha256=0XV3d-9CGQL3qjPdw3RgwIFVqqxo8Z-u044_mkgAM3o,2064
|
|
83
83
|
modal/volume.py,sha256=JAWeDvoAG95tMBv-fYIERyHsJPS_X_xGpxRRmYtb6j0,30096
|
84
84
|
modal/volume.pyi,sha256=kTsXarphjZILXci84LQy7EyC84eXUs5-7D62IM5q3eE,12491
|
85
85
|
modal/_runtime/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
|
86
|
-
modal/_runtime/asgi.py,sha256=
|
86
|
+
modal/_runtime/asgi.py,sha256=vmbrREjdCnxAeUyoUd1vtv7PfcR86IR0R2Jp1J6rEok,22435
|
87
87
|
modal/_runtime/container_io_manager.py,sha256=3VPj0RWtSdvVZD96l5ZpO8MjhLRjAi_P_ZtpNK3nGn0,43593
|
88
88
|
modal/_runtime/container_io_manager.pyi,sha256=sEGpOvlDOQCwUiJn4CAyE8TT2lCBKNBEqGWExfvVKsY,16661
|
89
89
|
modal/_runtime/execution_context.py,sha256=E6ofm6j1POXGPxS841X3V7JU6NheVb8OkQc7JpLq4Kg,2712
|
90
90
|
modal/_runtime/execution_context.pyi,sha256=wQZwMNADExkeNdB9yKX0PPojovxlFHbap3441wAsiMY,634
|
91
91
|
modal/_runtime/gpu_memory_snapshot.py,sha256=tA3m1d1cwnmHpvpCeN_WijDd6n8byn7LWlpicbIxiOI,3144
|
92
92
|
modal/_runtime/telemetry.py,sha256=T1RoAGyjBDr1swiM6pPsGRSITm7LI5FDK18oNXxY08U,5163
|
93
|
-
modal/_runtime/user_code_imports.py,sha256=
|
93
|
+
modal/_runtime/user_code_imports.py,sha256=OTxf5BIwMOaHFplIxxyEAOsR-xM2f5kSiSOa9Ne2le0,14814
|
94
94
|
modal/_utils/__init__.py,sha256=waLjl5c6IPDhSsdWAm9Bji4e2PVxamYABKAze6CHVXY,28
|
95
95
|
modal/_utils/app_utils.py,sha256=88BT4TPLWfYAQwKTHcyzNQRHg8n9B-QE2UyJs96iV-0,108
|
96
96
|
modal/_utils/async_utils.py,sha256=5PdDuI1aSwPOI4a3dIvW0DkPqGw6KZN6RtWE18Dzv1E,25079
|
@@ -168,10 +168,10 @@ modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0y
|
|
168
168
|
modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
169
169
|
modal_version/__init__.py,sha256=wiJQ53c-OMs0Xf1UeXOxQ7FwlV1VzIjnX6o-pRYZ_Pk,470
|
170
170
|
modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
|
171
|
-
modal_version/_version_generated.py,sha256=
|
172
|
-
modal-0.73.
|
173
|
-
modal-0.73.
|
174
|
-
modal-0.73.
|
175
|
-
modal-0.73.
|
176
|
-
modal-0.73.
|
177
|
-
modal-0.73.
|
171
|
+
modal_version/_version_generated.py,sha256=2JXiJjSM7MVzAWZxaPmjBYqi4zhdY50wgeDyReGybkU,149
|
172
|
+
modal-0.73.89.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
|
173
|
+
modal-0.73.89.dist-info/METADATA,sha256=o5-DlAWrr4s1GtwRV86zKRtHHs9TtiNzYetSM8FIEQs,2452
|
174
|
+
modal-0.73.89.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
175
|
+
modal-0.73.89.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
|
176
|
+
modal-0.73.89.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
|
177
|
+
modal-0.73.89.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|