Step Function Validator for e.g. (AWS)
An issue we have is that we are quite human and we often make mistakes in the YAML "code".
These could be syntactical errors (for example, an incorrect indent), but also semantical (for example, forgetting to add a required parameter to a step).
We only find out about these errors in the last step of the CI/CD, when the step function fails to deploy to AWS. This makes troubleshooting very.. slow...
So we came up with this little tool.
Authors
Installation
- create virtual environment in python and activate this one in Terminal or CMD
python3 -m venv env
Windows:
env\Script\activate.bat
Mac/Linux:
source env/bin/activate
- pip install the tool via pypi
####################### [ NOTE !!! ] ############################################################
# you NEED to see in your command line the env before your prompt
# so you know that you are in your virtual environment:
#
# example: (env) niels@Mac%
################################################################################################
if above is clear then:
pip install stepfunction-validator or pip3 install stepfunction-validator # to install the required libraries and the tool
Usage/Examples
stepfunction_validator.exe [-s test.yaml] [-j <stepfunctions_schema.json>] [--no-lint]
This will validate a YAML file against the schema you provided in the CLI. If the -c parameter is omitted, the script runs against every .yml file it can find in the current working directory. A default schema for AWS stepfunctions is included, but an overriding schema can be passed with the -j parameters. Skip linting with "--no-lint". If any linting, syntax or schema errors are found an exit code 1 will be returned with a list of errors found. Example output:
.\test\step_function_invalid.yml:1:missing document start "---" (document-start)
.\test\step_function_invalid.yml:1:no new line character at the end of file (new-line-at-end-of-file)
.\test\step_function_invalid.yml:'Pass' is not one of ['Choice']. Failed validating enum in deque([0, 'properties', 'Type', 'enum']): {'type': 'string', 'enum': ['Choice']}
Metadata
Release files for stepfunction-validator 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| stepfunction_validator-0.0.5.tar.gz | 11.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| stepfunction_validator-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.2 kB
Release files / stepfunction_validator-0.0.5.tar.gz
| Download URL | stepfunction_validator-0.0.5.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
72d299487c45b0a6214f4969031c5f1d05e85e005bec1dc616ca3bd9d4f703e1
|
|
BLAKE2b-256 checksum How to use checksums |
e757747d724ff23210852ec38caa8430e46ec69105c313dcfde49a70c78b962e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.1
|
Release files / stepfunction_validator-0.0.5-py3-none-any.whl
| Download URL | stepfunction_validator-0.0.5-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
295de89a3f2af2884c0e8cbf64632babf81d4d4348cb8b45b50ac72fddca86e9
|
|
BLAKE2b-256 checksum How to use checksums |
67996360b66319b71e6771ae942ad8a676aa529b7c707079f4b887bf33a44c76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.1
|
Security for stepfunction-validator 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.