Last updated:
0 purchases
awsstepfunctionspydantic 0.0.4
aws-step-functions-pydantic
Pydantic models for AWS step functions
Usage
From Step Function ARN
Use the from_arn() class constructor
from aws_sfn_pydantic import StateMachine
sfn = StateMachine.from_arn(state_machine_arn="...")
From JSON
Use the model_validate_json() class constructor (Pydantic v2 builtin)
from aws_sfn_pydantic import StateMachine
sfn = StateMachine.model_validate_json("...")
To YAML
Use the to_yaml() class constructor, which accepts:
indent (default: 2)
level (default: 0)
print(sfn.model_to_yaml())
Requires
Python 3.10+
Installation
pip install aws-step-functions-pydantic
aws-step-functions-pydantic is available from PyPI, and
the code is on GitHub
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.