Skip to main content

Stax.ai CX Automation SDK

Project description

Stax.ai CX Automation SDK

This project is created and maintained by Stax.ai, Inc.. This is proprietary to Stax.ai, Inc. Unauthorized use, copy, license, or modification of this project and all associated source code is strictly prohibited.

About

...coming soon...

Installation

pip install stax_cx_automation_sdk

Usage

Create a Stax.ai automation

Do this by creating a database entry manually that matches the schema for Automation.

Write your automation app

import os
from stax_cx_automation_sdk import def_automation

# This is the `_id` of the automation from the DB and the token user for cross-internal system communication
@def_automation(os.getenv('AUTOMATION_ID'), os.getenv('INTERNAL_KEY'))
def app(team:str, task:str, project:str, config:list[dict]):
    '''
    Your custom automation app. Is provided the following arguments:
    - team [str]: Team ID string
    - task [str]: Task ID string
    - project [str]: Project ID string
    - config [list[dict]]: Pipeline configuration for automation

    Return an optional string representing the message to log.
    If there is an error, raise an exception with a nice human-readable error message to show up on the log.
    '''

    # Put your automation functionality here
    # ...

    # Raise an exception to stop the pipeline and flag the task
    raise Exception("Oops, something went wrong!")

    return "The required action has been completed" # Replace this with something more relevant, for example: 'Email sent to: naru@stax.ai'

### Testing your automation

To test your automation, simply comment out the `@def_automation` line and call the `app` function with the appropriate input arguments.

### Deploy your automation

Deploy your automation to the functions service to get a URL for the automation. Set this URL as the `url` property in the DB for the automation.

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

stax_cx_automation_sdk-0.0.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

stax_cx_automation_sdk-0.0.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file stax_cx_automation_sdk-0.0.1.tar.gz.

File metadata

  • Download URL: stax_cx_automation_sdk-0.0.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.31.0 rfc3986/1.5.0 tqdm/4.66.1 urllib3/1.26.5 CPython/3.10.12

File hashes

Hashes for stax_cx_automation_sdk-0.0.1.tar.gz
Algorithm Hash digest
SHA256 86ea8df0fb31c516306d9c8812ea2692c9f7cd7514271f0ee974a2559d9124ae
MD5 7d1b0e96945537de869880e48a374d86
BLAKE2b-256 d7f705dc49f641e1c69f53cde3b204dcbb5264d89c97d9294b8503de8260c528

See more details on using hashes here.

File details

Details for the file stax_cx_automation_sdk-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: stax_cx_automation_sdk-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.31.0 rfc3986/1.5.0 tqdm/4.66.1 urllib3/1.26.5 CPython/3.10.12

File hashes

Hashes for stax_cx_automation_sdk-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 764b6bc79ae15f093c1201680185210cebe900dcb2136474d10033779c5cfe26
MD5 44483658910ad08a50e9ed68b9bb6d22
BLAKE2b-256 fb9a9bf130c75fa481a9472e845ec487c7ac97a44384fc934f3c29592555042c

See more details on using hashes here.

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