llama-deploy-appserver 0.3.0a2__tar.gz → 0.3.0a4__tar.gz

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.
Files changed (17) hide show
  1. {llama_deploy_appserver-0.3.0a2 → llama_deploy_appserver-0.3.0a4}/PKG-INFO +2 -2
  2. {llama_deploy_appserver-0.3.0a2 → llama_deploy_appserver-0.3.0a4}/pyproject.toml +2 -2
  3. {llama_deploy_appserver-0.3.0a2 → llama_deploy_appserver-0.3.0a4}/src/llama_deploy/appserver/app.py +2 -0
  4. {llama_deploy_appserver-0.3.0a2 → llama_deploy_appserver-0.3.0a4}/src/llama_deploy/appserver/bootstrap.py +6 -1
  5. {llama_deploy_appserver-0.3.0a2 → llama_deploy_appserver-0.3.0a4}/src/llama_deploy/appserver/workflow_loader.py +9 -12
  6. {llama_deploy_appserver-0.3.0a2 → llama_deploy_appserver-0.3.0a4}/README.md +0 -0
  7. {llama_deploy_appserver-0.3.0a2 → llama_deploy_appserver-0.3.0a4}/src/llama_deploy/appserver/__init__.py +0 -0
  8. {llama_deploy_appserver-0.3.0a2 → llama_deploy_appserver-0.3.0a4}/src/llama_deploy/appserver/__main__.py +0 -0
  9. {llama_deploy_appserver-0.3.0a2 → llama_deploy_appserver-0.3.0a4}/src/llama_deploy/appserver/deployment.py +0 -0
  10. {llama_deploy_appserver-0.3.0a2 → llama_deploy_appserver-0.3.0a4}/src/llama_deploy/appserver/deployment_config_parser.py +0 -0
  11. {llama_deploy_appserver-0.3.0a2 → llama_deploy_appserver-0.3.0a4}/src/llama_deploy/appserver/routers/__init__.py +0 -0
  12. {llama_deploy_appserver-0.3.0a2 → llama_deploy_appserver-0.3.0a4}/src/llama_deploy/appserver/routers/deployments.py +0 -0
  13. {llama_deploy_appserver-0.3.0a2 → llama_deploy_appserver-0.3.0a4}/src/llama_deploy/appserver/routers/status.py +0 -0
  14. {llama_deploy_appserver-0.3.0a2 → llama_deploy_appserver-0.3.0a4}/src/llama_deploy/appserver/routers/ui_proxy.py +0 -0
  15. {llama_deploy_appserver-0.3.0a2 → llama_deploy_appserver-0.3.0a4}/src/llama_deploy/appserver/settings.py +0 -0
  16. {llama_deploy_appserver-0.3.0a2 → llama_deploy_appserver-0.3.0a4}/src/llama_deploy/appserver/stats.py +0 -0
  17. {llama_deploy_appserver-0.3.0a2 → llama_deploy_appserver-0.3.0a4}/src/llama_deploy/appserver/types.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: llama-deploy-appserver
3
- Version: 0.3.0a2
3
+ Version: 0.3.0a4
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.0a2,<0.4.0
13
+ Requires-Dist: llama-deploy-core>=0.3.0a4,<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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "llama-deploy-appserver"
3
- version = "0.3.0a2"
3
+ version = "0.3.0a4"
4
4
  description = "Application server components for LlamaDeploy"
5
5
  readme = "README.md"
6
6
  license = { text = "MIT" }
@@ -14,7 +14,7 @@ dependencies = [
14
14
  "uvicorn>=0.24.0",
15
15
  "fastapi>=0.100.0",
16
16
  "websockets>=12.0",
17
- "llama-deploy-core>=0.3.0a2,<0.4.0",
17
+ "llama-deploy-core>=0.3.0a4,<0.4.0",
18
18
  "httpx>=0.28.1",
19
19
  "prometheus-fastapi-instrumentator>=7.1.0",
20
20
  ]
@@ -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 build_ui, do_install
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,14 @@ 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
- env_vars = {**service_config.env}
164
- for env_file in service_config.env_files or []:
165
- env_file_path = source_root / env_file
166
- env_vars.update(**dotenv_values(env_file_path))
167
- for key, value in env_vars.items():
168
- if value:
169
- os.environ[key] = value
162
+ env_vars = {**service_config.env} if service_config.env else {}
163
+ for env_file in service_config.env_files or []:
164
+ env_file_path = source_root / env_file
165
+ values = dotenv_values(env_file_path)
166
+ env_vars.update(**values)
167
+ for key, value in env_vars.items():
168
+ if value:
169
+ os.environ[key] = value
170
170
 
171
171
 
172
172
  def install_python_dependencies(config: DeploymentConfig, source_root: Path) -> None:
@@ -175,7 +175,7 @@ def install_python_dependencies(config: DeploymentConfig, source_root: Path) ->
175
175
  """
176
176
  path = _find_install_target(source_root, config)
177
177
  if path is not None:
178
- print(f"Installing python dependencies from {path}")
178
+ logger.info(f"Installing python dependencies from {path}")
179
179
  _ensure_uv_available()
180
180
  _install_to_current_python(path, source_root)
181
181
 
@@ -240,9 +240,6 @@ def _install_to_current_python(path: str, source_root: Path) -> None:
240
240
  python_bin_path = os.path.dirname(sys.executable)
241
241
  python_parent_dir = os.path.dirname(python_bin_path)
242
242
  _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
243
  try:
247
244
  _run_with_prefix(
248
245
  [