A Python DSL for AWS Step Functions
Project description
Steppy Graph - An alpha-quality DSL for Step Functions
Example Usage:
s = StateMachine()
res = Resource(name="foores", type=ResourceType.LAMBDA)
s.next(Task(resource=res, name="Kermit", comment='Foo'))
s.next(Wait(name="Waiting time", comment='Foo', seconds=2))
s.next(Pass(name="Pass the buck"))
s.next(Task(resource=res, name="Miss Piggy", comment='Foo'))
s.build()
print(s.to_json())
should produce output similar to:
{
"StartAt": "Kermit",
"States": {
"Kermit": {
"Comment": "Foo",
"End": false,
"Next": "Waiting time",
"Resource": "arn:aws:lambda:::function:foores",
"TimeoutSeconds": 600,
"Type": "Task"
},
"Miss Piggy": {
"Comment": "Foo",
"End": true,
"Resource": "arn:aws:lambda:::function:foores",
"TimeoutSeconds": 600,
"Type": "Task"
},
"Pass the buck": {
"Comment": "",
"End": false,
"Next": "Miss Piggy",
"Type": "Pass"
},
"Waiting time": {
"Comment": "Foo",
"End": false,
"Next": "Pass the buck",
"Seconds": 2,
"Type": "Wait"
}
},
"TimeoutSeconds": 600
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
steppygraph-0.1.1.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for steppygraph-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 495f3106b615ab8f29a1ab9c5faa2110f8cef50bef4bea1091e6da01f267260d |
|
MD5 | 14e830f14e011b6fac0a5d868d7204b7 |
|
BLAKE2b-256 | 2c2ddf58e3d8f70293b525cb027a6d9627f47eeb2289a2799a30b789644e6143 |