initialise repo
[debian/mudpuppy.git] / README
1 mudpuppy is a Python based automation agent/client for make-magic
2
3 It allows you to write independant 'modules' in Python code, to automate
4 items in a make-magic task.  When run, mudpuppy will poll a make-magic
5 server for tasks that are outstanding, and will complete any items with
6 which it has a module for. Once the module has run successfully, mudpuppy
7 will tell make-magic that the item has been completed, and then will look
8 for more work to do.
9
10 There are some example modules in modules/test.py. The simplest case is:
11
12 class TestModule(Automatia):
13         '''Test item automation model
14         Successfuly automates a specific item
15         '''
16         can_handle = ('TestModuleItem',)
17
18         def do_magic(self):
19                 print "Hello world"
20
21 which will automate an item with the name 'TestModuleItem' by printing
22 "Hello world" to stdout, and then returning successfully (allowing the
23 item to be marked as complete).
24
25 In config.py you can define both the API URL of your make-magic server, 
26 as well as a list of modules to load. Only modules listed in the
27 installed_items config item will by loaded by mudpuppy. 
28
29 There is also a helper base class that allows you to easily kick off
30 an Orchestra job, wait for it to complete, and optionally update the
31 make-magic task state from the key/value pairs returned by Orchestra.
32 This makes it very easy to integrate Orchestra with make-magic/mudpuppy
33 with very little work. Look in modules/test.py for some examples for
34 doing this.  See https://github.com/anchor/orchestra for more information
35 about Orchestra.
36
37 Although make-magic is designed to be able to be used with almost no python
38 knowledge, mudpuppy is specifically designed to automate items with python
39 code; Feel free to implement agents such as this in any other language you
40 wish.
41
42 For more information on make-magic, see https://github.com/anchor/make-magic