Digital.ai Release SDK
Project description
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.0 (Beta)
🚀 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file digitalai_release_sdk-26.3.0b4.tar.gz.
File metadata
- Download URL: digitalai_release_sdk-26.3.0b4.tar.gz
- Upload date:
- Size: 16.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70efa00925ae951026ad04058d2228d014a0cd827a736694fe70c24e7b2e7f3d
|
|
| MD5 |
5b662cff3061dbbcd0dbfd594f796565
|
|
| BLAKE2b-256 |
5c0246b4d6186a90d5345e58f2fedcda6b02237e446b1e23659ce31240af5fa3
|
File details
Details for the file digitalai_release_sdk-26.3.0b4-py3-none-any.whl.
File metadata
- Download URL: digitalai_release_sdk-26.3.0b4-py3-none-any.whl
- Upload date:
- Size: 22.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f8f7a66ea8cdf78fcb289106747131c5d2efa9d6336904bb7257e76086fecde
|
|
| MD5 |
0d76408a9d8bc6c43d0733db209fe7d5
|
|
| BLAKE2b-256 |
81d070c1f1f0c947845edcacb64a09b25b14939e8b7974ae389c9dcd655fcaab
|