https://github.com/taro-kayo/statelint
A PyPI package providing a validator for Amazon States Language JSON/YAML files.
https://github.com/taro-kayo/statelint
aws cli pypi python step-functions validator
Last synced: 3 months ago
JSON representation
A PyPI package providing a validator for Amazon States Language JSON/YAML files.
- Host: GitHub
- URL: https://github.com/taro-kayo/statelint
- Owner: taro-kayo
- License: apache-2.0
- Created: 2022-03-04T13:41:56.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2026-03-23T05:52:17.000Z (3 months ago)
- Last Synced: 2026-03-28T00:58:05.902Z (3 months ago)
- Topics: aws, cli, pypi, python, step-functions, validator
- Language: Python
- Homepage:
- Size: 355 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# statelint
[](https://pepy.tech/project/statelint)
A PyPI package providing a validator for [Amazon States Language](https://states-language.net/spec.html) JSON/YAML files.
This package is based on Amazon Web Services Labs' [awslabs/statelint](https://github.com/awslabs/statelint).
## Installation
```shell
pip install statelint
```
## Usage
```shell
statelint fancy-state-machine-spec.json
```
If you prefer YAML, you need to install [PyYaml](https://pypi.org/project/PyYAML/).
```shell
pip install PyYAML
```
Then, run command with a `--yaml` parameter.
```shell
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.
```shell
statelint --ignore=FLOAT fancy-state-machine-spec.json
```
If your `Resource` doesn't contain URI string,
pass a `--ignore=URI` parameter.
```shell
statelint --ignore=URI fancy-state-machine-spec.json
```
You can pass both parameters at the same time.
```shell
statelint --ignore=FLOAT,URI fancy-state-machine-spec.json
```
## 🚀 JSONata Evaluation (Experimental)
If you are using [JSONata](https://docs.aws.amazon.com/step-functions/latest/dg/transforming-data.html), 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](https://github.com/rayokota/jsonata-python):
```shell
pip install jsonata-python
```
### Usage Example:
```shell
statelint --eval-jsonata fancy-state-machine-spec.json
```