llama-deploy-appserver 0.3.0a1__py3-none-any.whl → 0.3.0a3__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.
- llama_deploy/appserver/app.py +2 -0
- llama_deploy/appserver/bootstrap.py +6 -1
- llama_deploy/appserver/workflow_loader.py +11 -12
- {llama_deploy_appserver-0.3.0a1.dist-info → llama_deploy_appserver-0.3.0a3.dist-info}/METADATA +2 -2
- {llama_deploy_appserver-0.3.0a1.dist-info → llama_deploy_appserver-0.3.0a3.dist-info}/RECORD +6 -6
- {llama_deploy_appserver-0.3.0a1.dist-info → llama_deploy_appserver-0.3.0a3.dist-info}/WHEEL +0 -0
llama_deploy/appserver/app.py
CHANGED
@@ -13,6 +13,7 @@ from fastapi.middleware.cors import CORSMiddleware
|
|
13
13
|
from llama_deploy.appserver.workflow_loader import (
|
14
14
|
build_ui,
|
15
15
|
do_install,
|
16
|
+
load_environment_variables,
|
16
17
|
start_dev_ui_process,
|
17
18
|
)
|
18
19
|
import uvicorn
|
@@ -97,6 +98,7 @@ def start_server(
|
|
97
98
|
configure_settings(
|
98
99
|
proxy_ui=proxy_ui, app_root=cwd, deployment_file_path=deployment_file
|
99
100
|
)
|
101
|
+
load_environment_variables(get_deployment_config(), settings.config_parent)
|
100
102
|
if install:
|
101
103
|
do_install()
|
102
104
|
if build:
|
@@ -8,7 +8,11 @@ import os
|
|
8
8
|
from pathlib import Path
|
9
9
|
from llama_deploy.appserver.settings import settings
|
10
10
|
from llama_deploy.appserver.deployment_config_parser import get_deployment_config
|
11
|
-
from llama_deploy.appserver.workflow_loader import
|
11
|
+
from llama_deploy.appserver.workflow_loader import (
|
12
|
+
build_ui,
|
13
|
+
do_install,
|
14
|
+
load_environment_variables,
|
15
|
+
)
|
12
16
|
from llama_deploy.core.git.git_util import (
|
13
17
|
clone_repo,
|
14
18
|
)
|
@@ -47,6 +51,7 @@ def bootstrap_app_from_repo(
|
|
47
51
|
)
|
48
52
|
|
49
53
|
built = True
|
54
|
+
load_environment_variables(get_deployment_config(), Path(target_dir))
|
50
55
|
if build:
|
51
56
|
do_install()
|
52
57
|
built = build_ui(settings.config_parent, get_deployment_config())
|
@@ -159,14 +159,16 @@ def load_environment_variables(config: DeploymentConfig, source_root: Path) -> N
|
|
159
159
|
Load environment variables from the deployment config.
|
160
160
|
"""
|
161
161
|
for service_id, service_config in config.services.items():
|
162
|
-
if service_config.env
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
162
|
+
env_vars = {**service_config.env} if service_config.env else {}
|
163
|
+
for env_file in service_config.env_files or []:
|
164
|
+
print(f"Loading environment variables from {env_file}")
|
165
|
+
env_file_path = source_root / env_file
|
166
|
+
values = dotenv_values(env_file_path)
|
167
|
+
print(f"Loaded environment variables from {env_file_path}: {values}")
|
168
|
+
env_vars.update(**values)
|
169
|
+
for key, value in env_vars.items():
|
170
|
+
if value:
|
171
|
+
os.environ[key] = value
|
170
172
|
|
171
173
|
|
172
174
|
def install_python_dependencies(config: DeploymentConfig, source_root: Path) -> None:
|
@@ -175,7 +177,7 @@ def install_python_dependencies(config: DeploymentConfig, source_root: Path) ->
|
|
175
177
|
"""
|
176
178
|
path = _find_install_target(source_root, config)
|
177
179
|
if path is not None:
|
178
|
-
|
180
|
+
logger.info(f"Installing python dependencies from {path}")
|
179
181
|
_ensure_uv_available()
|
180
182
|
_install_to_current_python(path, source_root)
|
181
183
|
|
@@ -240,9 +242,6 @@ def _install_to_current_python(path: str, source_root: Path) -> None:
|
|
240
242
|
python_bin_path = os.path.dirname(sys.executable)
|
241
243
|
python_parent_dir = os.path.dirname(python_bin_path)
|
242
244
|
_validate_path_is_safe(path, source_root, "python_dependencies")
|
243
|
-
print(
|
244
|
-
f"Installing python dependencies from {path} to {python_parent_dir} to {source_root}"
|
245
|
-
)
|
246
245
|
try:
|
247
246
|
_run_with_prefix(
|
248
247
|
[
|
{llama_deploy_appserver-0.3.0a1.dist-info → llama_deploy_appserver-0.3.0a3.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: llama-deploy-appserver
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.0a3
|
4
4
|
Summary: Application server components for LlamaDeploy
|
5
5
|
Author: Massimiliano Pippi
|
6
6
|
Author-email: Massimiliano Pippi <mpippi@gmail.com>
|
@@ -10,7 +10,7 @@ Requires-Dist: pydantic-settings>=2.10.1
|
|
10
10
|
Requires-Dist: uvicorn>=0.24.0
|
11
11
|
Requires-Dist: fastapi>=0.100.0
|
12
12
|
Requires-Dist: websockets>=12.0
|
13
|
-
Requires-Dist: llama-deploy-core>=0.3.
|
13
|
+
Requires-Dist: llama-deploy-core>=0.3.0a3,<0.4.0
|
14
14
|
Requires-Dist: httpx>=0.28.1
|
15
15
|
Requires-Dist: prometheus-fastapi-instrumentator>=7.1.0
|
16
16
|
Requires-Python: >=3.12, <4
|
{llama_deploy_appserver-0.3.0a1.dist-info → llama_deploy_appserver-0.3.0a3.dist-info}/RECORD
RENAMED
@@ -1,7 +1,7 @@
|
|
1
1
|
llama_deploy/appserver/__init__.py,sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855,0
|
2
2
|
llama_deploy/appserver/__main__.py,sha256=32eff329cadb4f883c9df3a1b2bcb908d5adde765e7c7e761d25b7df4827b9ca,196
|
3
|
-
llama_deploy/appserver/app.py,sha256=
|
4
|
-
llama_deploy/appserver/bootstrap.py,sha256=
|
3
|
+
llama_deploy/appserver/app.py,sha256=b426223a4f1a7077c3705e818938ecd7696fa8cc625304f1ae6fe1a687195311,3710
|
4
|
+
llama_deploy/appserver/bootstrap.py,sha256=e98e58ff38c44eb68ecf2ea3644d8376111d0e18e650589d6aef29e4caef1e15,3107
|
5
5
|
llama_deploy/appserver/deployment.py,sha256=bd35b20e0068c44965e0b76126170a292c151665417a0b322b977641ce88bfc1,2671
|
6
6
|
llama_deploy/appserver/deployment_config_parser.py,sha256=27b3f20b95703293059182e6ef2a5a44b59c66ae73517eba9f53b62cd5b0f833,3395
|
7
7
|
llama_deploy/appserver/routers/__init__.py,sha256=ed8fa7613eb5584bcc1b40e18a40a0e29ce39cc9c8d4bf9ad8c79e5b1d050700,214
|
@@ -11,7 +11,7 @@ llama_deploy/appserver/routers/ui_proxy.py,sha256=9bf7e433e387bb3aa3c6fabee09313
|
|
11
11
|
llama_deploy/appserver/settings.py,sha256=741b2ac12f37ea4bd7da4fbac4170ca7719095f123ff7a451ae8be36a530b4a6,2820
|
12
12
|
llama_deploy/appserver/stats.py,sha256=1f3989f6705a6de3e4d61ee8cdd189fbe04a2c53ec5e720b2e5168acc331427f,691
|
13
13
|
llama_deploy/appserver/types.py,sha256=4edc991aafb6b8497f068d12387455df292da3ff8440223637641ab1632553ec,2133
|
14
|
-
llama_deploy/appserver/workflow_loader.py,sha256=
|
15
|
-
llama_deploy_appserver-0.3.
|
16
|
-
llama_deploy_appserver-0.3.
|
17
|
-
llama_deploy_appserver-0.3.
|
14
|
+
llama_deploy/appserver/workflow_loader.py,sha256=6266e195c8d94185be801eb61c7760a80e596e9da622d116753bc4a22da6e1bd,12310
|
15
|
+
llama_deploy_appserver-0.3.0a3.dist-info/WHEEL,sha256=66530aef82d5020ef5af27ae0123c71abb9261377c5bc519376c671346b12918,79
|
16
|
+
llama_deploy_appserver-0.3.0a3.dist-info/METADATA,sha256=719c7d669a00a4127f7a5b9403f297051ba4331828f883a1e8a232145ac3a3b7,746
|
17
|
+
llama_deploy_appserver-0.3.0a3.dist-info/RECORD,,
|
File without changes
|