modAL 1.5.5.dev6__py3-none-any.whl → 1.5.5.dev7__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/_environments.py CHANGED
@@ -120,9 +120,12 @@ class _EnvironmentRolesManager:
120
120
  """mdmd:hidden"""
121
121
  self._environment = environment
122
122
 
123
- async def list(self) -> dict[Literal["users", "service_users"], dict[str, str]]:
123
+ async def list(self, *, exclude_default: bool = False) -> dict[Literal["users", "service_users"], dict[str, str]]:
124
124
  """Enumerate the Environment Role for each user and service user in the workspace.
125
125
 
126
+ Args:
127
+ exclude_default: If `True`, only include roles that are directly assigned.
128
+
126
129
  **Examples:**
127
130
 
128
131
  ```python notest
@@ -141,6 +144,8 @@ class _EnvironmentRolesManager:
141
144
  users: dict[str, str] = {}
142
145
  service_users: dict[str, str] = {}
143
146
  for principal in resp.principal_roles:
147
+ if exclude_default and not principal.has_role_assignment:
148
+ continue
144
149
  if principal.user_id:
145
150
  users[principal.user_name] = principal.role_str
146
151
  elif principal.service_user_id:
@@ -256,8 +261,8 @@ class _EnvironmentMembersManager:
256
261
  """Remove the Environment Role of users and service users, reverting them to the default."""
257
262
  deprecation_warning(
258
263
  (2026, 7, 23),
259
- "`Environment.members.remove()` is deprecated. Environment Roles are now explicit; "
260
- "set a role (e.g. 'no-access') with `Environment.roles.update()` instead.",
264
+ "`Environment.members.remove()` is deprecated; assign a role (e.g. 'no-access') with "
265
+ "`Environment.roles.update()` instead.",
261
266
  )
262
267
  await self._environment.hydrate()
263
268
  users = users or []
modal/_functions.py CHANGED
@@ -1110,6 +1110,7 @@ class _Function(typing.Generic[P, ReturnType, OriginalReturnType], _Object, type
1110
1110
  http_config=http_config,
1111
1111
  is_server=function_definition.is_server,
1112
1112
  routing_region=function_definition.routing_region,
1113
+ is_sessioned=function_definition.is_sessioned,
1113
1114
  )
1114
1115
 
1115
1116
  ranked_functions = []
modal/cli/environment.py CHANGED
@@ -147,8 +147,8 @@ service_user_option = click.option(
147
147
  )
148
148
 
149
149
 
150
- def _render_roles_list(environment: str, json: bool) -> None:
151
- roles = Environment.from_name(environment).roles.list()
150
+ def _render_roles_list(environment: str, json: bool, exclude_default: bool = False) -> None:
151
+ roles = Environment.from_name(environment).roles.list(exclude_default=exclude_default)
152
152
  if json:
153
153
  # Mirror the API output shape: a nested dict keyed by users / service_users.
154
154
  OutputManager.get().print_json(json_mod.dumps(roles))
@@ -200,9 +200,15 @@ environment_cli.add_command(roles_cli)
200
200
 
201
201
  @roles_cli.command("list", help="List the roles of each user and service user in an Environment", no_args_is_help=True)
202
202
  @click.argument("environment")
203
+ @click.option(
204
+ "--exclude-default",
205
+ is_flag=True,
206
+ default=False,
207
+ help="Only list roles that are directly assigned",
208
+ )
203
209
  @click.option("--json", is_flag=True, default=False)
204
- def roles_list(environment: str, json: bool = False):
205
- _render_roles_list(environment, json)
210
+ def roles_list(environment: str, json: bool = False, exclude_default: bool = False):
211
+ _render_roles_list(environment, json, exclude_default=exclude_default)
206
212
 
207
213
 
208
214
  @roles_cli.command("update", help="Update a user's or service user's role in an Environment", no_args_is_help=True)
@@ -258,7 +264,7 @@ def members_update(environment: str, principal: str, role: str, service_user: bo
258
264
  def members_remove(environment: str, principal: str, service_user: bool = False):
259
265
  deprecation_warning(
260
266
  (2026, 7, 23),
261
- "`modal environment members remove` is deprecated; roles are now explicit — set a role "
267
+ "`modal environment members remove` is deprecated; assign a role "
262
268
  "(e.g. `--role no-access`) with `modal environment roles update` instead.",
263
269
  show_source=False,
264
270
  )
modal/client.pyi CHANGED
@@ -38,7 +38,7 @@ class _Client:
38
38
  server_url: str,
39
39
  client_type: int,
40
40
  credentials: typing.Optional[tuple[str, str]],
41
- version: str = "1.5.5.dev6",
41
+ version: str = "1.5.5.dev7",
42
42
  ):
43
43
  """mdmd:hidden
44
44
  The Modal client object is not intended to be instantiated directly by users.
@@ -209,7 +209,7 @@ class Client:
209
209
  server_url: str,
210
210
  client_type: int,
211
211
  credentials: typing.Optional[tuple[str, str]],
212
- version: str = "1.5.5.dev6",
212
+ version: str = "1.5.5.dev7",
213
213
  ):
214
214
  """mdmd:hidden
215
215
  The Modal client object is not intended to be instantiated directly by users.
modal/environments.pyi CHANGED
@@ -122,9 +122,14 @@ class EnvironmentRolesManager:
122
122
  ...
123
123
 
124
124
  class __list_spec(typing_extensions.Protocol):
125
- def __call__(self, /) -> dict[typing.Literal["users", "service_users"], dict[str, str]]:
125
+ def __call__(
126
+ self, /, *, exclude_default: bool = False
127
+ ) -> dict[typing.Literal["users", "service_users"], dict[str, str]]:
126
128
  """Enumerate the Environment Role for each user and service user in the workspace.
127
129
 
130
+ Args:
131
+ exclude_default: If `True`, only include roles that are directly assigned.
132
+
128
133
  **Examples:**
129
134
 
130
135
  ```python notest
@@ -138,9 +143,14 @@ class EnvironmentRolesManager:
138
143
  """
139
144
  ...
140
145
 
141
- async def aio(self, /) -> dict[typing.Literal["users", "service_users"], dict[str, str]]:
146
+ async def aio(
147
+ self, /, *, exclude_default: bool = False
148
+ ) -> dict[typing.Literal["users", "service_users"], dict[str, str]]:
142
149
  """Enumerate the Environment Role for each user and service user in the workspace.
143
150
 
151
+ Args:
152
+ exclude_default: If `True`, only include roles that are directly assigned.
153
+
144
154
  **Examples:**
145
155
 
146
156
  ```python notest
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 1.5.5.dev6
3
+ Version: 1.5.5.dev7
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License-Expression: Apache-2.0
@@ -4,9 +4,9 @@ modal/_billing.py,sha256=VEa-YKFsuKmRfWW1SPiXGiY84RzTTRvo8ILi0V10R28,3483
4
4
  modal/_clustered_functions.py,sha256=3OcPCcgEI2YRKb4-ApAIsl7_w7-NLpLCineb691pvPA,3504
5
5
  modal/_clustered_functions.pyi,sha256=TvFV1n6bJcSVzRfk3WEfZJYC_bTXBnHt_DorMsaOU2s,1273
6
6
  modal/_container_entrypoint.py,sha256=QQoLeFpBjQ6HX0P1a3Ho2YBJWVKI1Knh_lVAz4R2lUo,22822
7
- modal/_environments.py,sha256=_HyZb-V_MX86vnaPjLzH4Yu7gzTGsyOAYHL39qrDenQ,25405
7
+ modal/_environments.py,sha256=Unx8KcnUy8InQ7TyGHeEQGEdRiTJjtCoimJuppzTL44,25603
8
8
  modal/_function_variants.py,sha256=tKS1zJJCBJcj9_mKn2s5CdEWcvcskr3usaqEHKZddDg,12552
9
- modal/_functions.py,sha256=Qci-v-isCV1SxFebZ1gW9Qp1tdkRShdRvKTprGymWGs,99579
9
+ modal/_functions.py,sha256=zhm_wkbcjv0luuZtCd53iVSc8JidnwEMSx7OKcNznT4,99650
10
10
  modal/_grpc_client.py,sha256=vgCeu1TV6pBkQenHISVE15djX3tzDt_-7IcDIjI6zQw,6968
11
11
  modal/_image.py,sha256=KIIURDEbEq36L6jmt0wbSK7tRMPhSQ1EPaXvJDfJAys,131755
12
12
  modal/_ipython.py,sha256=Bu9fc3hm3xt2O47qLe_d-Mu2jS81LwMsmXNJ1sawBA0,575
@@ -34,7 +34,7 @@ modal/billing.py,sha256=E1-P_P8bJFLp-bTaggYd4BaaViImPB5UdtXiY8VeAZQ,390
34
34
  modal/billing.pyi,sha256=4m7VLYNS8IiJ2I3CJx0awvrOM6BILWRVLfdeqtAYr8M,7189
35
35
  modal/call_graph.py,sha256=XGALIDn1bLchWo_goyX23bcPjzCZcfqKUo8INIfDapo,1775
36
36
  modal/client.py,sha256=p9rlwpHOfWxmUI2ss5er8PFd4CGfvRxqmrqczYR3pjk,16893
37
- modal/client.pyi,sha256=uxDormaz3k_ZtTu9j24biBSP4a7JBbXRiWBjezAnW1I,18037
37
+ modal/client.pyi,sha256=vuK6utBFtKF3UqKQQqRH8qybzXVwGdNuYJChiJcKlEc,18037
38
38
  modal/cloud_bucket_mount.py,sha256=NrdNV9r9aL3QFrlt-Dhtd7_K3f8v1igrHf2FRwgJ1CI,6827
39
39
  modal/cloud_bucket_mount.pyi,sha256=0E8d53pMh2KsFa-rMh_i6LxlzW4cMV8drVmmkPHSqZk,8149
40
40
  modal/cls.py,sha256=TxRxHdY4L6AZ6I16DNPgDryAkGtlFadD-Mm0ovtfN58,41206
@@ -45,7 +45,7 @@ modal/container_process.pyi,sha256=lzMigs10shDgQ3kt-1ajkMFk-JJMHiD7dBJ3Lec7yNw,5
45
45
  modal/dict.py,sha256=Lzf3mo16wkV5tPucbRyjr2XQEoB8tH2-1-9dU6q-pBA,24072
46
46
  modal/dict.pyi,sha256=SPafrdRoStNJFt3YtO2H6PucXfbP-rDPB9zAWgY91sY,38253
47
47
  modal/environments.py,sha256=gKxjaaMS6YzVhl_rHgDqFZy6qlTgBkX9FOTSVVuCvds,1694
48
- modal/environments.pyi,sha256=D840Ll7EBKNSaAO3ce4bnSO45ToayV9dGcb_jJRwC5U,21400
48
+ modal/environments.pyi,sha256=DMoXQhzuiJ46cGq6hO69Z6rg8gPuuBSMhFx32Q4Igrs,21732
49
49
  modal/exception.py,sha256=f00QoreDghcGd2oYVOV90UmRuZTxXcWJDRaqHjZtbyI,11983
50
50
  modal/file_io.py,sha256=GYTa67mrmbTTTBsYQnb51VmwGIo0YY-1qQ3YBhagkmA,21795
51
51
  modal/file_io.pyi,sha256=3181-DS07flFWLf2BKjqCOiWIjieEOolf33wx6fBp5c,15377
@@ -173,7 +173,7 @@ modal/cli/dashboard.py,sha256=v3ME8R77JksAW-mlJnn8PAi1Q6_dIoTxJTJQDsYWy8c,916
173
173
  modal/cli/dict.py,sha256=20KQa1kZu5THlneed-F_2sxcZriY0vYxcfe12XYIkLk,5152
174
174
  modal/cli/endpoint.py,sha256=7e2E-9Q-a30Aj2bYCMXm_zmxtKGtUt0Lg7JVNKHQgRA,14221
175
175
  modal/cli/entry_point.py,sha256=oc7HH7LBl-4tD-0BTJepF6C_mqs7SkPuYZx8Fu2BU_s,5301
176
- modal/cli/environment.py,sha256=GQY8fFoKIbtOgpOVjwwbaiZY2sH-I0HeoYmHbl8AiaA,17934
176
+ modal/cli/environment.py,sha256=KL_ioIFLbfaNCpzM76dd8fbLHFlafRkdEgyqahGOcBo,18170
177
177
  modal/cli/image.py,sha256=mjsMk6BPyRNWIP_XUSejo3k-fKLxjAYLJgjMl-Cp230,7970
178
178
  modal/cli/import_refs.py,sha256=s3OeBuFZJNh0S8EaaEiqUnAPETRTrWdOk-jkO7yRVr4,15506
179
179
  modal/cli/launch.py,sha256=AJCXsRsK77EoJhiUSk6n3m5HAhgLh4AmhdINdwKgGCM,4497
@@ -198,7 +198,7 @@ modal/experimental/flash.py,sha256=HC-GW4FpRXyaVFSBw4yxneS1eLvW5j19rwc16AsqrXQ,3
198
198
  modal/experimental/flash.pyi,sha256=gpN4lDv4na2nVTUOCRxFu52o3-Ed0HrJISLxACUe7Ls,17892
199
199
  modal/experimental/ipython.py,sha256=kJ6o9wkAY_MiSb7paewI7f1MJAeqdi8TX5pBdhr_mUI,2925
200
200
  modal/skills/modal/SKILL.md,sha256=WzLjYJ1utjc_ZOf6qZTPwB6wxxwRYB5PibdvIf_FLy0,5316
201
- modal-1.5.5.dev6.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
201
+ modal-1.5.5.dev7.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
202
202
  modal_docs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
203
203
  modal_docs/gen_cli_docs.py,sha256=9-b8vl2EsLWD9zJqpCK8IUi5h44Bjn3i3rSdedZV4bA,6415
204
204
  modal_docs/gen_cli_docs_main.py,sha256=UPGr7O1DYTIRLwfINe2rbdh89J3cPVTU1OWL-SjxnOQ,198
@@ -211,8 +211,8 @@ modal_docs/mdmd/signatures.py,sha256=OASroKle763Kfumn4Ek4PABJXEGP56JMCTug44QoBx4
211
211
  modal_docs/mdmd/types.py,sha256=tv7fvziPr-MeDzOp4e2pK5h3d1DXTUOO74rPqDoBn6g,736
212
212
  modal_proto/__init__.py,sha256=Hkou4lcD5tArEkW_9v9KZhLY7fl0fA9-O28beKU55pg,396
213
213
  modal_proto/api_grpc.py,sha256=7wDcIntd5Ck6o9lhgLKlwMnNgHEphzoWrWMHlNL-kZc,187364
214
- modal_proto/api_pb2.py,sha256=_m98Um8nd_5KECNBU4G_vg4-YZMeWTRP5QfppEtvZW8,511637
215
- modal_proto/api_pb2.pyi,sha256=bRzWMvQ0oD-31TrFkWXDQZ_CykMiakf3COQhJqkuOXs,705860
214
+ modal_proto/api_pb2.py,sha256=K1EEsyWdDawFppqND_q2UNSpQAIalp5zdY0QMNBT7mw,511719
215
+ modal_proto/api_pb2.pyi,sha256=1KlVXvUlw81oiUSuErnR98TLwyCB_FvHqM8VTPiIPSA,706348
216
216
  modal_proto/api_pb2_grpc.py,sha256=MDqE0UTYh3N-B2yBPCKPmPpSFMpssNNxrlnvOB2QqBQ,401972
217
217
  modal_proto/api_pb2_grpc.pyi,sha256=zaXat4KvdwKmQ8-2C38sSV_yBgGum4fQva4SYry-WtI,94301
218
218
  modal_proto/modal_api_grpc.py,sha256=ywPV7ZtluHEeiHgB_7aDnTcjCDFuDMhXzccZRcJtOKI,29553
@@ -222,10 +222,10 @@ modal_proto/task_command_router_pb2.py,sha256=tZm_pN94vDNVom4WL4T5id3_mxWoia3U1C
222
222
  modal_proto/task_command_router_pb2.pyi,sha256=ojB6XuvvoUEzZUPwGedjTCZtkImdcm1lPJAXzKmfbis,46716
223
223
  modal_proto/task_command_router_pb2_grpc.py,sha256=zuFkJgKcswB2ftjnyEgs70dp61VMA7gK0h0uzR3gYFw,42563
224
224
  modal_proto/task_command_router_pb2_grpc.pyi,sha256=UjAJFqz9DpOFXP04fVm5lB2eAyTtjOg3oKjfWei8yLU,14262
225
- modal_version/__init__.py,sha256=nRDH6HG7BgwEb69FHrbR2xOMM_XBB84WJ4abtTCxTBc,120
225
+ modal_version/__init__.py,sha256=fyZTKF5m_NxG4tcXnx5taZxtZokNu-PGsZ8hG0vjEuE,120
226
226
  modal_version/__main__.py,sha256=nLUbubxKx7GXNzJIkTB7M7_u8080LyLM0IS0rzFkC_c,119
227
- modal-1.5.5.dev6.dist-info/METADATA,sha256=oTCtEUwegsD5k57aBm_yinmMUs-Iwc-aJUZD2nLdCr4,2512
228
- modal-1.5.5.dev6.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
229
- modal-1.5.5.dev6.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
230
- modal-1.5.5.dev6.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
231
- modal-1.5.5.dev6.dist-info/RECORD,,
227
+ modal-1.5.5.dev7.dist-info/METADATA,sha256=rD62t6frRqgGUGvrYtzHemmdiCYMCNkbnHOgJeu3dRk,2512
228
+ modal-1.5.5.dev7.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
229
+ modal-1.5.5.dev7.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
230
+ modal-1.5.5.dev7.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
231
+ modal-1.5.5.dev7.dist-info/RECORD,,