{ "info": { "author": "Maciej Kucharz", "author_email": "maciej.kucharz@syncano.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Topic :: Utilities" ], "description": "# machinepack\n\n[![Build Status](https://travis-ci.org/python-machine/machinepack.svg?branch=devel)](https://travis-ci.org/python-machine/machinepack)\n[![Coverage Status](https://coveralls.io/repos/python-machine/machinepack/badge.svg?branch=devel)](https://coveralls.io/r/python-machine/machinepack?branch=devel)\n\nInstalling \"machinepack\":\n```\n% python setup.py install\n```\n\n## Using `pymachine`:\n```\n% pymachine\n```\n```\n ______\n / \\ machinepack (CLI Tool)\n / | | \\ v0.1\n \\ /\n \\______/ http://python-machine.org\n\nUsage: pymachine [OPTIONS] COMMAND [ARGS]...\n\nOptions:\n -c, --config PATH\n -v, --version\n -d, --debug\n --help Show this message and exit.\n\nCommands:\n add add machine\n browse view on python-machine.org\n check get pack metadata\n cp copy machine\n create create new machinepack\n example machine usage example\n exec run machine\n info get pack metadata\n ls list machines\n mv rename machine\n publish get pack metadata\n rm delete existing machine\n source print machine source\n test run machine tests\n update get pack metadata\n```\n\n### pymachine create\n\n```\n% pymachine create test\n```\n```\nCreate successful!\n```\nRemember to change folder!\n```\n% cd machinepack_test\n```\n\n### pymachine info\n```\n% pymachine info\n```\n```\nmachinepack_test -- No description\n\n\nURLS\n http://packages.python.org/machinepack_test\n\n\nINSTALLATION\n pip install machinepack_test\n\n\nUSAGE\n from machinepack_test import Test\n\n\nAVAILABLE METHODS\n \u2022 Test.hello()\n```\n\n### pymachine ls\n\n```\n% pymachine ls\n```\n```\nThere are 1 machines\u00a0in this machinepack:\n=========================================\n \u25cb Test.hello()\n```\n\n### pymachine example \n\n```\n% pymachine example --name hello\n```\n```python\n\n# -*- coding: utf-8 -*-\nfrom machinepack_test import Test\n\n# Log a hello message with a generated secret code and other information\nresult = Test.hello(name='John')\n\n# Process result\nif result.success:\n print result.success\n # {'welcome_msg': 'Hello John!'}\n\nif result.error:\n print result.error\n # {'description': 'Some error description!'}\n```\n\n### pymachine source\n\n```\n% pymachine source --name hello\n```\n```python\n\n# -*- coding: utf-8 -*-\n\n# Metadata goes here\nmeta = {\n 'friendly_name': 'Say hello',\n 'description': 'Log a hello message with a generated secret code and other information',\n 'extended_description': 'This example machine is part of machinepack-boilerplate, used to introduce everyone to machines.',\n 'inputs': {\n 'name': {\n 'example': 'John',\n 'description': 'The name of the person that will be sent the hello message.',\n 'required': True\n },\n },\n 'default_exit': 'success',\n 'exits': {\n 'success': {\n 'description': 'Success!',\n 'example': {\n 'welcome_msg': 'Hello John!'\n },\n },\n 'error': {\n 'description': 'In case of error',\n 'example': {\n 'description': 'Some error description!',\n },\n }\n },\n}\n\n# Implementation\ndef func(inputs, exit, global_conf):\n\n return exit(\n 'success',\n welcome_msg=\"Hello %s!\" % inputs['name']\n )\n```\n\n### pymachine exec\n\n```\n% pymachine exec --name hello\n```\n```\n\nValue of 'name': John\nResponse:\n success\n\nResponse params:\n {'welcome_msg': u'Hello John!'}\n```\n\n### pymachine test\n```\n% pymachine test --name hello\n```\n```\n\nTesting: hello\n--------------------\n \u26ac Sample hello test... \u2714\n\nName Stmts Miss Cover Missing\n------------------------------------------------------\nmachinepack_test/hello 4 0 100%\n```\n\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://python-machine.org", "keywords": "machinepack tools packages", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "machinepack", "package_url": "https://pypi.org/project/machinepack/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/machinepack/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://python-machine.org" }, "release_url": "https://pypi.org/project/machinepack/0.2/", "requires_dist": null, "requires_python": null, "summary": "Toolkit for Python machinepacks", "version": "0.2" }, "last_serial": 1544609, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "ff32533bbb187ecc833ff1e2fe21e0bf", "sha256": "6e3405e953d3196fa41685799dda122f9c1502aa95d247f5a189d8c1c45555d0" }, "downloads": -1, "filename": "machinepack-0.1.tar.gz", "has_sig": false, "md5_digest": "ff32533bbb187ecc833ff1e2fe21e0bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13882, "upload_time": "2015-05-12T20:49:18", "url": "https://files.pythonhosted.org/packages/a5/39/4604546e285022a5cafe53198a9593f73bcbcaa6f1f83d7cb741ef92b78e/machinepack-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "1f236fb5d9d3f427021792766c643409", "sha256": "9ba70c8f412b22ee88014cb2d520251038eb7664a4729965d3af73021aafb2fe" }, "downloads": -1, "filename": "machinepack-0.2.tar.gz", "has_sig": false, "md5_digest": "1f236fb5d9d3f427021792766c643409", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13974, "upload_time": "2015-05-12T23:34:57", "url": "https://files.pythonhosted.org/packages/0a/bb/b067fb90c5ce0a046b9b65251cc8716ae3b0744bb9bc6bc00986f1650bdb/machinepack-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1f236fb5d9d3f427021792766c643409", "sha256": "9ba70c8f412b22ee88014cb2d520251038eb7664a4729965d3af73021aafb2fe" }, "downloads": -1, "filename": "machinepack-0.2.tar.gz", "has_sig": false, "md5_digest": "1f236fb5d9d3f427021792766c643409", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13974, "upload_time": "2015-05-12T23:34:57", "url": "https://files.pythonhosted.org/packages/0a/bb/b067fb90c5ce0a046b9b65251cc8716ae3b0744bb9bc6bc00986f1650bdb/machinepack-0.2.tar.gz" } ] }