zenml-nightly 0.82.1.dev20250521__py3-none-any.whl → 0.82.1.dev20250522__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.
- zenml/VERSION +1 -1
- zenml/config/build_configuration.py +7 -0
- zenml/zen_server/routers/actions_endpoints.py +6 -6
- zenml/zen_server/routers/artifact_endpoint.py +6 -6
- zenml/zen_server/routers/artifact_version_endpoints.py +11 -11
- zenml/zen_server/routers/auth_endpoints.py +4 -3
- zenml/zen_server/routers/code_repositories_endpoints.py +6 -6
- zenml/zen_server/routers/devices_endpoints.py +6 -6
- zenml/zen_server/routers/event_source_endpoints.py +6 -6
- zenml/zen_server/routers/flavors_endpoints.py +7 -7
- zenml/zen_server/routers/logs_endpoints.py +2 -2
- zenml/zen_server/routers/model_versions_endpoints.py +13 -13
- zenml/zen_server/routers/models_endpoints.py +6 -6
- zenml/zen_server/routers/pipeline_builds_endpoints.py +5 -5
- zenml/zen_server/routers/pipeline_deployments_endpoints.py +6 -6
- zenml/zen_server/routers/pipelines_endpoints.py +7 -7
- zenml/zen_server/routers/plugin_endpoints.py +3 -3
- zenml/zen_server/routers/projects_endpoints.py +7 -7
- zenml/zen_server/routers/run_metadata_endpoints.py +2 -2
- zenml/zen_server/routers/run_templates_endpoints.py +7 -7
- zenml/zen_server/routers/runs_endpoints.py +11 -11
- zenml/zen_server/routers/schedule_endpoints.py +6 -6
- zenml/zen_server/routers/secrets_endpoints.py +8 -8
- zenml/zen_server/routers/server_endpoints.py +13 -9
- zenml/zen_server/routers/service_accounts_endpoints.py +12 -12
- zenml/zen_server/routers/service_connectors_endpoints.py +13 -13
- zenml/zen_server/routers/service_endpoints.py +6 -6
- zenml/zen_server/routers/stack_components_endpoints.py +7 -7
- zenml/zen_server/routers/stack_deployment_endpoints.py +4 -4
- zenml/zen_server/routers/stacks_endpoints.py +6 -6
- zenml/zen_server/routers/steps_endpoints.py +8 -8
- zenml/zen_server/routers/tag_resource_endpoints.py +5 -5
- zenml/zen_server/routers/tags_endpoints.py +6 -6
- zenml/zen_server/routers/triggers_endpoints.py +9 -9
- zenml/zen_server/routers/users_endpoints.py +12 -12
- zenml/zen_server/routers/webhook_endpoints.py +2 -2
- zenml/zen_server/utils.py +37 -7
- {zenml_nightly-0.82.1.dev20250521.dist-info → zenml_nightly-0.82.1.dev20250522.dist-info}/METADATA +1 -1
- {zenml_nightly-0.82.1.dev20250521.dist-info → zenml_nightly-0.82.1.dev20250522.dist-info}/RECORD +42 -42
- {zenml_nightly-0.82.1.dev20250521.dist-info → zenml_nightly-0.82.1.dev20250522.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.82.1.dev20250521.dist-info → zenml_nightly-0.82.1.dev20250522.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.82.1.dev20250521.dist-info → zenml_nightly-0.82.1.dev20250522.dist-info}/entry_points.txt +0 -0
@@ -36,7 +36,7 @@ from zenml.zen_server.rbac.endpoint_utils import (
|
|
36
36
|
from zenml.zen_server.rbac.models import ResourceType
|
37
37
|
from zenml.zen_server.routers.projects_endpoints import workspace_router
|
38
38
|
from zenml.zen_server.utils import (
|
39
|
-
|
39
|
+
async_fastapi_endpoint_wrapper,
|
40
40
|
make_dependable,
|
41
41
|
zen_store,
|
42
42
|
)
|
@@ -60,7 +60,7 @@ router = APIRouter(
|
|
60
60
|
deprecated=True,
|
61
61
|
tags=["builds"],
|
62
62
|
)
|
63
|
-
@
|
63
|
+
@async_fastapi_endpoint_wrapper
|
64
64
|
def create_build(
|
65
65
|
build: PipelineBuildRequest,
|
66
66
|
project_name_or_id: Optional[Union[str, UUID]] = None,
|
@@ -97,7 +97,7 @@ def create_build(
|
|
97
97
|
deprecated=True,
|
98
98
|
tags=["builds"],
|
99
99
|
)
|
100
|
-
@
|
100
|
+
@async_fastapi_endpoint_wrapper
|
101
101
|
def list_builds(
|
102
102
|
build_filter_model: PipelineBuildFilter = Depends(
|
103
103
|
make_dependable(PipelineBuildFilter)
|
@@ -133,7 +133,7 @@ def list_builds(
|
|
133
133
|
"/{build_id}",
|
134
134
|
responses={401: error_response, 404: error_response, 422: error_response},
|
135
135
|
)
|
136
|
-
@
|
136
|
+
@async_fastapi_endpoint_wrapper
|
137
137
|
def get_build(
|
138
138
|
build_id: UUID,
|
139
139
|
hydrate: bool = True,
|
@@ -158,7 +158,7 @@ def get_build(
|
|
158
158
|
"/{build_id}",
|
159
159
|
responses={401: error_response, 404: error_response, 422: error_response},
|
160
160
|
)
|
161
|
-
@
|
161
|
+
@async_fastapi_endpoint_wrapper
|
162
162
|
def delete_build(
|
163
163
|
build_id: UUID,
|
164
164
|
_: AuthContext = Security(authorize),
|
@@ -36,7 +36,7 @@ from zenml.zen_server.rbac.endpoint_utils import (
|
|
36
36
|
from zenml.zen_server.rbac.models import ResourceType
|
37
37
|
from zenml.zen_server.routers.projects_endpoints import workspace_router
|
38
38
|
from zenml.zen_server.utils import (
|
39
|
-
|
39
|
+
async_fastapi_endpoint_wrapper,
|
40
40
|
make_dependable,
|
41
41
|
server_config,
|
42
42
|
workload_manager,
|
@@ -93,7 +93,7 @@ router = APIRouter(
|
|
93
93
|
deprecated=True,
|
94
94
|
tags=["deployments"],
|
95
95
|
)
|
96
|
-
@
|
96
|
+
@async_fastapi_endpoint_wrapper
|
97
97
|
def create_deployment(
|
98
98
|
request: Request,
|
99
99
|
deployment: PipelineDeploymentRequest,
|
@@ -142,7 +142,7 @@ def create_deployment(
|
|
142
142
|
deprecated=True,
|
143
143
|
tags=["deployments"],
|
144
144
|
)
|
145
|
-
@
|
145
|
+
@async_fastapi_endpoint_wrapper
|
146
146
|
def list_deployments(
|
147
147
|
request: Request,
|
148
148
|
deployment_filter_model: PipelineDeploymentFilter = Depends(
|
@@ -196,7 +196,7 @@ def list_deployments(
|
|
196
196
|
"/{deployment_id}",
|
197
197
|
responses={401: error_response, 404: error_response, 422: error_response},
|
198
198
|
)
|
199
|
-
@
|
199
|
+
@async_fastapi_endpoint_wrapper
|
200
200
|
def get_deployment(
|
201
201
|
request: Request,
|
202
202
|
deployment_id: UUID,
|
@@ -235,7 +235,7 @@ def get_deployment(
|
|
235
235
|
"/{deployment_id}",
|
236
236
|
responses={401: error_response, 404: error_response, 422: error_response},
|
237
237
|
)
|
238
|
-
@
|
238
|
+
@async_fastapi_endpoint_wrapper
|
239
239
|
def delete_deployment(
|
240
240
|
deployment_id: UUID,
|
241
241
|
_: AuthContext = Security(authorize),
|
@@ -260,7 +260,7 @@ def delete_deployment(
|
|
260
260
|
422: error_response,
|
261
261
|
},
|
262
262
|
)
|
263
|
-
@
|
263
|
+
@async_fastapi_endpoint_wrapper
|
264
264
|
def deployment_logs(
|
265
265
|
deployment_id: UUID,
|
266
266
|
offset: int = 0,
|
@@ -48,7 +48,7 @@ from zenml.zen_server.rbac.endpoint_utils import (
|
|
48
48
|
from zenml.zen_server.rbac.models import ResourceType
|
49
49
|
from zenml.zen_server.routers.projects_endpoints import workspace_router
|
50
50
|
from zenml.zen_server.utils import (
|
51
|
-
|
51
|
+
async_fastapi_endpoint_wrapper,
|
52
52
|
make_dependable,
|
53
53
|
server_config,
|
54
54
|
zen_store,
|
@@ -73,7 +73,7 @@ router = APIRouter(
|
|
73
73
|
deprecated=True,
|
74
74
|
tags=["pipelines"],
|
75
75
|
)
|
76
|
-
@
|
76
|
+
@async_fastapi_endpoint_wrapper
|
77
77
|
def create_pipeline(
|
78
78
|
pipeline: PipelineRequest,
|
79
79
|
project_name_or_id: Optional[Union[str, UUID]] = None,
|
@@ -119,7 +119,7 @@ def create_pipeline(
|
|
119
119
|
deprecated=True,
|
120
120
|
tags=["pipelines"],
|
121
121
|
)
|
122
|
-
@
|
122
|
+
@async_fastapi_endpoint_wrapper
|
123
123
|
def list_pipelines(
|
124
124
|
pipeline_filter_model: PipelineFilter = Depends(
|
125
125
|
make_dependable(PipelineFilter)
|
@@ -155,7 +155,7 @@ def list_pipelines(
|
|
155
155
|
"/{pipeline_id}",
|
156
156
|
responses={401: error_response, 404: error_response, 422: error_response},
|
157
157
|
)
|
158
|
-
@
|
158
|
+
@async_fastapi_endpoint_wrapper
|
159
159
|
def get_pipeline(
|
160
160
|
pipeline_id: UUID,
|
161
161
|
hydrate: bool = True,
|
@@ -180,7 +180,7 @@ def get_pipeline(
|
|
180
180
|
"/{pipeline_id}",
|
181
181
|
responses={401: error_response, 404: error_response, 422: error_response},
|
182
182
|
)
|
183
|
-
@
|
183
|
+
@async_fastapi_endpoint_wrapper
|
184
184
|
def update_pipeline(
|
185
185
|
pipeline_id: UUID,
|
186
186
|
pipeline_update: PipelineUpdate,
|
@@ -207,7 +207,7 @@ def update_pipeline(
|
|
207
207
|
"/{pipeline_id}",
|
208
208
|
responses={401: error_response, 404: error_response, 422: error_response},
|
209
209
|
)
|
210
|
-
@
|
210
|
+
@async_fastapi_endpoint_wrapper
|
211
211
|
def delete_pipeline(
|
212
212
|
pipeline_id: UUID,
|
213
213
|
_: AuthContext = Security(authorize),
|
@@ -238,7 +238,7 @@ def delete_pipeline(
|
|
238
238
|
"/{pipeline_id}" + RUNS,
|
239
239
|
responses={401: error_response, 404: error_response, 422: error_response},
|
240
240
|
)
|
241
|
-
@
|
241
|
+
@async_fastapi_endpoint_wrapper
|
242
242
|
def list_pipeline_runs(
|
243
243
|
pipeline_run_filter_model: PipelineRunFilter = Depends(
|
244
244
|
make_dependable(PipelineRunFilter)
|
@@ -30,7 +30,7 @@ from zenml.models.v2.base.page import Page
|
|
30
30
|
from zenml.zen_server.auth import AuthContext, authorize
|
31
31
|
from zenml.zen_server.exceptions import error_response
|
32
32
|
from zenml.zen_server.utils import (
|
33
|
-
|
33
|
+
async_fastapi_endpoint_wrapper,
|
34
34
|
plugin_flavor_registry,
|
35
35
|
)
|
36
36
|
|
@@ -49,7 +49,7 @@ plugin_router = APIRouter(
|
|
49
49
|
response_model=Page[BasePluginFlavorResponse], # type: ignore[type-arg]
|
50
50
|
responses={401: error_response, 404: error_response, 422: error_response},
|
51
51
|
)
|
52
|
-
@
|
52
|
+
@async_fastapi_endpoint_wrapper
|
53
53
|
def list_flavors(
|
54
54
|
type: PluginType,
|
55
55
|
subtype: PluginSubType,
|
@@ -83,7 +83,7 @@ def list_flavors(
|
|
83
83
|
"/{name}",
|
84
84
|
responses={401: error_response, 404: error_response, 422: error_response},
|
85
85
|
)
|
86
|
-
@
|
86
|
+
@async_fastapi_endpoint_wrapper
|
87
87
|
def get_flavor(
|
88
88
|
name: str,
|
89
89
|
type: PluginType = Query(..., alias="type"),
|
@@ -52,7 +52,7 @@ from zenml.zen_server.rbac.utils import (
|
|
52
52
|
get_allowed_resource_ids,
|
53
53
|
)
|
54
54
|
from zenml.zen_server.utils import (
|
55
|
-
|
55
|
+
async_fastapi_endpoint_wrapper,
|
56
56
|
make_dependable,
|
57
57
|
server_config,
|
58
58
|
zen_store,
|
@@ -81,7 +81,7 @@ router = APIRouter(
|
|
81
81
|
"",
|
82
82
|
responses={401: error_response, 404: error_response, 422: error_response},
|
83
83
|
)
|
84
|
-
@
|
84
|
+
@async_fastapi_endpoint_wrapper
|
85
85
|
def list_projects(
|
86
86
|
project_filter_model: ProjectFilter = Depends(
|
87
87
|
make_dependable(ProjectFilter)
|
@@ -118,7 +118,7 @@ def list_projects(
|
|
118
118
|
"",
|
119
119
|
responses={401: error_response, 409: error_response, 422: error_response},
|
120
120
|
)
|
121
|
-
@
|
121
|
+
@async_fastapi_endpoint_wrapper
|
122
122
|
def create_project(
|
123
123
|
project_request: ProjectRequest,
|
124
124
|
_: AuthContext = Security(authorize),
|
@@ -149,7 +149,7 @@ def create_project(
|
|
149
149
|
"/{project_name_or_id}",
|
150
150
|
responses={401: error_response, 404: error_response, 422: error_response},
|
151
151
|
)
|
152
|
-
@
|
152
|
+
@async_fastapi_endpoint_wrapper
|
153
153
|
def get_project(
|
154
154
|
project_name_or_id: Union[str, UUID],
|
155
155
|
hydrate: bool = True,
|
@@ -184,7 +184,7 @@ def get_project(
|
|
184
184
|
"/{project_name_or_id}",
|
185
185
|
responses={401: error_response, 404: error_response, 422: error_response},
|
186
186
|
)
|
187
|
-
@
|
187
|
+
@async_fastapi_endpoint_wrapper
|
188
188
|
def update_project(
|
189
189
|
project_name_or_id: UUID,
|
190
190
|
project_update: ProjectUpdate,
|
@@ -219,7 +219,7 @@ def update_project(
|
|
219
219
|
"/{project_name_or_id}",
|
220
220
|
responses={401: error_response, 404: error_response, 422: error_response},
|
221
221
|
)
|
222
|
-
@
|
222
|
+
@async_fastapi_endpoint_wrapper
|
223
223
|
def delete_project(
|
224
224
|
project_name_or_id: Union[str, UUID],
|
225
225
|
_: AuthContext = Security(authorize),
|
@@ -249,7 +249,7 @@ def delete_project(
|
|
249
249
|
"/{project_name_or_id}" + STATISTICS,
|
250
250
|
responses={401: error_response, 404: error_response, 422: error_response},
|
251
251
|
)
|
252
|
-
@
|
252
|
+
@async_fastapi_endpoint_wrapper
|
253
253
|
def get_project_statistics(
|
254
254
|
project_name_or_id: Union[str, UUID],
|
255
255
|
auth_context: AuthContext = Security(authorize),
|
@@ -29,7 +29,7 @@ from zenml.zen_server.rbac.utils import (
|
|
29
29
|
verify_permission_for_model,
|
30
30
|
)
|
31
31
|
from zenml.zen_server.routers.projects_endpoints import workspace_router
|
32
|
-
from zenml.zen_server.utils import
|
32
|
+
from zenml.zen_server.utils import async_fastapi_endpoint_wrapper, zen_store
|
33
33
|
|
34
34
|
router = APIRouter(
|
35
35
|
prefix=API + VERSION_1 + RUN_METADATA,
|
@@ -50,7 +50,7 @@ router = APIRouter(
|
|
50
50
|
deprecated=True,
|
51
51
|
tags=["run_metadata"],
|
52
52
|
)
|
53
|
-
@
|
53
|
+
@async_fastapi_endpoint_wrapper
|
54
54
|
def create_run_metadata(
|
55
55
|
run_metadata: RunMetadataRequest,
|
56
56
|
project_name_or_id: Optional[Union[str, UUID]] = None,
|
@@ -55,7 +55,7 @@ from zenml.zen_server.rbac.models import Action, ResourceType
|
|
55
55
|
from zenml.zen_server.rbac.utils import verify_permission
|
56
56
|
from zenml.zen_server.routers.projects_endpoints import workspace_router
|
57
57
|
from zenml.zen_server.utils import (
|
58
|
-
|
58
|
+
async_fastapi_endpoint_wrapper,
|
59
59
|
make_dependable,
|
60
60
|
server_config,
|
61
61
|
zen_store,
|
@@ -80,7 +80,7 @@ router = APIRouter(
|
|
80
80
|
deprecated=True,
|
81
81
|
tags=["run_templates"],
|
82
82
|
)
|
83
|
-
@
|
83
|
+
@async_fastapi_endpoint_wrapper
|
84
84
|
def create_run_template(
|
85
85
|
run_template: RunTemplateRequest,
|
86
86
|
project_name_or_id: Optional[Union[str, UUID]] = None,
|
@@ -117,7 +117,7 @@ def create_run_template(
|
|
117
117
|
deprecated=True,
|
118
118
|
tags=["run_templates"],
|
119
119
|
)
|
120
|
-
@
|
120
|
+
@async_fastapi_endpoint_wrapper
|
121
121
|
def list_run_templates(
|
122
122
|
filter_model: RunTemplateFilter = Depends(
|
123
123
|
make_dependable(RunTemplateFilter)
|
@@ -153,7 +153,7 @@ def list_run_templates(
|
|
153
153
|
"/{template_id}",
|
154
154
|
responses={401: error_response, 404: error_response, 422: error_response},
|
155
155
|
)
|
156
|
-
@
|
156
|
+
@async_fastapi_endpoint_wrapper
|
157
157
|
def get_run_template(
|
158
158
|
template_id: UUID,
|
159
159
|
hydrate: bool = True,
|
@@ -180,7 +180,7 @@ def get_run_template(
|
|
180
180
|
"/{template_id}",
|
181
181
|
responses={401: error_response, 404: error_response, 422: error_response},
|
182
182
|
)
|
183
|
-
@
|
183
|
+
@async_fastapi_endpoint_wrapper
|
184
184
|
def update_run_template(
|
185
185
|
template_id: UUID,
|
186
186
|
update: RunTemplateUpdate,
|
@@ -207,7 +207,7 @@ def update_run_template(
|
|
207
207
|
"/{template_id}",
|
208
208
|
responses={401: error_response, 404: error_response, 422: error_response},
|
209
209
|
)
|
210
|
-
@
|
210
|
+
@async_fastapi_endpoint_wrapper
|
211
211
|
def delete_run_template(
|
212
212
|
template_id: UUID,
|
213
213
|
_: AuthContext = Security(authorize),
|
@@ -235,7 +235,7 @@ if server_config().workload_manager_enabled:
|
|
235
235
|
429: error_response,
|
236
236
|
},
|
237
237
|
)
|
238
|
-
@
|
238
|
+
@async_fastapi_endpoint_wrapper
|
239
239
|
def create_template_run(
|
240
240
|
template_id: UUID,
|
241
241
|
config: Optional[PipelineRunConfiguration] = None,
|
@@ -54,7 +54,7 @@ from zenml.zen_server.rbac.utils import (
|
|
54
54
|
)
|
55
55
|
from zenml.zen_server.routers.projects_endpoints import workspace_router
|
56
56
|
from zenml.zen_server.utils import (
|
57
|
-
|
57
|
+
async_fastapi_endpoint_wrapper,
|
58
58
|
make_dependable,
|
59
59
|
server_config,
|
60
60
|
workload_manager,
|
@@ -83,7 +83,7 @@ logger = get_logger(__name__)
|
|
83
83
|
deprecated=True,
|
84
84
|
tags=["runs"],
|
85
85
|
)
|
86
|
-
@
|
86
|
+
@async_fastapi_endpoint_wrapper
|
87
87
|
def get_or_create_pipeline_run(
|
88
88
|
pipeline_run: PipelineRunRequest,
|
89
89
|
project_name_or_id: Optional[Union[str, UUID]] = None,
|
@@ -121,7 +121,7 @@ def get_or_create_pipeline_run(
|
|
121
121
|
deprecated=True,
|
122
122
|
tags=["runs"],
|
123
123
|
)
|
124
|
-
@
|
124
|
+
@async_fastapi_endpoint_wrapper
|
125
125
|
def list_runs(
|
126
126
|
runs_filter_model: PipelineRunFilter = Depends(
|
127
127
|
make_dependable(PipelineRunFilter)
|
@@ -156,7 +156,7 @@ def list_runs(
|
|
156
156
|
"/{run_id}",
|
157
157
|
responses={401: error_response, 404: error_response, 422: error_response},
|
158
158
|
)
|
159
|
-
@
|
159
|
+
@async_fastapi_endpoint_wrapper
|
160
160
|
def get_run(
|
161
161
|
run_id: UUID,
|
162
162
|
hydrate: bool = True,
|
@@ -222,7 +222,7 @@ def get_run(
|
|
222
222
|
"/{run_id}",
|
223
223
|
responses={401: error_response, 404: error_response, 422: error_response},
|
224
224
|
)
|
225
|
-
@
|
225
|
+
@async_fastapi_endpoint_wrapper
|
226
226
|
def update_run(
|
227
227
|
run_id: UUID,
|
228
228
|
run_model: PipelineRunUpdate,
|
@@ -249,7 +249,7 @@ def update_run(
|
|
249
249
|
"/{run_id}",
|
250
250
|
responses={401: error_response, 404: error_response, 422: error_response},
|
251
251
|
)
|
252
|
-
@
|
252
|
+
@async_fastapi_endpoint_wrapper
|
253
253
|
def delete_run(
|
254
254
|
run_id: UUID,
|
255
255
|
_: AuthContext = Security(authorize),
|
@@ -270,7 +270,7 @@ def delete_run(
|
|
270
270
|
"/{run_id}" + STEPS,
|
271
271
|
responses={401: error_response, 404: error_response, 422: error_response},
|
272
272
|
)
|
273
|
-
@
|
273
|
+
@async_fastapi_endpoint_wrapper
|
274
274
|
def get_run_steps(
|
275
275
|
run_id: UUID,
|
276
276
|
step_run_filter_model: StepRunFilter = Depends(
|
@@ -299,7 +299,7 @@ def get_run_steps(
|
|
299
299
|
"/{run_id}" + PIPELINE_CONFIGURATION,
|
300
300
|
responses={401: error_response, 404: error_response, 422: error_response},
|
301
301
|
)
|
302
|
-
@
|
302
|
+
@async_fastapi_endpoint_wrapper
|
303
303
|
def get_pipeline_configuration(
|
304
304
|
run_id: UUID,
|
305
305
|
_: AuthContext = Security(authorize),
|
@@ -322,7 +322,7 @@ def get_pipeline_configuration(
|
|
322
322
|
"/{run_id}" + STATUS,
|
323
323
|
responses={401: error_response, 404: error_response, 422: error_response},
|
324
324
|
)
|
325
|
-
@
|
325
|
+
@async_fastapi_endpoint_wrapper
|
326
326
|
def get_run_status(
|
327
327
|
run_id: UUID,
|
328
328
|
_: AuthContext = Security(authorize),
|
@@ -345,7 +345,7 @@ def get_run_status(
|
|
345
345
|
"/{run_id}" + REFRESH,
|
346
346
|
responses={401: error_response, 404: error_response, 422: error_response},
|
347
347
|
)
|
348
|
-
@
|
348
|
+
@async_fastapi_endpoint_wrapper
|
349
349
|
def refresh_run_status(
|
350
350
|
run_id: UUID,
|
351
351
|
_: AuthContext = Security(authorize),
|
@@ -394,7 +394,7 @@ def refresh_run_status(
|
|
394
394
|
422: error_response,
|
395
395
|
},
|
396
396
|
)
|
397
|
-
@
|
397
|
+
@async_fastapi_endpoint_wrapper
|
398
398
|
def run_logs(
|
399
399
|
run_id: UUID,
|
400
400
|
offset: int = 0,
|
@@ -33,7 +33,7 @@ from zenml.zen_server.rbac.endpoint_utils import (
|
|
33
33
|
)
|
34
34
|
from zenml.zen_server.routers.projects_endpoints import workspace_router
|
35
35
|
from zenml.zen_server.utils import (
|
36
|
-
|
36
|
+
async_fastapi_endpoint_wrapper,
|
37
37
|
make_dependable,
|
38
38
|
zen_store,
|
39
39
|
)
|
@@ -57,7 +57,7 @@ router = APIRouter(
|
|
57
57
|
deprecated=True,
|
58
58
|
tags=["schedules"],
|
59
59
|
)
|
60
|
-
@
|
60
|
+
@async_fastapi_endpoint_wrapper
|
61
61
|
def create_schedule(
|
62
62
|
schedule: ScheduleRequest,
|
63
63
|
project_name_or_id: Optional[Union[str, UUID]] = None,
|
@@ -97,7 +97,7 @@ def create_schedule(
|
|
97
97
|
deprecated=True,
|
98
98
|
tags=["schedules"],
|
99
99
|
)
|
100
|
-
@
|
100
|
+
@async_fastapi_endpoint_wrapper
|
101
101
|
def list_schedules(
|
102
102
|
schedule_filter_model: ScheduleFilter = Depends(
|
103
103
|
make_dependable(ScheduleFilter)
|
@@ -131,7 +131,7 @@ def list_schedules(
|
|
131
131
|
"/{schedule_id}",
|
132
132
|
responses={401: error_response, 404: error_response, 422: error_response},
|
133
133
|
)
|
134
|
-
@
|
134
|
+
@async_fastapi_endpoint_wrapper
|
135
135
|
def get_schedule(
|
136
136
|
schedule_id: UUID,
|
137
137
|
hydrate: bool = True,
|
@@ -157,7 +157,7 @@ def get_schedule(
|
|
157
157
|
"/{schedule_id}",
|
158
158
|
responses={401: error_response, 404: error_response, 422: error_response},
|
159
159
|
)
|
160
|
-
@
|
160
|
+
@async_fastapi_endpoint_wrapper
|
161
161
|
def update_schedule(
|
162
162
|
schedule_id: UUID,
|
163
163
|
schedule_update: ScheduleUpdate,
|
@@ -182,7 +182,7 @@ def update_schedule(
|
|
182
182
|
"/{schedule_id}",
|
183
183
|
responses={401: error_response, 404: error_response, 422: error_response},
|
184
184
|
)
|
185
|
-
@
|
185
|
+
@async_fastapi_endpoint_wrapper
|
186
186
|
def delete_schedule(
|
187
187
|
schedule_id: UUID,
|
188
188
|
_: AuthContext = Security(authorize),
|
@@ -51,7 +51,7 @@ from zenml.zen_server.rbac.utils import (
|
|
51
51
|
)
|
52
52
|
from zenml.zen_server.routers.projects_endpoints import workspace_router
|
53
53
|
from zenml.zen_server.utils import (
|
54
|
-
|
54
|
+
async_fastapi_endpoint_wrapper,
|
55
55
|
make_dependable,
|
56
56
|
zen_store,
|
57
57
|
)
|
@@ -81,7 +81,7 @@ op_router = APIRouter(
|
|
81
81
|
deprecated=True,
|
82
82
|
tags=["secrets"],
|
83
83
|
)
|
84
|
-
@
|
84
|
+
@async_fastapi_endpoint_wrapper
|
85
85
|
def create_secret(
|
86
86
|
secret: SecretRequest,
|
87
87
|
workspace_name_or_id: Optional[Union[str, UUID]] = None,
|
@@ -106,7 +106,7 @@ def create_secret(
|
|
106
106
|
"",
|
107
107
|
responses={401: error_response, 404: error_response, 422: error_response},
|
108
108
|
)
|
109
|
-
@
|
109
|
+
@async_fastapi_endpoint_wrapper
|
110
110
|
def list_secrets(
|
111
111
|
secret_filter_model: SecretFilter = Depends(make_dependable(SecretFilter)),
|
112
112
|
hydrate: bool = False,
|
@@ -153,7 +153,7 @@ def list_secrets(
|
|
153
153
|
"/{secret_id}",
|
154
154
|
responses={401: error_response, 404: error_response, 422: error_response},
|
155
155
|
)
|
156
|
-
@
|
156
|
+
@async_fastapi_endpoint_wrapper
|
157
157
|
def get_secret(
|
158
158
|
secret_id: UUID,
|
159
159
|
hydrate: bool = True,
|
@@ -185,7 +185,7 @@ def get_secret(
|
|
185
185
|
"/{secret_id}",
|
186
186
|
responses={401: error_response, 404: error_response, 422: error_response},
|
187
187
|
)
|
188
|
-
@
|
188
|
+
@async_fastapi_endpoint_wrapper
|
189
189
|
def update_secret(
|
190
190
|
secret_id: UUID,
|
191
191
|
secret_update: SecretUpdate,
|
@@ -225,7 +225,7 @@ def update_secret(
|
|
225
225
|
"/{secret_id}",
|
226
226
|
responses={401: error_response, 404: error_response, 422: error_response},
|
227
227
|
)
|
228
|
-
@
|
228
|
+
@async_fastapi_endpoint_wrapper
|
229
229
|
def delete_secret(
|
230
230
|
secret_id: UUID,
|
231
231
|
_: AuthContext = Security(authorize),
|
@@ -246,7 +246,7 @@ def delete_secret(
|
|
246
246
|
SECRETS_BACKUP,
|
247
247
|
responses={401: error_response, 404: error_response, 422: error_response},
|
248
248
|
)
|
249
|
-
@
|
249
|
+
@async_fastapi_endpoint_wrapper
|
250
250
|
def backup_secrets(
|
251
251
|
ignore_errors: bool = True,
|
252
252
|
delete_secrets: bool = False,
|
@@ -276,7 +276,7 @@ def backup_secrets(
|
|
276
276
|
SECRETS_RESTORE,
|
277
277
|
responses={401: error_response, 404: error_response, 422: error_response},
|
278
278
|
)
|
279
|
-
@
|
279
|
+
@async_fastapi_endpoint_wrapper
|
280
280
|
def restore_secrets(
|
281
281
|
ignore_errors: bool = False,
|
282
282
|
delete_secrets: bool = False,
|
@@ -46,7 +46,11 @@ from zenml.zen_server.auth import AuthContext, authorize
|
|
46
46
|
from zenml.zen_server.exceptions import error_response
|
47
47
|
from zenml.zen_server.rbac.models import ResourceType
|
48
48
|
from zenml.zen_server.rbac.utils import get_allowed_resource_ids
|
49
|
-
from zenml.zen_server.utils import
|
49
|
+
from zenml.zen_server.utils import (
|
50
|
+
async_fastapi_endpoint_wrapper,
|
51
|
+
server_config,
|
52
|
+
zen_store,
|
53
|
+
)
|
50
54
|
|
51
55
|
router = APIRouter(
|
52
56
|
prefix=API + VERSION_1,
|
@@ -56,7 +60,7 @@ router = APIRouter(
|
|
56
60
|
|
57
61
|
|
58
62
|
@router.get("/version")
|
59
|
-
def version() -> str:
|
63
|
+
async def version() -> str:
|
60
64
|
"""Get version of the server.
|
61
65
|
|
62
66
|
Returns:
|
@@ -69,7 +73,7 @@ def version() -> str:
|
|
69
73
|
INFO,
|
70
74
|
responses={401: error_response, 404: error_response, 422: error_response},
|
71
75
|
)
|
72
|
-
@
|
76
|
+
@async_fastapi_endpoint_wrapper
|
73
77
|
def server_info() -> ServerModel:
|
74
78
|
"""Get information about the server.
|
75
79
|
|
@@ -83,7 +87,7 @@ def server_info() -> ServerModel:
|
|
83
87
|
LOAD_INFO,
|
84
88
|
response_model=ServerLoadInfo,
|
85
89
|
)
|
86
|
-
@
|
90
|
+
@async_fastapi_endpoint_wrapper
|
87
91
|
def server_load_info(_: AuthContext = Security(authorize)) -> ServerLoadInfo:
|
88
92
|
"""Get information about the server load.
|
89
93
|
|
@@ -132,7 +136,7 @@ def server_load_info(_: AuthContext = Security(authorize)) -> ServerLoadInfo:
|
|
132
136
|
422: error_response,
|
133
137
|
},
|
134
138
|
)
|
135
|
-
@
|
139
|
+
@async_fastapi_endpoint_wrapper
|
136
140
|
def get_onboarding_state(
|
137
141
|
_: AuthContext = Security(authorize),
|
138
142
|
) -> List[str]:
|
@@ -159,7 +163,7 @@ if server_config().external_server_id is None:
|
|
159
163
|
422: error_response,
|
160
164
|
},
|
161
165
|
)
|
162
|
-
@
|
166
|
+
@async_fastapi_endpoint_wrapper
|
163
167
|
def get_settings(
|
164
168
|
_: AuthContext = Security(authorize),
|
165
169
|
hydrate: bool = True,
|
@@ -182,7 +186,7 @@ if server_config().external_server_id is None:
|
|
182
186
|
422: error_response,
|
183
187
|
},
|
184
188
|
)
|
185
|
-
@
|
189
|
+
@async_fastapi_endpoint_wrapper
|
186
190
|
def update_server_settings(
|
187
191
|
settings_update: ServerSettingsUpdate,
|
188
192
|
auth_context: AuthContext = Security(authorize),
|
@@ -227,7 +231,7 @@ if server_config().auth_scheme != AuthScheme.EXTERNAL:
|
|
227
231
|
422: error_response,
|
228
232
|
},
|
229
233
|
)
|
230
|
-
@
|
234
|
+
@async_fastapi_endpoint_wrapper
|
231
235
|
def activate_server(
|
232
236
|
activate_request: ServerActivationRequest,
|
233
237
|
) -> Optional[UserResponse]:
|
@@ -246,7 +250,7 @@ if server_config().auth_scheme != AuthScheme.EXTERNAL:
|
|
246
250
|
STATISTICS,
|
247
251
|
responses={401: error_response, 404: error_response, 422: error_response},
|
248
252
|
)
|
249
|
-
@
|
253
|
+
@async_fastapi_endpoint_wrapper
|
250
254
|
def get_server_statistics(
|
251
255
|
auth_context: AuthContext = Security(authorize),
|
252
256
|
) -> ServerStatistics:
|