{ "info": { "author": "Samarth Hattangady", "author_email": "samhattangady@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# Python client for Conductor\nPython client for Conductor provides two sets of functions:\n\n1. Workflow management APIs (start, terminate, get workflow status etc.)\n2. Worker execution framework\n\n> NOTE: This repository has been forked from [Netflix:conductor](https://github.com/Netflix/conductor)'s\n> `client/python` folder. Apart from the results of renaming the module from `conductor` to `pyconductor`,\n> (as pip already contains a `conductor` module), there are no code changes. This repository is mostly meant\n> to act as an easy way to install the python client for `Netflix:conductor`. There are also attempts made\n> to add documentation to the client overall. As far as possible, the library will be kept in sync with\n> the upstream branch.\n\n## Install\n\n```shell\npip install pyconductor\n```\n\n## Using Workflow Management API\nPython class ```WorkflowClient``` provides client API calls to the conductor server to start manage the workflows.\n\n### Example\n\n```python\nimport sys\nfrom pyconductor import conductor\nimport json\n\ndef getStatus(workflowId):\n\n\tworkflowClient = conductor.WorkflowClient('http://localhost:8080/api')\n\n\tworkflow_json = workflowClient.getWorkflow(workflowId)\n\tprint json.dumps(workflow_json, indent=True, separators=(',', ': '))\n\n\treturn workflow_json\n\n```\n\n## Task Worker Execution\nTask worker execution APIs facilitates execution of a task worker using python client.\nThe API provides necessary mechanism to poll for task work at regular interval and executing the python worker in a separate threads.\n\n### Example\nThe following python script demonstrates workers for the kitchensink workflow.\n\n```python\nfrom pyconductor.ConductorWorker import ConductorWorker\n\ndef execute(task):\n\treturn {'status': 'COMPLETED', 'output': {'mod': 5, 'taskToExecute': 'task_1', 'oddEven': 0}, 'logs': ['one', 'two']}\n\ndef execute4(task):\n\tforkTasks = [{\"name\": \"task_1\", \"taskReferenceName\": \"task_1_1\", \"type\": \"SIMPLE\"},{\"name\": \"sub_workflow_4\", \"taskReferenceName\": \"wf_dyn\", \"type\": \"SUB_WORKFLOW\", \"subWorkflowParam\": {\"name\": \"sub_flow_1\"}}];\n\tinput = {'task_1_1': {}, 'wf_dyn': {}}\n\treturn {'status': 'COMPLETED', 'output': {'mod': 5, 'taskToExecute': 'task_1', 'oddEven': 0, 'dynamicTasks': forkTasks, 'inputs': input}}\n\ndef main():\n\tprint 'Hello World'\n\tcc = ConductorWorker('http://localhost:8080/api', 1, 0.1)\n\tfor x in range(1, 30):\n\t\tif(x == 4):\n\t\t\tcc.start('task_{0}'.format(x), execute4, False)\n\t\telse:\n\t\t\tcc.start('task_{0}'.format(x), execute, False)\n\tcc.start('task_30', execute, True)\n\nif __name__ == '__main__':\n main()\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/skylarkdrones/pyconductor", "keywords": "netflix,conductor,pyconductor", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "pyconductor", "package_url": "https://pypi.org/project/pyconductor/", "platform": "", "project_url": "https://pypi.org/project/pyconductor/", "project_urls": { "Homepage": "https://github.com/skylarkdrones/pyconductor" }, "release_url": "https://pypi.org/project/pyconductor/0.1.3/", "requires_dist": null, "requires_python": "", "summary": "Conductor python client", "version": "0.1.3" }, "last_serial": 4869527, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "52aaaa52449e7fde4c939f7d8a9f3d3e", "sha256": "2910dc4edbd8b4c7d9f0038f9fd49eb65216fcdb87c898e53c9ba68e4e186f6f" }, "downloads": -1, "filename": "pyconductor-0.1.0.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "52aaaa52449e7fde4c939f7d8a9f3d3e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11027, "upload_time": "2019-02-25T11:03:13", "url": "https://files.pythonhosted.org/packages/0a/33/5798a7149b98f4f259e03bb3ed1eee12c82af730cb553a984cc35285eb8a/pyconductor-0.1.0.linux-x86_64.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "5a1eebfd9f71656561080f0d17eb8929", "sha256": "83e239051a6eb313fbe7a7ecbea088ffbcfb48260fc2f326be92658687a211f4" }, "downloads": -1, "filename": "pyconductor-0.1.1.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "5a1eebfd9f71656561080f0d17eb8929", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10661, "upload_time": "2019-02-25T11:14:32", "url": "https://files.pythonhosted.org/packages/14/a6/81cdfc3b83854ed61d46a2d4ab37540346c0387503d09d526722c606041d/pyconductor-0.1.1.linux-x86_64.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "a760555fce1da0598ea4b08a8e656200", "sha256": "ca7aa755df833b144785ad36db74f14bc9aa167cbea2239372f7df86d259ac38" }, "downloads": -1, "filename": "pyconductor-0.1.2.tar.gz", "has_sig": false, "md5_digest": "a760555fce1da0598ea4b08a8e656200", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5529, "upload_time": "2019-02-25T11:23:40", "url": "https://files.pythonhosted.org/packages/bb/c1/2877973941f33ef10a088bffae543c086e1cdeb195344f9c10bc013fc407/pyconductor-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "f4bc1e5f2ac94d21273917e3946bcea2", "sha256": "c309c1d6a8fd58a85612ef9b08c61cfd7f2e6b7c0447f400d4d9e86694dbc5a8" }, "downloads": -1, "filename": "pyconductor-0.1.3.tar.gz", "has_sig": false, "md5_digest": "f4bc1e5f2ac94d21273917e3946bcea2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5848, "upload_time": "2019-02-26T12:26:51", "url": "https://files.pythonhosted.org/packages/b1/9d/e0fe234b23b0a55ebcb3f019b5669a9b7ab4111d023d401b4ce5ea067c4c/pyconductor-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f4bc1e5f2ac94d21273917e3946bcea2", "sha256": "c309c1d6a8fd58a85612ef9b08c61cfd7f2e6b7c0447f400d4d9e86694dbc5a8" }, "downloads": -1, "filename": "pyconductor-0.1.3.tar.gz", "has_sig": false, "md5_digest": "f4bc1e5f2ac94d21273917e3946bcea2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5848, "upload_time": "2019-02-26T12:26:51", "url": "https://files.pythonhosted.org/packages/b1/9d/e0fe234b23b0a55ebcb3f019b5669a9b7ab4111d023d401b4ce5ea067c4c/pyconductor-0.1.3.tar.gz" } ] }