llama-deploy-core 0.3.10__py3-none-any.whl → 0.3.12__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.
@@ -4,6 +4,7 @@ from contextlib import asynccontextmanager
4
4
  from typing import AsyncIterator, Callable, List
5
5
 
6
6
  import httpx
7
+ from llama_deploy.core.client.ssl_util import get_httpx_verify_param
7
8
  from llama_deploy.core.schema import LogEvent
8
9
  from llama_deploy.core.schema.deployments import (
9
10
  DeploymentCreate,
@@ -30,13 +31,15 @@ class BaseClient:
30
31
  if api_key:
31
32
  headers["Authorization"] = f"Bearer {api_key}"
32
33
 
34
+ verify = get_httpx_verify_param()
33
35
  self.client = httpx.AsyncClient(
34
36
  base_url=self.base_url,
35
37
  headers=headers,
36
38
  auth=auth,
39
+ verify=verify,
37
40
  )
38
41
  self.hookless_client = httpx.AsyncClient(
39
- base_url=self.base_url, headers=headers, auth=auth
42
+ base_url=self.base_url, headers=headers, auth=auth, verify=verify
40
43
  )
41
44
 
42
45
  async def aclose(self) -> None:
@@ -0,0 +1,32 @@
1
+ """Utility functions for SSL/TLS configuration with optional truststore support."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import os
6
+ import ssl
7
+ from typing import Any
8
+
9
+ import truststore
10
+
11
+
12
+ def get_ssl_context() -> ssl.SSLContext | bool:
13
+ """Get SSL context for httpx clients.
14
+
15
+ Returns an SSL context using truststore if LLAMA_DEPLOY_USE_TRUSTSTORE is set,
16
+ otherwise returns True (default SSL verification).
17
+
18
+ Truststore allows Python to use the system certificate store, which is useful
19
+ for corporate environments with MITM proxies.
20
+ """
21
+ if os.getenv("LLAMA_DEPLOY_USE_TRUSTSTORE", "").lower() in ("1", "true", "yes"):
22
+ return truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
23
+ return True
24
+
25
+
26
+ def get_httpx_verify_param() -> Any:
27
+ """Get the verify parameter for httpx clients.
28
+
29
+ Returns an SSL context using truststore if configured, otherwise returns True.
30
+ This can be passed directly to httpx.Client/AsyncClient's verify parameter.
31
+ """
32
+ return get_ssl_context()
@@ -41,6 +41,8 @@ class DeploymentResponse(Base):
41
41
  status: LlamaDeploymentPhase
42
42
  warning: str | None = None
43
43
  events: list[DeploymentEvent] | None = None
44
+ # version selector for appserver image
45
+ llama_deploy_version: str | None = None
44
46
 
45
47
 
46
48
  class DeploymentsListResponse(Base):
@@ -54,6 +56,8 @@ class DeploymentCreate(Base):
54
56
  git_ref: str | None = None
55
57
  personal_access_token: str | None = None
56
58
  secrets: dict[str, str] | None = None
59
+ # optional version selector; if omitted, server may set based on client version
60
+ llama_deploy_version: str | None = None
57
61
 
58
62
 
59
63
  class LlamaDeploymentMetadata(Base):
@@ -83,6 +87,8 @@ class LlamaDeploymentSpec(Base):
83
87
  secretName: str | None = None
84
88
  # when true, the deployment will prebuild the UI assets and serve them from a static file server
85
89
  staticAssetsPath: str | None = None
90
+ # explicit imageTag (operator will use this if provided)
91
+ imageTag: str | None = None
86
92
 
87
93
 
88
94
  class LlamaDeploymentStatus(Base):
@@ -122,6 +128,8 @@ class DeploymentUpdate(Base):
122
128
  personal_access_token: str | None = None
123
129
  secrets: dict[str, str | None] | None = None
124
130
  static_assets_path: Path | None = None
131
+ # allow updating version selector
132
+ llama_deploy_version: str | None = None
125
133
 
126
134
 
127
135
  class DeploymentUpdateResult(Base):
@@ -200,6 +208,10 @@ def apply_deployment_update(
200
208
  # String value means add/update this secret
201
209
  secret_adds[key] = value
202
210
 
211
+ # Handle version selector
212
+ if update.llama_deploy_version is not None:
213
+ updated_spec.imageTag = f"appserver-{update.llama_deploy_version}"
214
+
203
215
  return DeploymentUpdateResult(
204
216
  updated_spec=updated_spec,
205
217
  secret_adds=secret_adds,
@@ -1,12 +1,13 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: llama-deploy-core
3
- Version: 0.3.10
3
+ Version: 0.3.12
4
4
  Summary: Core models and schemas for LlamaDeploy
5
5
  License: MIT
6
6
  Requires-Dist: fastapi>=0.115.0
7
7
  Requires-Dist: overrides>=7.7.0
8
8
  Requires-Dist: pydantic>=2.0.0
9
9
  Requires-Dist: pyyaml>=6.0.2
10
+ Requires-Dist: truststore>=0.10.4
10
11
  Requires-Dist: types-pyyaml>=6.0.12.20250822
11
12
  Requires-Dist: httpx>=0.24.0,<1.0.0 ; extra == 'client'
12
13
  Requires-Dist: fastapi>=0.115.0 ; extra == 'server'
@@ -1,5 +1,6 @@
1
1
  llama_deploy/core/__init__.py,sha256=112612bf2e928c2e0310d6556bb13fc28c00db70297b90a8527486cd2562e408,43
2
- llama_deploy/core/client/manage_client.py,sha256=b54b276519247279c02cd70e0aa965a06cd574b4e3a808e219c40fa8a2d940fe,9326
2
+ llama_deploy/core/client/manage_client.py,sha256=944f565d8e9397e76e94b032d91b818924dc5b5b4c5859eb78e20d670707de00,9479
3
+ llama_deploy/core/client/ssl_util.py,sha256=b9743dc828fa27c18ba0867b1348662cdf0d855965c5a33db63505f23eef5d7b,1010
3
4
  llama_deploy/core/config.py,sha256=69bb0ea8ac169eaa4e808cd60a098b616bddd3145d26c6c35e56db38496b0e6a,35
4
5
  llama_deploy/core/deployment_config.py,sha256=bde431070758421f578f2e27f006152147e8cd752ee1054f1bf7c37ca95b0b38,15853
5
6
  llama_deploy/core/git/git_util.py,sha256=e62a5479c619a5973de203ebcc56b9729b5060c48fcb9cfc2e442756716c2abf,10960
@@ -8,7 +9,7 @@ llama_deploy/core/path_util.py,sha256=14d50c0c337c8450ed46cafc88436027056b365a48
8
9
  llama_deploy/core/py.typed,sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855,0
9
10
  llama_deploy/core/schema/__init__.py,sha256=d1459ee50c690779a682130eff72f61dc1a687d2d4b26d8a5d3620a72d92d831,802
10
11
  llama_deploy/core/schema/base.py,sha256=2de6d23e58c36b6bb311ec0aea4b902661867056c1250c6b7ce3bad17141fe15,677
11
- llama_deploy/core/schema/deployments.py,sha256=d9254d9a478d7aeaf3d28ec6205215ea892dcfb245966d726d69d0418e03b03d,6486
12
+ llama_deploy/core/schema/deployments.py,sha256=a85c294fdca939023918d93c36e4fa3f7a39a65383ec3b8f60d2f82ba43c0e93,7030
12
13
  llama_deploy/core/schema/git_validation.py,sha256=27b306aa6ecabe58cab6381d92551545f263fe7550c58b3087115410bc71fd21,1915
13
14
  llama_deploy/core/schema/projects.py,sha256=726f91e90ff8699c90861d9740819c44c3f00d945ab09df71bd6d35fdc218a45,726
14
15
  llama_deploy/core/schema/public.py,sha256=022129c8fc09192f5e503b0500ccf54d106f5712b9cf8ce84b3b1c37e186f930,147
@@ -17,6 +18,6 @@ llama_deploy/core/server/manage_api/_abstract_deployments_service.py,sha256=85ce
17
18
  llama_deploy/core/server/manage_api/_create_deployments_router.py,sha256=9bc8468169445e1cc7f2a479e1c7da42b4bdd7482fa3b440e03ee49cd09a75df,6801
18
19
  llama_deploy/core/server/manage_api/_exceptions.py,sha256=ee71cd9c2354a665e6905cd9cc752d2d65f71f0b936d33fec3c1c5229c38accf,246
19
20
  llama_deploy/core/ui_build.py,sha256=290dafa951918e5593b9035570fa4c66791d7e5ea785bd372ad11e99e8283857,1514
20
- llama_deploy_core-0.3.10.dist-info/WHEEL,sha256=66530aef82d5020ef5af27ae0123c71abb9261377c5bc519376c671346b12918,79
21
- llama_deploy_core-0.3.10.dist-info/METADATA,sha256=01a4c620c13f8848e3bafa69a86c44445a8ee40c23a1c57285455a4666b4792f,664
22
- llama_deploy_core-0.3.10.dist-info/RECORD,,
21
+ llama_deploy_core-0.3.12.dist-info/WHEEL,sha256=66530aef82d5020ef5af27ae0123c71abb9261377c5bc519376c671346b12918,79
22
+ llama_deploy_core-0.3.12.dist-info/METADATA,sha256=4a2b2d5d8204fbef0e58ea396b2d3474d01700d4e06b182cb6cb5f6a234f0d6f,698
23
+ llama_deploy_core-0.3.12.dist-info/RECORD,,