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.2
🚀 Features
- Tasks can be aborted. On abort, the SDK calls the task's
abort()method; long-running tasks can checkis_abort_requested()and stop early. - After an abort, the SDK waits briefly (
ABORT_GRACE_PERIOD_SECONDS, default 3) so the task's outputs and reporting records are still sent. - Added the
AiUsageRecordreporting record for AI agent runs (model, tokens, cost and more). Requires a Release version that supportsudm.AiUsageRecord.
🐛 Fixes
- The task result is no longer cut off if an abort signal arrives while it is being reported.
- Aborted tasks no longer report exit code 0;
sys.exit(n)now reports exit coden. - Tasks that don't call
super().__init__()work again. - A reused executor pod no longer runs its last task again when it is shut down after being idle. Each task now runs only once.
- Shutting down an idle executor no longer calls
abort()on the task that already finished. setReleaseVariable(),setFolderVariable()andsetGlobalVariable()now accept a list for list variables.
Metadata
Release files for digitalai_release_sdk 26.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| digitalai_release_sdk-26.3.2.tar.gz | 28.7 kB | Without provenance | Details for digitalai_release_sdk-26.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| digitalai_release_sdk-26.3.2-py3-none-any.whl | Python 3 | none | any | Details for digitalai_release_sdk-26.3.2-py3-none-any.whl |
Total release size: 63.2 kB
Release files / digitalai_release_sdk-26.3.2.tar.gz
| Download URL | digitalai_release_sdk-26.3.2.tar.gz |
|---|---|
| Size | 28.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
73fba3d5f4dfab852020d1d2d2c80e38413c5179223cb3eed9cf87ddc4f177a2
|
|
BLAKE2b-256 checksum How to use checksums |
528aaf4caa0275a554820a0a538ddced33c7dde0a31de2a7082537a61dc5e24f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.5
|
Release files / digitalai_release_sdk-26.3.2-py3-none-any.whl
| Download URL | digitalai_release_sdk-26.3.2-py3-none-any.whl |
|---|---|
| Size | 34.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7257e07db83bc0b256ad8a0bc7527d58d6d9bb3642323500941b29612d80d5a2
|
|
BLAKE2b-256 checksum How to use checksums |
87478558ea9194a410aeb1557ef56529afc91989b6fa0891f08b479e1402007e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.5
|
Security for digitalai_release_sdk 26.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.