Metadata-Version: 2.0
Name: caravan
Version: 0.2.0
Summary: Light python framework for AWS SWF
Home-page: https://github.com/pior/caravan
Author: Pior Bastida
Author-email: pior@pbastida.net
License: MIT
Keywords: AWS SWF workflow distributed background task
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet
Classifier: Programming Language :: Python :: 2.7
Requires-Dist: boto3
Requires-Dist: arrow
Requires-Dist: six
Requires-Dist: tabulate
Provides-Extra: dev
Requires-Dist: ipdb; extra == 'dev'
Requires-Dist: nose; extra == 'dev'
Requires-Dist: nosexcover; extra == 'dev'
Requires-Dist: coverage; extra == 'dev'
Requires-Dist: yanc (==0.2.4); extra == 'dev'
Requires-Dist: mock; extra == 'dev'
Requires-Dist: freezegun; extra == 'dev'
Requires-Dist: abduct; extra == 'dev'
Requires-Dist: httpretty; extra == 'dev'
Requires-Dist: zest.releaser[recommended]; extra == 'dev'
Requires-Dist: pylama; extra == 'dev'

=======
Caravan
=======

**Light python framework for AWS SWF**

Project
=======

- `Code on Github <https://github.com/pior/caravan>`_
- `PyPi <https://pypi.python.org/pypi/caravan>`_
- Doc: ``TODO``
- Tests: |travis|

.. |travis| image:: https://travis-ci.org/pior/caravan.svg?branch=master
    :target: https://travis-ci.org/pior/caravan


Focus of this project
=====================

Similar projects exists (like Simpleflow which seems mature).
Here is where Caravan differs from existing projects:

- Support of AWS Lambda tasks
- Boto3
- KISS
- Bring your own workflow framework (standard implementations as contribs)
- No coupling between Decider code and Activity code
- Paster compatible config file

Features
========

- Decider worker
- Activity task worker ``TODO``
- Commands to start/signal/terminate an arbitrary workflow execution
- Command to list open workflow execution
- Command to register a domain

Configuration
=============

Caravan uses Boto3 to connect to AWS. See
`Boto 3 configuration guide <http://boto3.readthedocs.org/en/latest/guide/configuration.html>`_
to setup your AWS credentials.

Usage
=====

Setup a SWF for the example::

    $ caravan-domain-register -n CaravanExample --retention-days 1

List open execution for last 24h::

    $ caravan-list -d CaravanExample

List open execution for year 2015::

    $ caravan-list -d CaravanExample --oldest 2015-01-01

Run the decider::

    $ caravan-decider -d CaravanExample -m caravan.examples.demo -t default

Start an execution::

    $ caravan-start -d CaravanExample -n Demo -v 0.1 -i 1

Send a signal to an execution::

    $ caravan-signal -d CaravanExample -i 1 -s PAYMENT_CONFIRMED

Terminate an execution::

    $ caravan-terminate -d CaravanExample -i 1

Similar projects
================

Python:

- Simpleflow: https://github.com/botify-labs/simpleflow
- Flowy: https://github.com/severb/flowy
- Garcon: https://github.com/xethorn/garcon

Ruby:

- AWS Flow: https://github.com/aws/aws-flow-ruby

References
==========

- `AWS Developer Guide for SWF <http://docs.aws.amazon.com/amazonswf/latest/developerguide/>`_
- `AWS API reference for SWF <http://docs.aws.amazon.com/amazonswf/latest/apireference/>`_

Development
===========

Possibly use `virtualenvwrapper <https://virtualenvwrapper.readthedocs.org/en/latest/>`_
to manage your virtualenvs.

    $ mkvirtualenv caravan

    or

    $ virtualenv caravan

Clone and install development dependencies::

    (caravan)$ git clone git@github.com:pior/caravan.git
    (caravan)$ cd caravan
    (caravan)$ pip install -e .[dev]

Run tests::

    (caravan)$ nosetests

Release
=======

The release process use zest.releaser::

    $ fullrelease

License
=======

MIT licensed. See the bundled
`LICENSE <https://github.com/pior/caravan/blob/master/LICENSE>`_
file for more details


