Package: machinepack
# machinepack[![Build Status](https://travis-ci.org/python-machine/machinepack.svg?branch=devel)](https://travis-ci.org/python-machine/machinepack)[![Coverage Status](https://coveralls.io/repos/python-machine/machinepack/badge.svg?branch=devel)](https://coveralls.io/r/python-machine/machinepack?branch=devel)Installing "machinepack":```% python setup.py install```## Using `pymachine`:```% pymachine``````______/      \      machinepack (CLI Tool)/  |  |  \     v0.1\        /\______/      http://python-machine.orgUsage: pymachine [OPTIONS] COMMAND [ARGS]...Options:-c, --config PATH-v, --version-d, --debug--help             Show this message and exit.Commands:add      add machinebrowse   view on python-machine.orgcheck    get pack metadatacp       copy machinecreate   create new machinepackexample  machine usage exampleexec     run machineinfo     get pack metadatals       list machinesmv       rename machinepublish  get pack metadatarm       delete existing machinesource   print machine sourcetest     run machine testsupdate   get pack metadata```### pymachine create```% pymachine create test``````Create successful!```Remember to change folder!```% cd machinepack_test```### pymachine info```% pymachine info``````machinepack_test -- No descriptionURLShttp://packages.python.org/machinepack_testINSTALLATIONpip install machinepack_testUSAGEfrom machinepack_test import TestAVAILABLE METHODS• Test.hello()```### pymachine ls```% pymachine ls``````There are 1 machines in this machinepack:=========================================○ Test.hello()```### pymachine example```% pymachine example --name hello``````python# -*- coding: utf-8 -*-from machinepack_test import Test# Log a hello message with a generated secret code and other informationresult = Test.hello(name='John')# Process resultif result.success:print result.success# {'welcome_msg': 'Hello John!'}if result.error:print result.error# {'description': 'Some error description!'}```### pymachine source```% pymachine source --name hello``````python# -*- coding: utf-8 -*-# Metadata goes heremeta = {'friendly_name': 'Say hello','description': 'Log a hello message with a generated secret code and other information','extended_description': 'This example machine is part of machinepack-boilerplate, used to introduce everyone to machines.','inputs': {'name': {'example': 'John','description': 'The name of the person that will be sent the hello message.','required': True},},'default_exit': 'success','exits': {'success': {'description': 'Success!','example': {'welcome_msg': 'Hello John!'},},'error': {'description': 'In case of error','example': {'description': 'Some error description!',},}},}# Implementationdef func(inputs, exit, global_conf):return exit('success',welcome_msg="Hello %s!" % inputs['name'])```### pymachine exec```% pymachine exec --name hello``````Value of 'name': JohnResponse:successResponse params:{'welcome_msg': u'Hello John!'}```### pymachine test```% pymachine test --name hello``````Testing: hello--------------------⚬ Sample hello test... ✔Name                     Stmts   Miss  Cover   Missing------------------------------------------------------machinepack_test/hello       4      0   100%```