modAL 1.4.4.dev21__py3-none-any.whl → 1.4.4.dev22__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/_server.py CHANGED
@@ -34,9 +34,9 @@ def validate_http_server_config(
34
34
  if not is_server and exit_grace_period is not None and exit_grace_period > 25:
35
35
  raise InvalidError("The `exit_grace_period` argument must not exceed 25 seconds.")
36
36
 
37
- if not proxy_regions:
37
+ if not proxy_regions or not proxy_regions[0]:
38
38
  if is_server:
39
- raise InvalidError("The `routing_regions` argument must be non-empty.")
39
+ raise InvalidError("The `routing_region` argument must be passed.")
40
40
  raise InvalidError("The `proxy_regions` argument must be non-empty.")
41
41
 
42
42
 
@@ -49,7 +49,7 @@ class _Server:
49
49
  Instead, use the [`@app._experimental_server()`](https://modal.com/docs/reference/modal.App#server) decorator.
50
50
 
51
51
  ```python notest
52
- @app._experimental_server(port=8000, routing_regions=["us-east", "us-west"])
52
+ @app._experimental_server(port=8000, routing_region="us-east")
53
53
  class MyServer:
54
54
  @modal.enter()
55
55
  def start_server(self):
modal/app.py CHANGED
@@ -1289,7 +1289,7 @@ class _App:
1289
1289
  port: int = 8000, # Port the HTTP server listens on
1290
1290
  startup_timeout: int = 30, # Maximum startup time in seconds
1291
1291
  exit_grace_period: int = 0, # Grace period for in-flight requests on shutdown
1292
- routing_regions: list[str] = ["us-east"], # Required: Regions to deploy proxy endpoints
1292
+ routing_region: str = "us-east", # Region to route Server requests through
1293
1293
  h2_enabled: bool = False, # Enable HTTP/2
1294
1294
  target_concurrency: int | None = None, # Target concurrency for the server; 0 disables autoscaling
1295
1295
  cloud: str | None = None, # Cloud provider (aws, gcp, oci, auto)
@@ -1331,7 +1331,7 @@ class _App:
1331
1331
  port: Port the HTTP server listens on.
1332
1332
  startup_timeout: Maximum startup time in seconds.
1333
1333
  exit_grace_period: Grace period for in-flight requests on shutdown.
1334
- routing_regions: Regions to deploy proxy endpoints.
1334
+ routing_region: Region to route Server requests through.
1335
1335
  h2_enabled: Enable HTTP/2.
1336
1336
  target_concurrency: Target concurrency for the server; 0 disables autoscaling.
1337
1337
  cloud: Cloud provider (aws, gcp, oci, auto).
@@ -1344,7 +1344,7 @@ class _App:
1344
1344
 
1345
1345
  Examples:
1346
1346
  ```python
1347
- @app._experimental_server(port=8000, routing_regions=["us-east"])
1347
+ @app._experimental_server(port=8000, routing_region="us-east")
1348
1348
  class MyServer:
1349
1349
  @modal.enter()
1350
1350
  def start(self):
@@ -1361,7 +1361,7 @@ class _App:
1361
1361
  # Validate HTTP server config
1362
1362
  validate_http_server_config(
1363
1363
  port=port,
1364
- proxy_regions=routing_regions,
1364
+ proxy_regions=[routing_region],
1365
1365
  startup_timeout=startup_timeout,
1366
1366
  exit_grace_period=exit_grace_period,
1367
1367
  is_server=True,
@@ -1373,7 +1373,7 @@ class _App:
1373
1373
 
1374
1374
  http_config = api_pb2.HTTPConfig(
1375
1375
  port=port,
1376
- proxy_regions=routing_regions,
1376
+ proxy_regions=[routing_region],
1377
1377
  startup_timeout=startup_timeout,
1378
1378
  exit_grace_period=exit_grace_period,
1379
1379
  h2_enabled=h2_enabled,
modal/app.pyi CHANGED
@@ -752,7 +752,7 @@ class _App:
752
752
  port: int = 8000,
753
753
  startup_timeout: int = 30,
754
754
  exit_grace_period: int = 0,
755
- routing_regions: list[str] = ["us-east"],
755
+ routing_region: str = "us-east",
756
756
  h2_enabled: bool = False,
757
757
  target_concurrency: typing.Optional[int] = None,
758
758
  cloud: typing.Optional[str] = None,
@@ -794,7 +794,7 @@ class _App:
794
794
  port: Port the HTTP server listens on.
795
795
  startup_timeout: Maximum startup time in seconds.
796
796
  exit_grace_period: Grace period for in-flight requests on shutdown.
797
- routing_regions: Regions to deploy proxy endpoints.
797
+ routing_region: Region to route Server requests through.
798
798
  h2_enabled: Enable HTTP/2.
799
799
  target_concurrency: Target concurrency for the server; 0 disables autoscaling.
800
800
  cloud: Cloud provider (aws, gcp, oci, auto).
@@ -807,7 +807,7 @@ class _App:
807
807
 
808
808
  Examples:
809
809
  ```python
810
- @app._experimental_server(port=8000, routing_regions=["us-east"])
810
+ @app._experimental_server(port=8000, routing_region="us-east")
811
811
  class MyServer:
812
812
  @modal.enter()
813
813
  def start(self):
@@ -1750,7 +1750,7 @@ class App:
1750
1750
  port: int = 8000,
1751
1751
  startup_timeout: int = 30,
1752
1752
  exit_grace_period: int = 0,
1753
- routing_regions: list[str] = ["us-east"],
1753
+ routing_region: str = "us-east",
1754
1754
  h2_enabled: bool = False,
1755
1755
  target_concurrency: typing.Optional[int] = None,
1756
1756
  cloud: typing.Optional[str] = None,
@@ -1790,7 +1790,7 @@ class App:
1790
1790
  port: Port the HTTP server listens on.
1791
1791
  startup_timeout: Maximum startup time in seconds.
1792
1792
  exit_grace_period: Grace period for in-flight requests on shutdown.
1793
- routing_regions: Regions to deploy proxy endpoints.
1793
+ routing_region: Region to route Server requests through.
1794
1794
  h2_enabled: Enable HTTP/2.
1795
1795
  target_concurrency: Target concurrency for the server; 0 disables autoscaling.
1796
1796
  cloud: Cloud provider (aws, gcp, oci, auto).
@@ -1803,7 +1803,7 @@ class App:
1803
1803
 
1804
1804
  Examples:
1805
1805
  ```python
1806
- @app._experimental_server(port=8000, routing_regions=["us-east"])
1806
+ @app._experimental_server(port=8000, routing_region="us-east")
1807
1807
  class MyServer:
1808
1808
  @modal.enter()
1809
1809
  def start(self):
modal/client.pyi CHANGED
@@ -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.4.4.dev21",
38
+ version: str = "1.4.4.dev22",
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.4.4.dev21",
208
+ version: str = "1.4.4.dev22",
209
209
  ):
210
210
  """mdmd:hidden
211
211
  The Modal client object is not intended to be instantiated directly by users.
modal/functions.pyi CHANGED
@@ -487,7 +487,7 @@ class Function(
487
487
 
488
488
  _call_generator: ___call_generator_spec
489
489
 
490
- class __remote_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER]):
490
+ class __remote_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER]):
491
491
  def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> ReturnType_INNER:
492
492
  """Calls the function remotely, executing it with the given arguments and returning the execution's result.
493
493
 
@@ -512,7 +512,7 @@ class Function(
512
512
  """
513
513
  ...
514
514
 
515
- remote: __remote_spec[modal._functions.ReturnType, modal._functions.P]
515
+ remote: __remote_spec[modal._functions.P, modal._functions.ReturnType]
516
516
 
517
517
  class __remote_gen_spec(typing_extensions.Protocol):
518
518
  def __call__(self, /, *args, **kwargs) -> typing.Generator[typing.Any, None, None]:
@@ -562,7 +562,7 @@ class Function(
562
562
  """
563
563
  ...
564
564
 
565
- class ___experimental_spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER]):
565
+ class ___experimental_spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER]):
566
566
  def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]:
567
567
  """[Experimental] Calls the function with the given arguments, without waiting for the results.
568
568
 
@@ -595,7 +595,7 @@ class Function(
595
595
  """
596
596
  ...
597
597
 
598
- _experimental_spawn: ___experimental_spawn_spec[modal._functions.ReturnType, modal._functions.P]
598
+ _experimental_spawn: ___experimental_spawn_spec[modal._functions.P, modal._functions.ReturnType]
599
599
 
600
600
  class ___spawn_map_inner_spec(typing_extensions.Protocol[P_INNER]):
601
601
  def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> None: ...
@@ -603,7 +603,7 @@ class Function(
603
603
 
604
604
  _spawn_map_inner: ___spawn_map_inner_spec[modal._functions.P]
605
605
 
606
- class __spawn_spec(typing_extensions.Protocol[ReturnType_INNER, P_INNER]):
606
+ class __spawn_spec(typing_extensions.Protocol[P_INNER, ReturnType_INNER]):
607
607
  def __call__(self, /, *args: P_INNER.args, **kwargs: P_INNER.kwargs) -> FunctionCall[ReturnType_INNER]:
608
608
  """Calls the function with the given arguments, without waiting for the results.
609
609
 
@@ -636,7 +636,7 @@ class Function(
636
636
  """
637
637
  ...
638
638
 
639
- spawn: __spawn_spec[modal._functions.ReturnType, modal._functions.P]
639
+ spawn: __spawn_spec[modal._functions.P, modal._functions.ReturnType]
640
640
 
641
641
  def get_raw_f(self) -> collections.abc.Callable[..., typing.Any]:
642
642
  """Return the inner Python object wrapped by this Modal Function.
modal/server.pyi CHANGED
@@ -14,7 +14,7 @@ class Server:
14
14
  Instead, use the [`@app._experimental_server()`](https://modal.com/docs/reference/modal.App#server) decorator.
15
15
 
16
16
  ```python notest
17
- @app._experimental_server(port=8000, routing_regions=["us-east", "us-west"])
17
+ @app._experimental_server(port=8000, routing_region="us-east")
18
18
  class MyServer:
19
19
  @modal.enter()
20
20
  def start_server(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 1.4.4.dev21
3
+ Version: 1.4.4.dev22
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License-Expression: Apache-2.0
@@ -18,19 +18,19 @@ modal/_partial_function.py,sha256=b5_3VdbAiafVMOXPNFSN9gnW1BKUHqqq_1JVxVcuLIk,34
18
18
  modal/_resolver.py,sha256=LLDM_84aaJfBdgMZ_50CpXJtQzTw5CNRkbLDOiLZEZ0,5309
19
19
  modal/_resources.py,sha256=IS6y7CulfLCjESrpdxFGZr23d5iRCLw6-YQVlE3mKQk,1731
20
20
  modal/_serialization.py,sha256=G07UlvH0SPU62twuwgx8MjD49zFX3te-Mg8bwNYfiEU,26594
21
- modal/_server.py,sha256=lnCaXUUxDSlOGqRzhnApL8qW-BDl7qfuMuY3kn7I970,10611
21
+ modal/_server.py,sha256=RqTu7u10bRMCXCcROlYzFoiueiD18tT0jprCK0t8b1c,10617
22
22
  modal/_traceback.py,sha256=472sH68_BsZGRsHW2vikIrmvaU1nT2TYkVvsuIYj_9Q,6231
23
23
  modal/_tunnel.py,sha256=iqx11Okxz052dpejoJYcofXEkSB6u1kPFw5DaGFjS2Q,7351
24
24
  modal/_tunnel.pyi,sha256=WVP0dkoN__mM73ZQ-r3nHKCXvYlRMmEWW8iw2xrSY6M,14698
25
25
  modal/_type_manager.py,sha256=DWjgmjYJuOagw2erin506UUbG2H5UzZCFEekS-7hmfA,9087
26
26
  modal/_watcher.py,sha256=f9kOdHga0TZ6Z6wL7h2O67sz3Oj8pDzjfoAYrNE2hik,3505
27
27
  modal/_workspace.py,sha256=plUkRCHSYj4mfnw3dGtAeSgDHmiyg31vh7Ggw5vodIM,3783
28
- modal/app.py,sha256=ZT2cT_19DaqK9EdPIyuWY1ra31GCF4nAQ8gqOxcSQOY,69889
29
- modal/app.pyi,sha256=gpo6TvGItl2ixOwl_0SuRTU8uDuv-N7foDySyELxDzo,84109
28
+ modal/app.py,sha256=gLvYXc8R9CSjys8BoNLFJn0DiPQMeNOdEDqxv31gsFA,69880
29
+ modal/app.pyi,sha256=Gpxdq9GpLDJVr4WkCrQKNJwhAlmlOAYLzYLbD-fv_c8,84095
30
30
  modal/billing.py,sha256=V2WA_TAp8T3eEe5nE1nqXs9PL-CG-HhNpdr18IzsSMk,304
31
31
  modal/call_graph.py,sha256=k_wH3DuuUHCeuycHsOqlcOpIlIVbCYi9RPobg21hJdI,2550
32
32
  modal/client.py,sha256=KaAbJuglWWm_xR-WMGCPVTXDR56xdzenP9Q1b8Ynry0,16132
33
- modal/client.pyi,sha256=HTXN_y-qgjkTntfTUWoCRxIFXp8S-s8uiTjuGVZAwsI,17854
33
+ modal/client.pyi,sha256=7Vt5C0TpQNUQEf1LFQ4L4zkNcUDbCNq4A_YoezUX-W4,17854
34
34
  modal/cloud_bucket_mount.py,sha256=03gECcV9l2Lnt9k23YrDOTGFW7ajfXMW5O8b1prhtwQ,6254
35
35
  modal/cloud_bucket_mount.pyi,sha256=lMOb44pbNE9kDVEqWfcmvpsnh1sdNNFzuKoVyZZ3d5M,8058
36
36
  modal/cls.py,sha256=wmtUfe0ewkIGK1AhyAnQ9IHTe6XJqcFvL8tCnfIjzZs,40928
@@ -47,7 +47,7 @@ modal/file_io.py,sha256=kfojtm0euzOMhfkVTAGyfuygDJ1XPPHQa5uUhkCsThg,21800
47
47
  modal/file_io.pyi,sha256=Tr0OtfbkTNa8v1dkGtl8l3RH58pMc9uGTYKxL1jNwho,15422
48
48
  modal/file_pattern_matcher.py,sha256=6g_awxudMy_ontBvkznybyeNnwGMj297YrmIHCbREI0,8132
49
49
  modal/functions.py,sha256=EZRcHFfnoYbvawUJnAHF5nIvoo9GX2Djy7mUmOCXmXc,258
50
- modal/functions.pyi,sha256=-Wpk_xRSfS7ct8kdL16YeeQ2KapJwIfgiSKbVBaQL50,47538
50
+ modal/functions.pyi,sha256=eRhBNSKxpLCysUPhgx0Mw060qY4SWlOwAWjfr1awSmo,47538
51
51
  modal/image.py,sha256=c0lUSAoU-Ip3g5DGZ0uhdCzoWSQWh1g0i-7Rxo-Sz-I,160
52
52
  modal/image.pyi,sha256=Whbfmda2YLAyzctLEF9uF4FQ5b1canwLojSksRJ4gx8,59716
53
53
  modal/io_streams.py,sha256=3fhhb7SDJ69pVUu9J3PiMLBePD9bpiIxPN05SCzf8FE,29118
@@ -81,7 +81,7 @@ modal/scheduler_placement.py,sha256=S2-MZQcWCt6NVwIWXUP11KsKZeRDQViJLlOngGUvjkM,
81
81
  modal/secret.py,sha256=ueDG3vjdZI8AZSz0zV6CfeIcSGa5K28Sr2nuImZuezY,19576
82
82
  modal/secret.pyi,sha256=TuAxoDETaPASI_Pv7qHJCVRuEuVlG54JvbDrv_111MQ,27293
83
83
  modal/server.py,sha256=zWoDdtwCEKsKbFfWC4l7-NkpnJJybweC284VIoCavrI,164
84
- modal/server.pyi,sha256=VK1Vioh_xB6ZVnnee9a2IL_bILXg_S8jntyCUEKX1C4,6018
84
+ modal/server.pyi,sha256=8bouPYTKawrvu_9EGedvtl7R6XG-D8MCXrLCY7RqrSM,6004
85
85
  modal/serving.py,sha256=3nAFUMwFpr5WMHavJYloEF-QTr-7XzXTRb5kagp2nrg,4815
86
86
  modal/serving.pyi,sha256=nKgt3i2X93NpAAZzIpbj4fiR1TIJxSXnK659w4UD2sE,3962
87
87
  modal/snapshot.py,sha256=FWtxkChzIn2GBb6xRfpgf0Yx6uzsrDWPkepXxP5fcc0,2545
@@ -187,7 +187,7 @@ modal/experimental/flash.py,sha256=GAJ1c-EGL8M3_loAkqr5gdUfySMHY3U_oc6RywfZ8-0,3
187
187
  modal/experimental/flash.pyi,sha256=lpTqJFZRMGWscw0xpYZVdBMnAYjj16asXE4_64A6itQ,17774
188
188
  modal/experimental/ipython.py,sha256=kJ6o9wkAY_MiSb7paewI7f1MJAeqdi8TX5pBdhr_mUI,2925
189
189
  modal/skills/modal/SKILL.md,sha256=WzLjYJ1utjc_ZOf6qZTPwB6wxxwRYB5PibdvIf_FLy0,5316
190
- modal-1.4.4.dev21.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
190
+ modal-1.4.4.dev22.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
191
191
  modal_docs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
192
192
  modal_docs/gen_cli_docs.py,sha256=zonWwnDnEIIk4sSF05TcXAlVSvji6GDwD2GHUIiw4OM,4028
193
193
  modal_docs/gen_cli_docs_main.py,sha256=UPGr7O1DYTIRLwfINe2rbdh89J3cPVTU1OWL-SjxnOQ,198
@@ -210,10 +210,10 @@ modal_proto/task_command_router_pb2.py,sha256=5KEqPiP-8wfByo0YmwvHTYg1Zmd9d3kToj
210
210
  modal_proto/task_command_router_pb2.pyi,sha256=RwwMMv90wA1AT-_P0HDxfTaBa7bh-OSaXk9A71b-PzM,40167
211
211
  modal_proto/task_command_router_pb2_grpc.py,sha256=368j8b_h19L7bidFTRGSdSG4bK0zU9Y_Oq46_B2ACDg,34666
212
212
  modal_proto/task_command_router_pb2_grpc.pyi,sha256=PbzkCj-uSlN1inYSdhncPQ1-04vhBnj3Wzvb-D2pLHY,11226
213
- modal_version/__init__.py,sha256=-ig0rqboNY-xsvjfLENAGnMPHdburSTHIHXKpx4IZlk,121
213
+ modal_version/__init__.py,sha256=62Ur8pf9zCFlyp-lSaP2-qEVPyH1qAw1VGp_0LkGvkg,121
214
214
  modal_version/__main__.py,sha256=nLUbubxKx7GXNzJIkTB7M7_u8080LyLM0IS0rzFkC_c,119
215
- modal-1.4.4.dev21.dist-info/METADATA,sha256=Y8TqlHTNsPHSRMJ6Ad3_JRt46d0-qCd74pnt7Ty2o7U,2339
216
- modal-1.4.4.dev21.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
217
- modal-1.4.4.dev21.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
218
- modal-1.4.4.dev21.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
219
- modal-1.4.4.dev21.dist-info/RECORD,,
215
+ modal-1.4.4.dev22.dist-info/METADATA,sha256=Bm0fou_tBubMmrX3NSHbK-wcgpojI40ZGHmf6bE2rqQ,2339
216
+ modal-1.4.4.dev22.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
217
+ modal-1.4.4.dev22.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
218
+ modal-1.4.4.dev22.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
219
+ modal-1.4.4.dev22.dist-info/RECORD,,
modal_version/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # Copyright Modal Labs 2026
2
2
  """Supplies the current version of the modal client library."""
3
3
 
4
- __version__ = "1.4.4.dev21"
4
+ __version__ = "1.4.4.dev22"