llama-deploy-appserver 0.3.0a18__py3-none-any.whl → 0.3.0a19__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 +21 -1
- {llama_deploy_appserver-0.3.0a18.dist-info → llama_deploy_appserver-0.3.0a19.dist-info}/METADATA +2 -2
- {llama_deploy_appserver-0.3.0a18.dist-info → llama_deploy_appserver-0.3.0a19.dist-info}/RECORD +4 -4
- {llama_deploy_appserver-0.3.0a18.dist-info → llama_deploy_appserver-0.3.0a19.dist-info}/WHEEL +0 -0
llama_deploy/appserver/app.py
CHANGED
@@ -13,6 +13,7 @@ import uvicorn
|
|
13
13
|
from fastapi import FastAPI
|
14
14
|
from fastapi.middleware.cors import CORSMiddleware
|
15
15
|
from fastapi.openapi.utils import get_openapi
|
16
|
+
from fastapi.responses import RedirectResponse
|
16
17
|
from llama_deploy.appserver.configure_logging import (
|
17
18
|
add_log_middleware,
|
18
19
|
setup_logging,
|
@@ -94,6 +95,18 @@ async def lifespan(app: FastAPI) -> AsyncGenerator[None, Any]:
|
|
94
95
|
# otherwise serve the pre-built if available
|
95
96
|
mount_static_files(app, config, settings)
|
96
97
|
|
98
|
+
@app.get(f"/deployments/{config.name}")
|
99
|
+
@app.get(f"/deployments/{config.name}/")
|
100
|
+
@app.get(f"/deployments/{config.name}/ui")
|
101
|
+
def redirect_to_ui() -> RedirectResponse:
|
102
|
+
return RedirectResponse(f"/deployments/{config.name}/ui/")
|
103
|
+
else:
|
104
|
+
|
105
|
+
@app.get(f"/deployments/{config.name}")
|
106
|
+
@app.get(f"/deployments/{config.name}/")
|
107
|
+
def redirect_to_docs() -> RedirectResponse:
|
108
|
+
return RedirectResponse(f"/deployments/{config.name}/docs")
|
109
|
+
|
97
110
|
apiserver_state.state("running")
|
98
111
|
yield
|
99
112
|
|
@@ -144,7 +157,14 @@ def _setup_openapi(name: str, app: FastAPI, server: WorkflowServer) -> None:
|
|
144
157
|
app.openapi = custom_openapi # ty: ignore[invalid-assignment] - doesn't like us overwriting the method
|
145
158
|
|
146
159
|
|
147
|
-
|
160
|
+
_config = get_deployment_config()
|
161
|
+
_prefix = f"/deployments/{_config.name}"
|
162
|
+
app = FastAPI(
|
163
|
+
lifespan=lifespan,
|
164
|
+
docs_url=_prefix + "/docs",
|
165
|
+
redoc_url=_prefix + "/redoc",
|
166
|
+
openapi_url=_prefix + "/openapi.json",
|
167
|
+
)
|
148
168
|
Instrumentator().instrument(app).expose(app)
|
149
169
|
|
150
170
|
|
{llama_deploy_appserver-0.3.0a18.dist-info → llama_deploy_appserver-0.3.0a19.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.0a19
|
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.0a19,<0.4.0
|
14
14
|
Requires-Dist: httpx>=0.24.0,<1.0.0
|
15
15
|
Requires-Dist: prometheus-fastapi-instrumentator>=7.1.0
|
16
16
|
Requires-Dist: packaging>=25.0
|
{llama_deploy_appserver-0.3.0a18.dist-info → llama_deploy_appserver-0.3.0a19.dist-info}/RECORD
RENAMED
@@ -1,5 +1,5 @@
|
|
1
1
|
llama_deploy/appserver/__init__.py,sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855,0
|
2
|
-
llama_deploy/appserver/app.py,sha256=
|
2
|
+
llama_deploy/appserver/app.py,sha256=0a40f213fe51f333ddfcab22f4912042f28548c53d70075c414889747ef883e2,10226
|
3
3
|
llama_deploy/appserver/bootstrap.py,sha256=fa32be007f18b4b3af92c878bac417416c9afb09b1beddf51b5cd73115e6b7c6,2453
|
4
4
|
llama_deploy/appserver/configure_logging.py,sha256=194dd1ebed3c1d9065d9174f7828d557a577eaac8fb0443b3102430b1f578c19,6329
|
5
5
|
llama_deploy/appserver/correlation_id.py,sha256=8ac5bc6160c707b93a9fb818b64dd369a4ef7a53f9f91a6b3d90c4cf446f7327,572
|
@@ -16,6 +16,6 @@ llama_deploy/appserver/settings.py,sha256=7f1f481216b29614a94783c81cb49f0790d66e
|
|
16
16
|
llama_deploy/appserver/stats.py,sha256=1f3989f6705a6de3e4d61ee8cdd189fbe04a2c53ec5e720b2e5168acc331427f,691
|
17
17
|
llama_deploy/appserver/types.py,sha256=4edc991aafb6b8497f068d12387455df292da3ff8440223637641ab1632553ec,2133
|
18
18
|
llama_deploy/appserver/workflow_loader.py,sha256=c15890a00976e022edcdf2af04bf699c02fba020bb06c47960a4911e08255501,14146
|
19
|
-
llama_deploy_appserver-0.3.
|
20
|
-
llama_deploy_appserver-0.3.
|
21
|
-
llama_deploy_appserver-0.3.
|
19
|
+
llama_deploy_appserver-0.3.0a19.dist-info/WHEEL,sha256=66530aef82d5020ef5af27ae0123c71abb9261377c5bc519376c671346b12918,79
|
20
|
+
llama_deploy_appserver-0.3.0a19.dist-info/METADATA,sha256=90f8160435a03260431481238d68c144288025c92d8f1940cbaa4a2f8b4afba8,855
|
21
|
+
llama_deploy_appserver-0.3.0a19.dist-info/RECORD,,
|
{llama_deploy_appserver-0.3.0a18.dist-info → llama_deploy_appserver-0.3.0a19.dist-info}/WHEEL
RENAMED
File without changes
|