Digital.ai Release Python SDK
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.
Features
- 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.
Installation
Install the SDK using pip:
pip install digitalai-release-sdk
Note: The SDK depends on
digitalai-release-api-client, which is installed automatically.
Getting Started
Example Task: hello.py
The following example demonstrates how to create a simple task using the SDK:
from digitalai.release.integration import BaseTask
class Hello(BaseTask):
def execute(self) -> None:
# Get the name from the input
name = self.input_properties.get('yourName')
if not name:
raise ValueError("The 'yourName' field cannot be empty")
# Create greeting message
greeting = f"Hello {name}"
# Add greeting to the task's comment section in the UI
self.add_comment(greeting)
# Store greeting as an output property
self.set_output_property('greeting', greeting)
Example Task using the Release API: ApiBaseTask
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:
from digitalai.release.integration.api_base_task import ApiBaseTask
class ShowVersion(ApiBaseTask):
def execute(self) -> None:
release = self.releaseApi.getRelease(self.get_release_id())
self.add_comment(f"Working on {release.title}")
🔗 Related Resources
-
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.
Changelog
Version 26.3.1
🛠️ Enhancements
get_release_api_client()now treats a password supplied without a username as a personal access token, so token-only credentials authenticate without extra configuration.- Simplified credential validation in
BaseTask, giving a single consistent error when the server URL, username, or password is missing.
📦 Dependencies
- Requires
digitalai-release-api-client26.3.1.
Version 26.3.0
🚀 Features
- 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.
🛠️ Enhancements
- Improved stability and error handling for API requests and Kubernetes tasks.
Metadata
Release files for digitalai_release_sdk 26.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| digitalai_release_sdk-26.3.1.tar.gz | 20.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| digitalai_release_sdk-26.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 46.3 kB
Release files / digitalai_release_sdk-26.3.1.tar.gz
| Download URL | digitalai_release_sdk-26.3.1.tar.gz |
|---|---|
| Size | 20.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bda553d17bcfe066834edb6b535cd8337774898db6f8e3b8aaed83c2c177e201
|
|
BLAKE2b-256 checksum How to use checksums |
438d81dcf298e311e6e762ac26947c43bcfe3c6b855a1019aa4d599be22580bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.5
|
Release files / digitalai_release_sdk-26.3.1-py3-none-any.whl
| Download URL | digitalai_release_sdk-26.3.1-py3-none-any.whl |
|---|---|
| Size | 25.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
133f2066810079ddbd83e76f2614571b7eaf6b8ae61ee226602eb33602336adb
|
|
BLAKE2b-256 checksum How to use checksums |
f3d57d995ce9a94208f05413fdb281f1a9e37407b44196dd196dcb2236c8767a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.5
|