No project description provided
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.0.1.tar.gz
(15.4 kB
view hashes)
Built Distribution
Close
Hashes for pyaslengine-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4243c8f4be50c82eb19ab68d244b9c706fbd4b5e3c4f528ad3c6142bc568ea40 |
|
MD5 | 91ce963407a6a7771d1bef4dd51cd198 |
|
BLAKE2b-256 | d68a5be02c9bade3f070168cc0c37df43363a3c228aefb336f00e6728b6929f5 |