The Digital.ai Release Python SDK (digitalai-release-sdk) provides a set of tools for developers to create container-based integration with Digital.ai Release. It simplifies integration creation by offering built-in functions to interact with the execution environment.
- Define custom tasks using the
BaseTaskabstract class. - Subclass
ApiBaseTaskto access the Release APIs (releaseApi,phaseApi,taskApi, ...) through a ready-to-use client. - Easily manage input and output properties.
- Interact with the Digital.ai Release environment seamlessly.
Install the SDK using pip:
pip install digitalai-release-sdkNote: The SDK depends on
digitalai-release-api-client, which is installed automatically.
The following example demonstrates how to create a simple task using the SDK:
fromdigitalai.release.integrationimportBaseTaskclassHello(BaseTask):
defexecute(self) ->None:
# Get the name from the inputname=self.input_properties.get('yourName')
ifnotname:
raiseValueError("The 'yourName' field cannot be empty")
# Create greeting messagegreeting=f"Hello {name}"# Add greeting to the task's comment section in the UIself.add_comment(greeting)
# Store greeting as an output propertyself.set_output_property('greeting', greeting)Subclass ApiBaseTask to call the Release v1 REST API without building a client
yourself. Every API is exposed as a lazily created, cached property, all sharing
a single client built from the task's "Run as user" context:
fromdigitalai.release.integration.api_base_taskimportApiBaseTaskclassShowVersion(ApiBaseTask):
defexecute(self) ->None:
release=self.releaseApi.getRelease(self.get_release_id())
self.add_comment(f"Working on {release.title}")Digital.ai Python SDK Documentation:
Comprehensive guide to using the Python SDK and building custom tasks.SDK Template Project for integration plugins:
A starting point for building custom integrations using Digital.ai Release and Python.Digital.ai Release Python SDK: The official SDK package for integrating with Digital.ai Release on Pypi.
- Added the
ApiBaseTaskbase class, exposing every Release v1 API as a lazily created, cached property. get_release_api_client()now supports optional credentials/server URL andrequestslibrary arguments.- Added
get_phase_id()andget_folder_id()helper methods toBaseTask.
- Improved stability and error handling for API requests and Kubernetes tasks.