llamactl 0.3.27__py3-none-any.whl → 0.4.1__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.
@@ -15,7 +15,7 @@ from typing import (
15
15
  import httpx
16
16
  import jwt
17
17
  from cryptography.hazmat.primitives.asymmetric.rsa import RSAPublicKey
18
- from jwt.algorithms import RSAAlgorithm # type: ignore[possibly-unbound-import]
18
+ from jwt.algorithms import RSAAlgorithm
19
19
  from llama_deploy.cli.config.schema import DeviceOIDC
20
20
  from llama_deploy.core.client.ssl_util import get_httpx_verify_param
21
21
  from pydantic import BaseModel
@@ -48,9 +48,20 @@ dev.add_command(serve_command, name="serve")
48
48
  default=DEFAULT_DEPLOYMENT_FILE_PATH,
49
49
  type=_ClickPath(dir_okay=True, resolve_path=True, path_type=Path),
50
50
  )
51
+ @click.option(
52
+ "--validate-env",
53
+ is_flag=True,
54
+ help=(
55
+ "Validate that required environment variables are set. By default, missing "
56
+ "env vars are filled with placeholder values to allow structural validation "
57
+ "without actual environment variable values."
58
+ ),
59
+ )
51
60
  @interactive_option
52
61
  @global_options
53
- def validate_command(deployment_file: Path, interactive: bool) -> None:
62
+ def validate_command(
63
+ deployment_file: Path, validate_env: bool, interactive: bool
64
+ ) -> None:
54
65
  """Validate workflows defined in the deployment configuration."""
55
66
  config_dir = _ensure_project_layout(
56
67
  deployment_file, command_name="llamactl dev validate"
@@ -60,17 +71,25 @@ def validate_command(deployment_file: Path, interactive: bool) -> None:
60
71
  deployment_file, interactive, require_cloud=False
61
72
  )
62
73
 
74
+ # By default, skip env validation (fill missing with placeholders)
75
+ skip_env_validation = not validate_env
76
+
63
77
  prepare_server(
64
78
  deployment_file=deployment_file,
65
79
  install=True,
66
80
  build=False,
67
81
  install_ui_deps=False,
82
+ skip_env_validation=skip_env_validation,
68
83
  )
69
84
 
70
85
  # Delegate venv-targeted invocation to the appserver helper (mirrors start_server_in_target_venv)
71
86
 
72
87
  try:
73
- start_preflight_in_target_venv(cwd=Path.cwd(), deployment_file=deployment_file)
88
+ start_preflight_in_target_venv(
89
+ cwd=Path.cwd(),
90
+ deployment_file=deployment_file,
91
+ skip_env_validation=skip_env_validation,
92
+ )
74
93
  except subprocess.CalledProcessError as exc:
75
94
  rprint("[red]Workflow validation failed. See errors above.[/red]")
76
95
  raise Exit(exc.returncode)
@@ -168,7 +187,7 @@ def export_json_graph_command(
168
187
  @click.argument("cmd", nargs=-1, type=click.UNPROCESSED)
169
188
  def run_command(
170
189
  deployment_file: Path, no_auth: bool, interactive: bool, cmd: tuple[str, ...]
171
- ) -> None: # type: ignore
190
+ ) -> None:
172
191
  """Execute COMMAND with deployment environment variables applied."""
173
192
  if not cmd:
174
193
  raise click.ClickException(
@@ -240,7 +259,12 @@ def _prepare_environment(
240
259
 
241
260
 
242
261
  def prepare_server(
243
- *, deployment_file: Path, install: bool, build: bool, install_ui_deps: bool
262
+ *,
263
+ deployment_file: Path,
264
+ install: bool,
265
+ build: bool,
266
+ install_ui_deps: bool,
267
+ skip_env_validation: bool = False,
244
268
  ) -> None:
245
269
  """Thin wrapper so tests can monkeypatch `dev.prepare_server` without importing appserver at import time."""
246
270
  from llama_deploy.appserver.app import prepare_server as _prepare_server
@@ -250,16 +274,23 @@ def prepare_server(
250
274
  install=install,
251
275
  build=build,
252
276
  install_ui_deps=install_ui_deps,
277
+ skip_env_validation=skip_env_validation,
253
278
  )
254
279
 
255
280
 
256
- def start_preflight_in_target_venv(*, cwd: Path, deployment_file: Path) -> None:
281
+ def start_preflight_in_target_venv(
282
+ *, cwd: Path, deployment_file: Path, skip_env_validation: bool = False
283
+ ) -> None:
257
284
  """Thin wrapper so tests can monkeypatch `dev.start_preflight_in_target_venv`."""
258
285
  from llama_deploy.appserver.app import (
259
286
  start_preflight_in_target_venv as _start_preflight_in_target_venv,
260
287
  )
261
288
 
262
- _start_preflight_in_target_venv(cwd=cwd, deployment_file=deployment_file)
289
+ _start_preflight_in_target_venv(
290
+ cwd=cwd,
291
+ deployment_file=deployment_file,
292
+ skip_env_validation=skip_env_validation,
293
+ )
263
294
 
264
295
 
265
296
  def start_export_json_graph_in_target_venv(
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: llamactl
3
- Version: 0.3.27
3
+ Version: 0.4.1
4
4
  Summary: A command-line interface for managing LlamaDeploy projects and deployments
5
5
  Author: Adrian Lyjak
6
6
  Author-email: Adrian Lyjak <adrianlyjak@gmail.com>
7
7
  License: MIT
8
- Requires-Dist: llama-deploy-core[client]>=0.3.27,<0.4.0
9
- Requires-Dist: llama-deploy-appserver>=0.3.27,<0.4.0
8
+ Requires-Dist: llama-deploy-core[client]>=0.4.1,<0.5.0
9
+ Requires-Dist: llama-deploy-appserver>=0.4.1,<0.5.0
10
10
  Requires-Dist: vibe-llama-core>=0.1.0
11
11
  Requires-Dist: rich>=13.0.0
12
12
  Requires-Dist: questionary>=2.0.0
@@ -1,11 +1,11 @@
1
1
  llama_deploy/cli/__init__.py,sha256=7c13390f1b6aa0e0970b0e7c661c6ae97e3e6ef266129c0daaa7acc5732388a6,922
2
2
  llama_deploy/cli/app.py,sha256=617baf6ebb61ef26e955612950a9fe17bea20cabeb3119486cf4be3a197e5c79,2243
3
- llama_deploy/cli/auth/client.py,sha256=7da19d45f033037ff753c72adc5a69f646e44c7a054a471251416a6d7b68f36e,12203
3
+ llama_deploy/cli/auth/client.py,sha256=2307bcdcc65e1474cca3ee8f14d3d8ad6cb86d38a2b410bccb72ab95d080cbed,12162
4
4
  llama_deploy/cli/client.py,sha256=61c04ff808374913bf2fc1fc5838c498b4f8c779d4e056f4dfe57526078228e8,1793
5
5
  llama_deploy/cli/commands/aliased_group.py,sha256=364d846d9ceec465e6f2f47051ad06e1ccfbea1d7526654c1ffbd7b7ab7e6af0,1302
6
6
  llama_deploy/cli/commands/auth.py,sha256=c8b94de8c0647e241b0083782b8e241225c0c68ee2d32f85d54c29ae0d7dcb1b,26891
7
7
  llama_deploy/cli/commands/deployment.py,sha256=dc5d039224409708446b91db482c20da648eba720c1527cfdb2952a1bb07ad3e,15567
8
- llama_deploy/cli/commands/dev.py,sha256=10f394bc91ea71c3d1f23d280919482794ddf918e5676e7a3305f49d2a71f646,9436
8
+ llama_deploy/cli/commands/dev.py,sha256=e64877145ddfda02d4723340eb8ea4d00ee6cad72f048accac48b92d5fdf15c3,10216
9
9
  llama_deploy/cli/commands/env.py,sha256=ae8f94eb2651a10615bac37afa16447ad1d78cb78c83ad8b8ae75e878733d323,7478
10
10
  llama_deploy/cli/commands/init.py,sha256=afdb65b5e70cfaf3bdbc923d13db1a31ad23c14605e5bcd55ddaab8fff6e69a4,17514
11
11
  llama_deploy/cli/commands/pkg.py,sha256=f91a87220c1d527e02a183dac5ca52c58608128e29bedf664362af3d2d31c461,4084
@@ -41,7 +41,7 @@ llama_deploy/cli/utils/env_inject.py,sha256=01911758bcc3cf22aad0db0d1ade56aece48
41
41
  llama_deploy/cli/utils/redact.py,sha256=1e768d76b4a6708230c34f7ce8a5a82ab52795bb3d6ab0387071ab4e8d7e7934,863
42
42
  llama_deploy/cli/utils/retry.py,sha256=62ca6f286cb4de38cc5efcef3f376b12c2e6eb9b3e5ebe555d2a60aeb0957c19,1526
43
43
  llama_deploy/cli/utils/version.py,sha256=bf01a6dda948b868cc08c93701ed44cd36b487402404af8451d4c0996a2edb31,364
44
- llamactl-0.3.27.dist-info/WHEEL,sha256=66530aef82d5020ef5af27ae0123c71abb9261377c5bc519376c671346b12918,79
45
- llamactl-0.3.27.dist-info/entry_points.txt,sha256=b67e1eb64305058751a651a80f2d2268b5f7046732268421e796f64d4697f83c,52
46
- llamactl-0.3.27.dist-info/METADATA,sha256=c7f87e2a67c5269f2631fc5ef375e679bc8cb0e42f27c3ef526fb433e47f118f,3329
47
- llamactl-0.3.27.dist-info/RECORD,,
44
+ llamactl-0.4.1.dist-info/WHEEL,sha256=66530aef82d5020ef5af27ae0123c71abb9261377c5bc519376c671346b12918,79
45
+ llamactl-0.4.1.dist-info/entry_points.txt,sha256=b67e1eb64305058751a651a80f2d2268b5f7046732268421e796f64d4697f83c,52
46
+ llamactl-0.4.1.dist-info/METADATA,sha256=2fe513bdce7b62d4c1e70820455e15039bf43dfd8eb1d8f0f067bfabf727da05,3326
47
+ llamactl-0.4.1.dist-info/RECORD,,