Skip to main content

Digital.ai Release SDK

Project description

Digital.ai Release SDK

The Digital.ai Release Python SDK (digitalai-release-sdk) is a set of tools that developers can use to create container-based tasks.

Developers can use the BaseTask abstract class as a starting point to define their custom tasks and take advantage of the other methods and attributes provided by the SDK to interact with the task execution environment.

Installation

pip install digitalai-release-sdk

Task Example: hello.py

from digitalai.release.integration import BaseTask

class Hello(BaseTask):
    
    def execute(self) -> None:

        # Get the name from the input
        name = self.input_properties['yourName']
        if not name:
            raise ValueError("The 'yourName' field cannot be empty")

        # Create greeting
        greeting = f"Hello {name}"

        # Add greeting to the task's comment section in the UI
        self.add_comment(greeting)

        # Put greeting in the output of the task
        self.set_output_property('greeting', greeting)

Documentation

Read more about Digital.ai Release Python SDK here

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

digitalai_release_sdk-24.1.0.tar.gz (158.2 kB view hashes)

Uploaded Source

Built Distribution

digitalai_release_sdk-24.1.0-py3-none-any.whl (488.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page