semvec/pypi-packages huggingface dataset:
aws-sfn-builder 0.0.10
AWS Step Functions: state machine boilerplate generator
License: MIT
Requires Python: >=3.6.0
Keywords: aws,asl,sfn,step functions,state machine,boilerplate

===============
aws-sfn-builder
===============

AWS Step Functions State Machine builder.

The primary motivation for this was the amount of boilerplate (``Next``, ``End``) required to compose a valid
state machine definition, but soon one got carried away.

Python 3.6+ only.

Installation
------------

.. code-block:: shell

    pip install aws-sfn-builder


Generate State Machine Definition from Simple Description
---------------------------------------------------------

.. code-block:: python

    from aws_sfn_builder import Machine

    Machine.parse([
        "a",
        [
            ["b-10", "b-11"],
            ["b-20"],
        ],
        "c",
    ]).to_json()

This will generate:

.. code-block:: json

    {
        "StartAt": "a",
        "States": {
            "a": {
                "Type": "Task",
                "Next": "d3d52323-137d-4228-9956-d3b77cc43a92"
            },
            "d3d52323-137d-4228-9956-d3b77cc43a92": {
                "Type": "Parallel",
                "Next": "c",
                "Branches": [
                    {
                        "StartAt": "b-10",
                        "States": {
                            "b-10": {
                                "Type": "Task",
                                "Next": "b-11"
                            },
                            "b-11": {
                                "Type": "Task",
                                "End": true
                            }
                        }
                    },
                    {
                        "StartAt": "b-20",
                        "States": {
                            "b-20": {
                                "Type": "Task",
                                "End": true
                            }
                        }
                    }
                ]
            },
            "c": {
                "Type": "Task",
                "End": true
            }
        }
    }

Parse Existing State Machine Definition
---------------------------------------

.. code-block:: python

    # TODO load state_machine_json_dict

    state_machine = Machine.parse(state_machine_json_dict)


Compile State Machine
---------------------

.. code-block:: python

    # TODO initialise state_machine

    state_machine.compile()


Test Your State Machine
-----------------------

*Work in progress.*

.. code-block:: python

    # TODO initialise state_machine

    runner = Runner()

    @runner.resource_provider("arn:aws:lambda:us-east-1:123456789012:function:Foo")
    def foo(input):
        return "foo-result"

    final_state, output = runner.run(state_machine)
isjosh18 0.12
Determines if Josh is 18.
License: MIT
Requires Python: >=2.7

# Is Josh 18?

[![Build Status](https://travis-ci.org/numirias/python-isjosh18.svg?branch=master)](https://travis-ci.org/numirias/python-isjosh18)
[![codecov](https://codecov.io/gh/numirias/python-isjosh18/branch/master/graph/badge.svg)](https://codecov.io/gh/numirias/python-isjosh18)
[![Python Versions](https://img.shields.io/pypi/pyversions/isjosh18.svg)](https://pypi.python.org/pypi/isjosh18)

A command-line interface to determine if Josh has turned 18 yet.


It's using the API provided by [https://hasjoshturned18yet.com/](https://hasjoshturned18yet.com/).

![Example](https://i.imgur.com/sCzdEW7.gif)


## Installation

    $ pip install isjosh18 --upgrade


## Usage

    $ isjosh18 -h
    usage: isjosh80 [-h] [--balloons] [-f] [--frequency FREQUENCY]
                    [--speed SPEED] [--width WIDTH] [--duration DURATION]

    Is Josh 18?

    optional arguments:
      -h, --help            show this help message and exit
      --balloons            Add balloons
      -f, --force           Force Josh to be 18
      --frequency FREQUENCY
                            Balloon frequency
      --speed SPEED         Balloon speed
      --width WIDTH         Screen width
      --duration DURATION   How many seconds the party should last (0: party on
                            forever)