llamactl 0.3.1__py3-none-any.whl → 0.3.3__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.
@@ -1,3 +1,5 @@
1
+ import warnings
2
+
1
3
  from llama_deploy.cli.commands.auth import auth
2
4
  from llama_deploy.cli.commands.deployment import deployments
3
5
  from llama_deploy.cli.commands.env import env_group
@@ -6,6 +8,14 @@ from llama_deploy.cli.commands.serve import serve
6
8
 
7
9
  from .app import app
8
10
 
11
+ # Disable warnings in llamactl CLI, and specifically silence the Pydantic
12
+ # UnsupportedFieldAttributeWarning about `validate_default` on Field().
13
+ warnings.simplefilter("ignore")
14
+ warnings.filterwarnings(
15
+ "ignore",
16
+ message=r"The 'validate_default' attribute .* has no effect.*",
17
+ )
18
+
9
19
 
10
20
  # Main entry point function (called by the script)
11
21
  def main() -> None:
@@ -15,94 +15,6 @@ from llama_deploy.cli.app import app
15
15
  from llama_deploy.cli.options import global_options
16
16
  from llama_deploy.cli.styles import HEADER_COLOR_HEX
17
17
  from rich import print as rprint
18
- from vibe_llama.scaffold import create_scaffold
19
- from vibe_llama.scaffold.scaffold import ProjectName
20
- from vibe_llama.sdk import VibeLlamaStarter
21
-
22
-
23
- @dataclass
24
- class TemplateOption:
25
- id: str
26
- name: str
27
- description: str
28
- source: VibeLlamaTemplate | GithubTemplateRepo
29
- llama_cloud: bool
30
-
31
-
32
- @dataclass
33
- class VibeLlamaTemplate:
34
- name: ProjectName
35
-
36
-
37
- @dataclass
38
- class GithubTemplateRepo:
39
- url: str
40
-
41
-
42
- ui_options = [
43
- TemplateOption(
44
- id="basic-ui",
45
- name="Basic UI",
46
- description="A basic starter workflow with a React Vite UI",
47
- source=GithubTemplateRepo(
48
- url="https://github.com/run-llama/template-workflow-basic-ui"
49
- ),
50
- llama_cloud=False,
51
- ),
52
- TemplateOption(
53
- id="extraction-review",
54
- name="Extraction Agent with Review UI",
55
- description="Extract data from documents using a custom schema and Llama Cloud. Includes a UI to review and correct the results",
56
- source=GithubTemplateRepo(
57
- url="https://github.com/run-llama/template-workflow-data-extraction"
58
- ),
59
- llama_cloud=True,
60
- ),
61
- ]
62
- headless_options = [
63
- TemplateOption(
64
- id="basic",
65
- name="Basic Workflow",
66
- description="A base example that showcases usage patterns for workflows",
67
- source=VibeLlamaTemplate(name="basic"),
68
- llama_cloud=False,
69
- ),
70
- TemplateOption(
71
- id="document_parsing",
72
- name="Document Parser",
73
- description="A workflow that, using LlamaParse, parses unstructured documents and returns their raw text content",
74
- source=VibeLlamaTemplate(name="document_parsing"),
75
- llama_cloud=True,
76
- ),
77
- TemplateOption(
78
- id="human_in_the_loop",
79
- name="Human in the Loop",
80
- description="A workflow showcasing how to use human in the loop with LlamaIndex workflows",
81
- source=VibeLlamaTemplate(name="human_in_the_loop"),
82
- llama_cloud=False,
83
- ),
84
- TemplateOption(
85
- id="invoice_extraction",
86
- name="Invoice Extraction",
87
- description="A workflow that, given an invoice, extracts several key details using LlamaExtract",
88
- source=VibeLlamaTemplate(name="invoice_extraction"),
89
- llama_cloud=True,
90
- ),
91
- TemplateOption(
92
- id="rag",
93
- name="RAG",
94
- description="A workflow that embeds, indexes and queries your documents on the fly, providing you with a simple RAG pipeline",
95
- source=VibeLlamaTemplate(name="rag"),
96
- llama_cloud=False,
97
- ),
98
- TemplateOption(
99
- id="web_scraping",
100
- name="Web Scraping",
101
- description="A workflow that, given several urls, scrapes and summarizes their content using Google's Gemini API",
102
- source=VibeLlamaTemplate(name="web_scraping"),
103
- llama_cloud=False,
104
- ),
105
- ]
106
18
 
107
19
 
108
20
  @app.command()
@@ -113,7 +25,6 @@ headless_options = [
113
25
  )
114
26
  @click.option(
115
27
  "--template",
116
- type=click.Choice([o.id for o in ui_options]),
117
28
  help="The template to use for the new app",
118
29
  )
119
30
  @click.option(
@@ -143,6 +54,93 @@ def init(
143
54
 
144
55
 
145
56
  def _create(template: str | None, dir: Path | None, force: bool) -> None:
57
+ # defer loading to improve cli startup time
58
+ from vibe_llama.scaffold import create_scaffold
59
+ from vibe_llama.scaffold.scaffold import ProjectName
60
+ from vibe_llama.sdk import VibeLlamaStarter
61
+
62
+ @dataclass
63
+ class TemplateOption:
64
+ id: str
65
+ name: str
66
+ description: str
67
+ source: VibeLlamaTemplate | GithubTemplateRepo
68
+ llama_cloud: bool
69
+
70
+ @dataclass
71
+ class VibeLlamaTemplate:
72
+ name: ProjectName
73
+
74
+ @dataclass
75
+ class GithubTemplateRepo:
76
+ url: str
77
+
78
+ ui_options = [
79
+ TemplateOption(
80
+ id="basic-ui",
81
+ name="Basic UI",
82
+ description="A basic starter workflow with a React Vite UI",
83
+ source=GithubTemplateRepo(
84
+ url="https://github.com/run-llama/template-workflow-basic-ui"
85
+ ),
86
+ llama_cloud=False,
87
+ ),
88
+ TemplateOption(
89
+ id="extraction-review",
90
+ name="Extraction Agent with Review UI",
91
+ description="Extract data from documents using a custom schema and Llama Cloud. Includes a UI to review and correct the results",
92
+ source=GithubTemplateRepo(
93
+ url="https://github.com/run-llama/template-workflow-data-extraction"
94
+ ),
95
+ llama_cloud=True,
96
+ ),
97
+ ]
98
+
99
+ headless_options = [
100
+ TemplateOption(
101
+ id="basic",
102
+ name="Basic Workflow",
103
+ description="A base example that showcases usage patterns for workflows",
104
+ source=VibeLlamaTemplate(name="basic"),
105
+ llama_cloud=False,
106
+ ),
107
+ TemplateOption(
108
+ id="document_parsing",
109
+ name="Document Parser",
110
+ description="A workflow that, using LlamaParse, parses unstructured documents and returns their raw text content",
111
+ source=VibeLlamaTemplate(name="document_parsing"),
112
+ llama_cloud=True,
113
+ ),
114
+ TemplateOption(
115
+ id="human_in_the_loop",
116
+ name="Human in the Loop",
117
+ description="A workflow showcasing how to use human in the loop with LlamaIndex workflows",
118
+ source=VibeLlamaTemplate(name="human_in_the_loop"),
119
+ llama_cloud=False,
120
+ ),
121
+ TemplateOption(
122
+ id="invoice_extraction",
123
+ name="Invoice Extraction",
124
+ description="A workflow that, given an invoice, extracts several key details using LlamaExtract",
125
+ source=VibeLlamaTemplate(name="invoice_extraction"),
126
+ llama_cloud=True,
127
+ ),
128
+ TemplateOption(
129
+ id="rag",
130
+ name="RAG",
131
+ description="A workflow that embeds, indexes and queries your documents on the fly, providing you with a simple RAG pipeline",
132
+ source=VibeLlamaTemplate(name="rag"),
133
+ llama_cloud=False,
134
+ ),
135
+ TemplateOption(
136
+ id="web_scraping",
137
+ name="Web Scraping",
138
+ description="A workflow that, given several urls, scrapes and summarizes their content using Google's Gemini API",
139
+ source=VibeLlamaTemplate(name="web_scraping"),
140
+ llama_cloud=False,
141
+ ),
142
+ ]
143
+
146
144
  if template is None:
147
145
  rprint(
148
146
  "[bold]Select a template to start from.[/bold] Either with javascript frontend UI, or just a python workflow that can be used as an API."
@@ -217,6 +215,7 @@ def _create(template: str | None, dir: Path | None, force: bool) -> None:
217
215
 
218
216
  try:
219
217
  # Dump in a bunch of docs for AI agents
218
+
220
219
  vibe_llama_starter = VibeLlamaStarter(
221
220
  agents=["OpenAI Codex CLI"], # AGENTS.md, supported by Cursor,
222
221
  services=["LlamaIndex", "llama-index-workflows"]
@@ -5,12 +5,6 @@ from typing import Literal
5
5
 
6
6
  import click
7
7
  import questionary
8
- from llama_deploy.appserver.app import (
9
- prepare_server,
10
- start_server_in_target_venv,
11
- )
12
- from llama_deploy.appserver.deployment_config_parser import get_deployment_config
13
- from llama_deploy.appserver.workflow_loader import parse_environment_variables
14
8
  from llama_deploy.cli.commands.auth import validate_authenticated_profile
15
9
  from llama_deploy.cli.config.env_service import service
16
10
  from llama_deploy.cli.config.schema import Auth
@@ -99,6 +93,15 @@ def serve(
99
93
  deployment_file, interactive, require_cloud=persistence == "cloud"
100
94
  )
101
95
 
96
+ # Defer heavy appserver imports until the `serve` command is actually invoked
97
+ from llama_deploy.appserver.app import (
98
+ prepare_server,
99
+ start_server_in_target_venv,
100
+ )
101
+ from llama_deploy.appserver.deployment_config_parser import (
102
+ get_deployment_config,
103
+ )
104
+
102
105
  prepare_server(
103
106
  deployment_file=deployment_file,
104
107
  install=not no_install,
@@ -192,6 +195,9 @@ def _maybe_inject_llama_cloud_credentials(
192
195
  if not config.llama_cloud and not require_cloud:
193
196
  return
194
197
 
198
+ # Import lazily to avoid loading appserver dependencies on general CLI startup
199
+ from llama_deploy.appserver.workflow_loader import parse_environment_variables
200
+
195
201
  vars = parse_environment_variables(
196
202
  config, deployment_file.parent if deployment_file.is_file() else deployment_file
197
203
  )
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: llamactl
3
- Version: 0.3.1
3
+ Version: 0.3.3
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.1,<0.4.0
9
- Requires-Dist: llama-deploy-appserver>=0.3.1,<0.4.0
8
+ Requires-Dist: llama-deploy-core[client]>=0.3.3,<0.4.0
9
+ Requires-Dist: llama-deploy-appserver>=0.3.3,<0.4.0
10
10
  Requires-Dist: httpx>=0.24.0,<1.0.0
11
11
  Requires-Dist: rich>=13.0.0
12
12
  Requires-Dist: questionary>=2.0.0
@@ -1,4 +1,4 @@
1
- llama_deploy/cli/__init__.py,sha256=df028686233c4d5a3e244bb50c1c7b84cf2399ae03abe45eb4d01e53caa1be38,476
1
+ llama_deploy/cli/__init__.py,sha256=116170a773d7377f2e61bc8b006999d463af24027867be54ff9b20132970490f,781
2
2
  llama_deploy/cli/app.py,sha256=9170e4f506c482522bd745eb1cdb700a198cfcfd7204c168c94e5ee2b6b43ffa,2199
3
3
  llama_deploy/cli/auth/client.py,sha256=0673e2fdc71e8cf1f6d79a64e39596e608dc0257b7dddfebcc38e13e1545a2a8,11670
4
4
  llama_deploy/cli/client.py,sha256=f4053b5183224cff55c1393e78887d1af2597219135379a851b742c676adc154,1727
@@ -6,8 +6,8 @@ llama_deploy/cli/commands/aliased_group.py,sha256=bc41007c97b7b93981217dbd4d4591
6
6
  llama_deploy/cli/commands/auth.py,sha256=1381eee494c3a0c73253322b4a54af1a857d5b89e5f1685b8afa3422eecc5607,23937
7
7
  llama_deploy/cli/commands/deployment.py,sha256=46339e09135521c46ff90235ccf765c37b1a161cec11d92e92a54ceac6528b01,9883
8
8
  llama_deploy/cli/commands/env.py,sha256=36cb1b0abb9e3d1c5546d3e8a3c4c7839c4d6c2abf75763e39efb08376b3eae9,6808
9
- llama_deploy/cli/commands/init.py,sha256=46f9fcdc43880edbd2f244b4c80d5cc5d387a6f8d7407c182f5995c46e41c851,10153
10
- llama_deploy/cli/commands/serve.py,sha256=309b416bfc0b527cd8c8e041beb36b64e78342545f767af7fde3bc55dbbce961,8448
9
+ llama_deploy/cli/commands/init.py,sha256=20b56cf8f8b1e11e005479b5d4349cb1a82f4a51a740f9cd2fdea5eed1542f77,10469
10
+ llama_deploy/cli/commands/serve.py,sha256=985a8c7c27caf46878841de4452aff05b69b13c669227337665431e0d48f5fbc,8688
11
11
  llama_deploy/cli/config/_config.py,sha256=654a4b6d06542e3503edab7023fc1c3148de510b3e3f6194e28cd4bd3e7c029a,14230
12
12
  llama_deploy/cli/config/_migrations.py,sha256=37055641970e1ea41abc583f270dc8a9dab03076224a02cd5fb08bbab2b9259f,2333
13
13
  llama_deploy/cli/config/auth_service.py,sha256=8a61110e18c752bbec5fbca23cd5d35d4ec232a4371f8c8291ba07ad83d30c6c,5208
@@ -32,7 +32,7 @@ llama_deploy/cli/textual/llama_loader.py,sha256=33cb32a46dd40bcf889c553e44f2672c
32
32
  llama_deploy/cli/textual/secrets_form.py,sha256=df6699de29d2bc2cbcaddd41ad2495ce0e622cdccaadbc8369a6ee09a9e79d34,7251
33
33
  llama_deploy/cli/textual/styles.tcss,sha256=c8fa0eec00a97fa6907d223faaad82c6add1ea3f60009f1630be19282ea77e3b,3271
34
34
  llama_deploy/cli/utils/env_inject.py,sha256=01911758bcc3cf22aad0db0d1ade56aece48d6ad6bdb7186ea213337c67f5a89,688
35
- llamactl-0.3.1.dist-info/WHEEL,sha256=66530aef82d5020ef5af27ae0123c71abb9261377c5bc519376c671346b12918,79
36
- llamactl-0.3.1.dist-info/entry_points.txt,sha256=b67e1eb64305058751a651a80f2d2268b5f7046732268421e796f64d4697f83c,52
37
- llamactl-0.3.1.dist-info/METADATA,sha256=8a8a0bb68027dbf17bbeb5807ecc5a2035d091367c6112599f055953f79a77f6,3252
38
- llamactl-0.3.1.dist-info/RECORD,,
35
+ llamactl-0.3.3.dist-info/WHEEL,sha256=66530aef82d5020ef5af27ae0123c71abb9261377c5bc519376c671346b12918,79
36
+ llamactl-0.3.3.dist-info/entry_points.txt,sha256=b67e1eb64305058751a651a80f2d2268b5f7046732268421e796f64d4697f83c,52
37
+ llamactl-0.3.3.dist-info/METADATA,sha256=0fc8f6c9b128c8e2f0809ce9d28d9de09210641259d49720ce7bf263123ec58f,3252
38
+ llamactl-0.3.3.dist-info/RECORD,,