Skip to main content

command-line validator for Amazon States Language

Project description

statelint

Actions Status Coverage Status License: Apache License 2.0 PyPI Downloads

A PyPI package providing a validator for Amazon States Language JSON/YAML files.

This package is based on Amazon Web Services Labs' awslabs/statelint.

Installation

pip install statelint

Usage

statelint fancy-state-machine-spec.json

If you prefer YAML, you need to install PyYaml.

pip install PyYAML

Then, run command with a --yaml parameter.

statelint --yaml fancy-state-machine-spec.yaml

If you don't like to be complained that BackoffRate doesn't end with ".0", pass a --ignore=FLOAT parameter.

statelint --ignore=FLOAT fancy-state-machine-spec.json

If your Resource doesn't contain URI string, pass a --ignore=URI parameter.

statelint --ignore=URI fancy-state-machine-spec.json

You can pass both parameters at the same time.

statelint --ignore=FLOAT,URI fancy-state-machine-spec.json

🚀 JSONata Evaluation (Experimental)

If you are using JSONata, you may be able to reduce false positives by passing the --eval-jsonata flag.

This feature is currently experimental (and might just stay that way 😉).

However, this library only references variables assigned in the "Assign" field (i.e., $states is not supported) and does not support the JSONata format within the "Assign" field itself.

To use this feature, you must install jsonata-python:

pip install jsonata-python

Usage Example:

statelint --eval-jsonata fancy-state-machine-spec.json

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

statelint-3.1.0.tar.gz (34.7 kB view details)

Uploaded Source

Built Distribution

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

statelint-3.1.0-py2.py3-none-any.whl (39.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file statelint-3.1.0.tar.gz.

File metadata

  • Download URL: statelint-3.1.0.tar.gz
  • Upload date:
  • Size: 34.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for statelint-3.1.0.tar.gz
Algorithm Hash digest
SHA256 18b6b3a6dbc3e5f87e4feb9441d39bb8c3772960b8b9736a5f34a3f9efa1df2c
MD5 6f55968bc99eb8bb5f2e22c40c023e6e
BLAKE2b-256 b863e7bf9ebc1dcb48f077accdd317ef710c9e12aa12de0552afc52faf36ee51

See more details on using hashes here.

Provenance

The following attestation bundles were made for statelint-3.1.0.tar.gz:

Publisher: python-publish.yml on taro-kayo/statelint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file statelint-3.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: statelint-3.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 39.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for statelint-3.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 62e9df47da24284f1136441f72139b233ffcd8a37442b829448c50af2b64afa6
MD5 97f6158fcc2c1a7402049d46a8fabfad
BLAKE2b-256 4a93d8a1e27a0e992adca7e5f7642008249d6bfecb44acc4c89c3446684873c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for statelint-3.1.0-py2.py3-none-any.whl:

Publisher: python-publish.yml on taro-kayo/statelint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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