Skip to main content

Python engine for Amazon States Language (ASL) specification that supports parsing and serialization of definitions, and a local interpreter to run them.

Project description

pyaslengine

Python engine for Amazon States Language (ASL) specification that supports parsing and serialization of definitions, and a local interpreter to run them.

Installation

Development

git clone https://github.com/ghukill/pyaslengine
make install

Use in Existing Project

pip install pyaslengine

Examples

Load simple StateMachine definition from local JSON file

import logging

from pyaslengine.data import WorkflowInput
from pyaslengine.workflows import StateMachine

# turn on debug logging
logging.getLogger('pyaslengine').setLevel(logging.DEBUG)

# initialize a state machine by reading a local JSON file
sm = StateMachine.load_definition_file("tests/fixtures/state_machines/do_nothing.json")

# run the state machine by passing an initial payload
results = sm.run(
    workflow_input=WorkflowInput(data={"msg": "in a bottle"})
)
# Out[6]: WorkflowOutput(data={'msg': 'in a bottle'}, context=None)

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

pyaslengine-0.8.0.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

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

pyaslengine-0.8.0-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file pyaslengine-0.8.0.tar.gz.

File metadata

  • Download URL: pyaslengine-0.8.0.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.4 Darwin/23.2.0

File hashes

Hashes for pyaslengine-0.8.0.tar.gz
Algorithm Hash digest
SHA256 664036cee5cdd3a6f96f65770d5925cdf31f8d53ff8bbe7fdf753360077721ad
MD5 86524391010c01c00772265db5636812
BLAKE2b-256 dd7237a4f82e1ecf7f1c9728c6afc2d4ffada31b9d75e056db828846e8915f25

See more details on using hashes here.

File details

Details for the file pyaslengine-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: pyaslengine-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 21.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.4 Darwin/23.2.0

File hashes

Hashes for pyaslengine-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd7f2fcee2ff04a2e081c6cad594f3dd99481f36c8062d87f453c2ddef161986
MD5 2c5297e2f4b4d5307ed123af5dff8aa5
BLAKE2b-256 1c0bcf2e8754e56abcdde8cc009a67641793d17a6c2c52c4f07a3cc0f923a54d

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