peak-sdk 1.15.0__tar.gz → 1.16.0__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.
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/PKG-INFO +3 -3
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/__init__.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/_version.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/auth.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/base_client.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/callbacks.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/cli/__init_.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/cli/args.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/cli/cli.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/cli/helpers.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/cli/metrics/__init__.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/cli/metrics/metrics.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/cli/press/__init__.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/cli/press/apps/__init__.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/cli/press/apps/deployments.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/cli/press/blocks/__init__.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/cli/press/blocks/deployments.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/cli/press/specs.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/cli/resources/__init__.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/cli/resources/alerts/__init__.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/cli/resources/alerts/emails.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/cli/resources/artifacts.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/cli/resources/images.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/cli/resources/services.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/cli/resources/tenants.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/cli/resources/users.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/cli/resources/webapps.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/cli/resources/workflows.py +70 -5
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/cli/version.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/compression.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/config.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/constants.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/exceptions.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/handler.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/helpers.py +15 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/logger.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/metrics/__init__.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/metrics/metrics.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/output.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/press/__init__.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/press/specs.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/resources/__init__.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/resources/alerts.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/resources/artifacts.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/resources/images.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/resources/services.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/resources/tenants.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/resources/users.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/resources/webapps.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/resources/workflows.py +103 -4
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/session.py +31 -11
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/telemetry.py +4 -3
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/template.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/tools/__init__.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/tools/logging/__init__.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/tools/logging/log_handler.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/tools/logging/log_level.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/tools/logging/logger.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/tools/logging/utils.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/validators.py +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/pypi-home.md +2 -2
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/pyproject.toml +1 -1
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/LICENSE +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/_metadata.py +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/cli/press/apps/specs.py +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/cli/press/blocks/specs.py +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/cli/press/deployments.py +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/cli/ruff.toml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/press/apps.py +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/press/blocks.py +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/press/deployments.py +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/py.typed +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/metrics/create_collection.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/metrics/publish.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/metrics/query.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/press/apps/deployments/create_app_deployment.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/press/apps/deployments/create_app_deployment_revision.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/press/apps/deployments/update_app_deployment_metadata.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/press/apps/specs/create_app_spec.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/press/apps/specs/create_app_spec_release.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/press/apps/specs/update_app_spec_metadata.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/press/blocks/deployments/create_block_deployment.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/press/blocks/deployments/create_block_deployment_revision.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/press/blocks/deployments/patch_block_parameters.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/press/blocks/deployments/update_block_deployment_metadata.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/press/blocks/specs/service/api/create_block_spec.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/press/blocks/specs/service/api/create_block_spec_release.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/press/blocks/specs/service/webapp/create_block_spec.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/press/blocks/specs/service/webapp/create_block_spec_release.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/press/blocks/specs/update_block_spec_metadata.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/press/blocks/specs/workflow/create_block_spec.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/press/blocks/specs/workflow/create_block_spec_release.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/press/deployments/patch_app_parameters_v2.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/press/deployments/patch_block_parameters_v2.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/press/patch_parameters.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/artifacts/create_artifact.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/artifacts/create_artifact_version.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/artifacts/update_artifact_metadata.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/emails/send_email.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/images/dockerfile/create_image.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/images/dockerfile/create_image_version.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/images/dockerfile/update_version.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/images/github/create_image.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/images/github/create_image_version.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/images/github/update_version.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/images/upload/create_image.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/images/upload/create_image_version.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/images/upload/create_or_update_image.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/images/upload/update_version.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/services/create_or_update_service.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/services/create_service.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/services/test_service.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/services/update_service.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/webapps/create_or_update_webapp.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/webapps/create_webapp.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/webapps/update_webapp.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/workflows/create_or_update_workflow.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/workflows/create_workflow.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/workflows/execute_partial_workflow.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/workflows/execute_workflow.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/workflows/patch_workflow.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/workflows/update_workflow.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/workflows/workflow_auto_retry.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/workflows/workflow_execution_parameters.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/workflows/workflow_input_parameters.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/workflows/workflow_input_parameters_inherit.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/workflows/workflow_output_parameters.yaml +0 -0
- {peak_sdk-1.15.0 → peak_sdk-1.16.0}/peak/sample_yaml/resources/workflows/workflow_skippable_steps.yaml +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: peak-sdk
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.16.0
|
4
4
|
Summary: Python SDK for interacting with the Peak platform
|
5
5
|
Home-page: https://docs.peak.ai/sdk/latest/
|
6
6
|
License: Apache-2.0
|
@@ -106,7 +106,7 @@ Follow these steps to create a virtual environment using Python's built-in `venv
|
|
106
106
|
This should return a response of the following format
|
107
107
|
|
108
108
|
```bash
|
109
|
-
peak-cli==1.
|
109
|
+
peak-cli==1.16.0
|
110
110
|
Python==3.12.3
|
111
111
|
System==Darwin(23.6.0)
|
112
112
|
```
|
@@ -122,7 +122,7 @@ Follow these steps to create a virtual environment using Python's built-in `venv
|
|
122
122
|
This should print the version of the SDK
|
123
123
|
|
124
124
|
```
|
125
|
-
1.
|
125
|
+
1.16.0
|
126
126
|
```
|
127
127
|
|
128
128
|
### Using the SDK and CLI
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1035,6 +1035,71 @@ def describe(
|
|
1035
1035
|
writer.write(response)
|
1036
1036
|
|
1037
1037
|
|
1038
|
+
@app.command(short_help="Pause a scheduled workflow.")
|
1039
|
+
def pause(
|
1040
|
+
ctx: typer.Context,
|
1041
|
+
workflow_id: int = _WORKFLOW_ID,
|
1042
|
+
dry_run: Optional[bool] = DRY_RUN, # noqa: ARG001
|
1043
|
+
paging: Optional[bool] = PAGING, # noqa: ARG001
|
1044
|
+
output_type: Optional[OutputTypesNoTable] = OUTPUT_TYPES, # noqa: ARG001
|
1045
|
+
) -> None:
|
1046
|
+
"""***Pause*** a scheduled workflow.
|
1047
|
+
|
1048
|
+
\b
|
1049
|
+
📝 ***Example usage:***<br/>
|
1050
|
+
```bash
|
1051
|
+
peak workflows pause 9999
|
1052
|
+
```
|
1053
|
+
|
1054
|
+
\b
|
1055
|
+
🆗 ***Response:***
|
1056
|
+
```json
|
1057
|
+
{}
|
1058
|
+
```
|
1059
|
+
|
1060
|
+
🔗 [**API Documentation**](https://service.dev.peak.ai/workflows/api-docs/index.htm#/Workflows/post_api_v1_workflows__workflowId__pause)
|
1061
|
+
"""
|
1062
|
+
workflow_client: Workflow = ctx.obj["client"]
|
1063
|
+
writer: Writer = ctx.obj["writer"]
|
1064
|
+
|
1065
|
+
with writer.pager():
|
1066
|
+
response = workflow_client.pause_workflow(workflow_id=workflow_id)
|
1067
|
+
|
1068
|
+
writer.write(response)
|
1069
|
+
|
1070
|
+
|
1071
|
+
@app.command(short_help="Resume a paused workflow.")
|
1072
|
+
def resume(
|
1073
|
+
ctx: typer.Context,
|
1074
|
+
workflow_id: int = _WORKFLOW_ID,
|
1075
|
+
dry_run: Optional[bool] = DRY_RUN, # noqa: ARG001
|
1076
|
+
paging: Optional[bool] = PAGING, # noqa: ARG001
|
1077
|
+
output_type: Optional[OutputTypesNoTable] = OUTPUT_TYPES, # noqa: ARG001
|
1078
|
+
) -> None:
|
1079
|
+
"""***Resume*** a paused workflow.
|
1080
|
+
|
1081
|
+
\b
|
1082
|
+
📝 ***Example usage:***<br/>
|
1083
|
+
```bash
|
1084
|
+
peak workflows resume 9999
|
1085
|
+
```
|
1086
|
+
|
1087
|
+
\b
|
1088
|
+
🆗 ***Response:***
|
1089
|
+
```json
|
1090
|
+
{}
|
1091
|
+
```
|
1092
|
+
|
1093
|
+
🔗 [**API Documentation**](https://service.dev.peak.ai/workflows/api-docs/index.htm#/Workflows/post_api_v1_workflows__workflowId__resume)
|
1094
|
+
"""
|
1095
|
+
workflow_client: Workflow = ctx.obj["client"]
|
1096
|
+
writer: Writer = ctx.obj["writer"]
|
1097
|
+
|
1098
|
+
with writer.pager():
|
1099
|
+
response = workflow_client.resume_workflow(workflow_id=workflow_id)
|
1100
|
+
writer.write(response)
|
1101
|
+
|
1102
|
+
|
1038
1103
|
@app.command(short_help="Delete a workflow.")
|
1039
1104
|
def delete(
|
1040
1105
|
ctx: typer.Context,
|
@@ -1303,12 +1368,12 @@ def get_execution_logs(
|
|
1303
1368
|
"nextToken": "f/37846375578651780454915234936364900527730394239380553728/s"
|
1304
1369
|
}
|
1305
1370
|
```
|
1306
|
-
|
1307
|
-
🔗 [**API Documentation**](https://service.peak.ai/workflows/api-docs/index.htm#/Executions/get-workflow-step-logs)
|
1308
1371
|
"""
|
1309
1372
|
workflow_client: Workflow = ctx.obj["client"]
|
1310
1373
|
writer = Writer()
|
1311
1374
|
|
1375
|
+
is_spoke_tenant = workflow_client.session.is_spoke_tenant
|
1376
|
+
|
1312
1377
|
pager = writer.pager() # Create pager context
|
1313
1378
|
|
1314
1379
|
with pager:
|
@@ -1322,11 +1387,11 @@ def get_execution_logs(
|
|
1322
1387
|
file_name=file_name,
|
1323
1388
|
)
|
1324
1389
|
|
1325
|
-
if save or not response or "
|
1390
|
+
if save or not response or "logs" not in response:
|
1326
1391
|
break
|
1327
1392
|
|
1328
1393
|
if follow:
|
1329
|
-
if (response["stepRunStatus"] != "Running") and (
|
1394
|
+
if (is_spoke_tenant or response["stepRunStatus"] != "Running") and (
|
1330
1395
|
response["logs"] is None or len(response["logs"]) == 0
|
1331
1396
|
):
|
1332
1397
|
break
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -303,3 +303,17 @@ def search_action(current_path: str, current_dict: Dict[str, Any], action: str)
|
|
303
303
|
return {"has_permission": has_permission, "deeper_levels": False}
|
304
304
|
|
305
305
|
return {"has_permission": False, "deeper_levels": True}
|
306
|
+
|
307
|
+
|
308
|
+
def safe_json(response: requests.Response) -> Optional[Any]:
|
309
|
+
"""Safely attempts to decode JSON from the given response.
|
310
|
+
|
311
|
+
Returns the decoded JSON if available; otherwise, returns None.
|
312
|
+
"""
|
313
|
+
headers = getattr(response, "headers", {})
|
314
|
+
if headers.get("Content-Type", "").startswith("application/json"):
|
315
|
+
try:
|
316
|
+
return response.json()
|
317
|
+
except (ValueError, json.JSONDecodeError):
|
318
|
+
return None
|
319
|
+
return None
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# # Copyright ©
|
2
|
+
# # Copyright © 2025 Peak AI Limited. or its affiliates. All Rights Reserved.
|
3
3
|
# #
|
4
4
|
# # Licensed under the Apache License, Version 2.0 (the "License"). You
|
5
5
|
# # may not use this file except in compliance with the License. A copy of
|