Skip to main content

Plugin SDK for Python for the Arcaflow workflow engine

Project description

Python SDK for the Arcaflow workflow engine (WIP)

How this SDK works

In order to create an Arcaflow plugin, you must specify a schema for each step you want to support. This schema describes two things:

  1. What your input parameters are and what their type is
  2. What your output parameters are and what their type is

Note, that you can specify several possible outputs, depending on what the outcome of your plugin execution is. You should, however, never raise exceptions that bubble outside your plugin. If you do, your plugin will crash and Arcaflow will not be able to retrieve the result data, including the error, from it.

With the schema, the plugin can run in the following modes:

  1. CLI mode, where a file with the data is loaded and the plugin is executed
  2. GRPC mode (under development) where the plugin works in conjunction with the Arcaflow Engine to enable more complex workflows

For a detailed description please see the Arcalot website.


Requirements

In order to use this SDK you need at least Python 3.9.


Run the example plugin

In order to run the example plugin run the following steps:

  1. Checkout this repository
  2. Create a venv in the current directory with python3 -m venv $(pwd)/venv
  3. Activate the venv by running source venv/bin/activate
  4. Run pip install -r requirements.txt
  5. Run ./example_plugin.py -f example.yaml

This should result in the following placeholder result being printed:

output_id: success
output_data:
  message: Hello, Arca Lot!

Generating a JSON schema file

Arcaflow plugins can generate their own JSON schema for both the input and the output schema. You can run the schema generation by calling:

./example_plugin.py --json-schema input
./example_plugin.py --json-schema output

If your plugin defines more than one step, you may need to pass the --step parameter.

Note: The Arcaflow schema system supports a few features that cannot be represented in JSON schema. The generated schema is for editor integration only.

Generating documentation

  1. Checkout this repository
  2. Create a venv in the current directory with python3 -m venv $(pwd)/venv
  3. Activate the venv by running source venv/bin/activate
  4. Run pip install -r requirements.txt
  5. Run pip install sphinx
  6. Run pip install sphinx-rtd-theme
  7. Run sphinx-apidoc -o docs/ -f -a -e src/ --doc-project "Python SDK for Arcaflow"
  8. Run make -C docs html

Developing your plugin

We have a detailed guide on developing Python plugins on the Arcalot website.

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

arcaflow_plugin_sdk-0.11.0.tar.gz (54.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

arcaflow_plugin_sdk-0.11.0-py3-none-any.whl (57.7 kB view details)

Uploaded Python 3

File details

Details for the file arcaflow_plugin_sdk-0.11.0.tar.gz.

File metadata

  • Download URL: arcaflow_plugin_sdk-0.11.0.tar.gz
  • Upload date:
  • Size: 54.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for arcaflow_plugin_sdk-0.11.0.tar.gz
Algorithm Hash digest
SHA256 3a49a85037b88f5f4ed6b51c9a78428f6bbb57e47022484185721faf2c853535
MD5 ac3f9d14e79e720f3a8154d0e50c3b1d
BLAKE2b-256 da22aa72ab0aa8ee249d4347414c6defabc5e7029aee071196b7fc47de5d6028

See more details on using hashes here.

File details

Details for the file arcaflow_plugin_sdk-0.11.0-py3-none-any.whl.

File metadata

File hashes

Hashes for arcaflow_plugin_sdk-0.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c481c1fdfc51f2c056c73a0e016f04617813eda03f0debf1e5bc43b22b045e6f
MD5 1f043f78c62e81771b3d017d76245920
BLAKE2b-256 4078d0b3d405426ca1f817d7fad0039b6dde37ce1cf45a481fdf3d1e6434e79f

See more details on using hashes here.

Supported by

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