https://github.com/awslabs/workflow-data-structure-utilities

Utilities which assist in manipulating data structures in workflow systems

https://github.com/awslabs/workflow-data-structure-utilities

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.8%) to scientific vocabulary

Keywords

aws lambda lambda-functions sfn step-functions
Last synced: 6 months ago · JSON representation

Repository

Utilities which assist in manipulating data structures in workflow systems

Basic Info
  • Host: GitHub
  • Owner: awslabs
  • License: mit-0
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 4.88 KB
Statistics
  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
aws lambda lambda-functions sfn step-functions
Created almost 2 years ago · Last pushed almost 2 years ago
Metadata Files
Readme Contributing License Code of conduct

README.md

Workflow Data Structure Utilities

Getting started

This repo contains utilities which assist in manipulating data structures in workflow systems. To be used along other workflow system capabilities, these Lambdas augment low-friction configuration and allow for focusing on implementation details. Based on experience building hundreds of workflows, these are the most useful and commonly-needed functions. They are all pure Python with an average of 99% coverage:

| Function | Description | Sample Payload | Response | |---------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|------------------------| | ensure-list | Takes an item which may be a list, and wraps it in a list if it is not. Otherwise, returned as-is; useful for Map operations over data with structures you can't control. | {"parameters": {"data": "a"}} | ["a"] | | find-and-replace | Implements string substitution, using a needle, haystack, and replacement. | {"parameters": {"needle":"foobar", "haystack": "foo", "replacement": "-"}} | {"value": "-bar"} | | merge-list-of-dicts | Takes a list of dictionaries (commonly, results from a Map or Parallel operation) and combines them into a single dictionary. | {"parameters": {"data": [{"a": "b"}, {"c": "d"}]}} | {"a": "b", "c": "d"} |

Testing

Once you have cloned this repository, you will need Coverage and pytest installed. You can then run the run_all_tests.sh script to have tests executed for you, or check Gitlab.

shell pip install coverage pytest ./run_all_tests.sh

Usage

Simply copy the relevant functions into your project and use the Lambda build method of your choice. Being pure Python, most build/deploy methods should work out of the box.

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

Owner

  • Name: Amazon Web Services - Labs
  • Login: awslabs
  • Kind: organization
  • Location: Seattle, WA

AWS Labs

GitHub Events

Total
Last Year