Digital.ai Release API Stubs
Project description
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.
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_api_stubs-25.1.0b1.tar.gz.
File metadata
- Download URL: digitalai_release_api_stubs-25.1.0b1.tar.gz
- Upload date:
- Size: 151.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4df715f97a19490ae897cd0b42ca835f6c89f53cf75d482b745b16db0bdc848
|
|
| MD5 |
59e917e93c31cef423ceb115487abf53
|
|
| BLAKE2b-256 |
2c06850a9ad4bcb3d9087d8249806450e2f9b398f4bdc4c219d70e03eb36db7e
|
File details
Details for the file digitalai_release_api_stubs-25.1.0b1-py3-none-any.whl.
File metadata
- Download URL: digitalai_release_api_stubs-25.1.0b1-py3-none-any.whl
- Upload date:
- Size: 477.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ecbc0d54a5a33d77283e929910ae3286a222b1a08cb69369c45cec9efd352253
|
|
| MD5 |
4d42935964222e5c08d92cba374413c8
|
|
| BLAKE2b-256 |
fb552e4b800534aea2a96250156934764dade69af3e405775249e80460341e4c
|