Metadata-Version: 2.1
Name: zenaton
Version: 0.2.4
Summary: Zenaton client library
Home-page: https://zenaton.com/
Author: Zenaton
Author-email: yann@zenaton.com
License: Apache License, Version 2.0
Description: # Zenaton library for Python
        
        This Zenaton library for Python lets you code and launch workflows using Zenaton platform. You can sign up for an account at [https://zenaton/com](http://zenaton.com)
        
        **DISCLAIMER** The Python library is currently in public beta. Please open an
        issue if you find any bugs.
        
        ## Requirements
        
        This package has been tested with Python 3.5.
        
        ## Installation
        
        Install from pip
        
        ```Python
        pip install zenaton
        ```
        
        ## Usage in plain Python
        
        For more detailed examples, please check [Zenaton Python examples](https://github.com/zenaton/examples-Python).
        
        ### Client Initialization
        
        You will need to export three environment variables: `ZENATON_APP_ID`, `ZENATON_API_TOKEN`, `ZENATON_APP_ENV`. You'll find them [here](https://zenaton/app/api).
        
        Then you can initialize your Zenaton client:
        ```Python
        import os
        from dotenv import load_dotenv
        
        # LOADING CONFIG FROM .env file
        load_dotenv()
        app_id = os.getenv('ZENATON_APP_ID')
        api_token = os.getenv('ZENATON_API_TOKEN')
        app_env = os.getenv('ZENATON_APP_ENV')
        ```
        
        ### Writing Workflows and Tasks
        
        Writing a workflow is as simple as:
        
        ```Python
        class MyWorkflow(Workflow, Zenatonable):
        
            def handle(self):
                # Your Workflow implementation
                MyTask().execute() # For example
        ```
        
        We can create a workflow in `workflows/my_workflow.py`.
        
        Note that your workflow implementation should be idempotent. See [documentation](https://zenaton.com/app/documentation#workflow-basics-implementation).
        
        Writing a task is as simple as:
        ```Python
        class MyTask(Task, Zenatonable):
        
            def handle(self):
                # Your Task implementation
        
        ```
        
        And we can create a task in `tasks/my_task.py`.
        
        ### Launching a workflow
        
        Once your Zenaton client is initialized, you can start a workflow with
        
        ```Python
        MyWorkflow().dispatch()
        ```
        
        ### Lauching a workflow
        
        We can start a workflow from anywhere in our application code with:
        ```Python
        MyWorkflow().dispatch()
        ```
        
        ### Worker Installation
        
        Your workflow's tasks will be executed on your worker servers. Please install a Zenaton worker on it:
        
            $ curl https://install.zenaton.com | sh
        
        that you can start and configure with
        
            $ zenaton start && zenaton listen --env=.env --boot=boot.py
        
        where `.env` is the env file containing your credentials, and `boot.py` is a file that will be included before each task execution - this file should load all workflow classes.
        
        
        ## Documentation
        
        Please see https://zenaton.com/documentation for complete documentation.
        
        ## Contributing
        
        Bug reports and pull requests are welcome on GitHub at https://github.com/zenaton/zenaton-Python. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
        
        ## License
        
        The package is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
        
        ## Code of Conduct
        
        Everyone interacting in the zenaton-Python project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/zenaton/zenaton-Python/blob/master/CODE_OF_CONDUCT.md).
        ## Change Log
        
        # [0.2.4] - 2018/09/26
        Enhanced WithDuration & WithTimestamp classes
        
        # [0.2.3] - 2018/09/21
        Minor enhancements (including the workflow find() method)
        
        # [0.2.2] - 2018/09/19
        New version scheme management
        
        # [0.2.1] - 2018/09/17
        Reorganized modules
        
        # [0.2.0] - 2018/09/14
        Full rewriting of the package
        
Keywords: workflow tasks queue orchestration scheduling
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.5
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3
Description-Content-Type: text/markdown
