Skip to main content

Zenaton client library

Project description

This is the official Python client library for Zenaton (https://zenaton.com/).

https://travis-ci.org/zenaton/zenaton-python.svg?branch=master

Requirements

Supported Python versions are 2.7 and 3.3+.

Installing

Install the latest stable release using pip:

$ pip install zenaton

Getting started

#
# Getting started with Zenaton
#
from zenaton import Client, Task, Workflow


class Echo(Task):

    def __init__(self, value):
        self.value = value

    def handle(self):
        print(self.value)


class MyWorkflow(Workflow):

    def __init__(self, count):
        self.count = count

    def handle(self):
        while self.count > 0:
            self.execute(Echo(self.count))
            self.count -= 1


if __name__ == '__main__':

    # Create a simple workflow
    workflow = MyWorkflow(count=10)

    # Ask Zenaton to start an instance of this workflow
    client = Client(app_id='APP_ID', token='API_TOKEN', environment='APP_ENV')
    instance = client.start(workflow)
    print(instance.id)

Hacking

Run tests using py.test:

$ pip install -r requirements-testing.txt
$ py.test

Run tests on all supported Python versions using tox:

$ pip install tox
$ tox

Documentation

Build the docs using Sphinx:

$ pip install sphinx sphinxcontrib-napoleon
$ cd docs
$ make html

0.1.1 (2017-09-08)

  • Improved packaging

0.1.0 (2017-09-08)

  • Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zenaton-0.1.1.tar.gz (26.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page