Skip to main content

Pydantic models for AWS step functions

Project description

aws-step-functions-pydantic

CI Status Coverage Checked with mypy Code style: black

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

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

aws-step-functions-pydantic-0.0.4.tar.gz (15.6 kB view hashes)

Uploaded Source

Built Distribution

Supported by

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