Zenaton client library
Project description
This is the official Python client library for Zenaton (https://zenaton.com/).
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
Release history Release notifications | RSS feed
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)