Digital.ai Release Python API Stubs
The Digital.ai Release Python API Stubs (digitalai-release-api-stubs) provide Python stubs for interacting with the Digital.ai Release REST API.
These stubs are generated using the OpenAPI Generator.
Note: Previously, these stubs were included as part of the digitalai-release-sdk version 24.1.0. They are now distributed as a separate package.
⚠️ WARNING:
This project generates stubs for the Digital.ai Release 23.3.0 API and is no longer being maintained.
📦 Installation
Install the package using pip:
pip install digitalai-release-api-stubs
🚀 Getting Started
Example Task: message.py
The example below demonstrates how to create a simple task that sets a system message in the Release UI using the API stubs.
from digitalai.release.integration import BaseTask
from digitalai.release.v1.api_client import ApiClient
from digitalai.release.v1.configuration import Configuration
from digitalai.release.v1.api.configuration_api import ConfigurationApi
from digitalai.release.v1.model.system_message_settings import SystemMessageSettings
class SetSystemMessage(BaseTask):
"""
Sets the system message in the Release UI by invoking the API.
Preconditions:
- The 'Run as user' property must be set on the release.
- The executing user should have valid credentials.
"""
def execute(self) -> None:
# Get the message from the input properties
message = self.input_properties['message']
# Create a configuration object
configuration = Configuration(
host=self.get_release_server_url(),
username=self.get_task_user().username,
password=self.get_task_user().password)
# Instantiate the API client using the configuration above
apiclient = ApiClient(configuration)
# Create a client for the Configuration API using the API client
configuration_api = ConfigurationApi(apiclient)
# Prepare the system message payload with required fields
system_message = SystemMessageSettings(
type='xlrelease.SystemMessageSettings',
id='Configuration/settings/SystemMessageSettings',
message=message,
enabled=True,
automated=False
)
# Make the actual rest call to the designated endpoint
configuration_api.update_system_message(system_message_settings=system_message)
# Add a line to the comment section in the UI
self.add_comment(f"System message updated to \"{message}\"")
🔁 Upgrading from digitalai-release-sdk 24.1.0 or 23.3.0 to 25.1.0
With the release of digitalai-release-sdk 25.1.0, the API stubs have been separated into a standalone package.
To upgrade your project, follow these steps:
Step 1: Install the API Stubs Package
You must explicitly install the new API stubs package:
pip install digitalai-release-api-stubs==25.1.0
Or, add it to your requirements.txt as needed.
Step 2: Update Your Code
In previous versions, API clients were created like this:
# Old code (pre-25.1.0)
configuration_api = ConfigurationApi(self.get_default_api_client())
In version 25.1.0, use the following approach:
# New code (25.1.0)
# Create a configuration object
configuration = Configuration(
host=self.get_release_server_url(),
username=self.get_task_user().username,
password=self.get_task_user().password
)
# Instantiate the API client using the configuration
apiclient = ApiClient(configuration)
# Create the Configuration API client
configuration_api = ConfigurationApi(apiclient)
This pattern should be used for all API clients, such as TemplateApi, TaskApi, etc.
🔗 Related Resources
-
🧪 Python Template Project: release-integration-template-python
A starting point for building custom integrations using Digital.ai Release and Python. -
📦 Digital.ai Release Python SDK: digitalai-release-sdk on PyPI
The official SDK package for integrating with Digital.ai Release.
Metadata
Release files for digitalai-release-api-stubs 25.1.0
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_api_stubs-25.1.0.tar.gz | 151.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| digitalai_release_api_stubs-25.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 629.1 kB
Release files / digitalai_release_api_stubs-25.1.0.tar.gz
| Download URL | digitalai_release_api_stubs-25.1.0.tar.gz |
|---|---|
| Size | 151.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f0abc3f4fd7abefe3aecf91e8bcd423d58294a7ec18f59638233f4dc20df8581
|
|
BLAKE2b-256 checksum How to use checksums |
2e3832768164295611ac2e223cd28e35a5a0176b9d780d3cf6a63a96cc71831d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / digitalai_release_api_stubs-25.1.0-py3-none-any.whl
| Download URL | digitalai_release_api_stubs-25.1.0-py3-none-any.whl |
|---|---|
| Size | 477.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a422620431316632245e5e1e1dbe05a019f11ea370cfbaa659eb0ab63cf16df7
|
|
BLAKE2b-256 checksum How to use checksums |
1c74981aef55b2576e378ef450ab9b71d7a9185e2a1c4a83d051e86691e6a81b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|