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.
@@ -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
- app = FastAPI(lifespan=lifespan)
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
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: llama-deploy-appserver
3
- Version: 0.3.0a18
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.0a18,<0.4.0
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
@@ -1,5 +1,5 @@
1
1
  llama_deploy/appserver/__init__.py,sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855,0
2
- llama_deploy/appserver/app.py,sha256=5892f34498944e5cee5c8ffe1424f540310b313981732cacb40d4de5c5e91d0d,9486
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.0a18.dist-info/WHEEL,sha256=66530aef82d5020ef5af27ae0123c71abb9261377c5bc519376c671346b12918,79
20
- llama_deploy_appserver-0.3.0a18.dist-info/METADATA,sha256=88c98f3ac607427769ce38aa89f895ec1ffec0262eb4afdba2adaeeed35cc183,855
21
- llama_deploy_appserver-0.3.0a18.dist-info/RECORD,,
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,,