Difference between revisions of "Mulib"

From Second Life Wiki
Jump to navigation Jump to search
(it has some limitations)
(Remove out of date and not very useful section)
 
(6 intermediate revisions by 2 users not shown)
Line 8: Line 8:
* Subversion repository: http://svn.secondlife.com/svn/mulib/
* Subversion repository: http://svn.secondlife.com/svn/mulib/
* Trac page: http://svn.secondlife.com/trac/mulib
* Trac page: http://svn.secondlife.com/trac/mulib
* Mailing list: https://lists.secondlife.com/cgi-bin/mailman/listinfo/eventletdev
== Documentation ==
[[Mulib/Documentation]]
== Releases ==
{| cellpadding="6"
|-
| '''Name''' || '''Date''' || '''Zip''' || '''SVN'''
|-
| beta-1 || Aug 24, 2007 || [http://svn.secondlife.com/trac/mulib/changeset/4/branches/beta-1?old_path=%2F&format=zip] || [http://svn.secondlife.com/svn/mulib/branches/beta-1]
|}


== Requirements ==
== Requirements ==
Line 15: Line 29:
* [http://cheeseshop.python.org/pypi/simplejson simplejson]
* [http://cheeseshop.python.org/pypi/simplejson simplejson]


== Files ==
== Limitations ==


Files called out in '''bold''' in this list have an accompanying unit test.
* Mulib can expose native python objects via a RESTful interface, but it doesn't yet have any inbuilt access control, so being able to read the objects also means being able to write or delete them.  However, this is only a problem if you choose to expose your objects in this way.


* [[Mulib/auth.py | auth.py]] : Implementation of HTTP basic authentication.
== License ==
* [[Mulib/cgiadapter.py | cgiadapter.py]] : Adapter that makes it possible to interact with a mu application as a cgi.
* [[Mulib/console.py | console.py]] : Multi-user browser-based console that manipulates/inspects the running state of the application.
* [[Mulib/eventrouter.py | eventrouter.py]] : Eventrouter is a generic browser/server message-passing framework.  It's used to build many of the neat little web apps included in mulib.
* [[Mulib/htmlexception.py | htmlexception.py]] : Formatting code to render python exceptions (and stack traces) to html.
* [[Mulib/logconsole.py | logconsole.py]] : Eventrouter console for programs to log to.
* [[Mulib/mu.py | mu.py]] : Exposes the most important apis from mulib, such as mu.Resource, the
* '''[[Mulib/nodes.py | nodes.py]]''' : Implementation of generic http-based publish/subscribe.  It's at the proof-of-concept stage.
* '''[[Mulib/shaped.py | shaped.py]]''' : A system for meta-description of python objects, using python objects.  E.g. a list of ints <code>[1, 2, 3]</code> has the shape <code>[int]</code>.  Also at the proof-of-concept stage.
* [[Mulib/resources.py | resources.py]] : Assorted useful subclasses of mu.Resource.
* [[Mulib/shellconsole.py | shellconsole.py]] : Interactive python shell in a browser, implemented with eventrouter.  Allows you to poke and prod at your application's state as it's running.
* [[Mulib/sourceconsole.py | sourceconsole.py]] : Interactive source code browser for eventrouter.  It's been a long time since anyone has looked at this code, it probably needs some freshening up.
* '''[[Mulib/stacked.py | stacked.py]]''' : Recursive url-based traversal of Python data structures.  The various consume methods match up path segments from a url with a hierarchical data structure.  The produce methods convert data for transport over the wire.  The names of these methods are somewhat confusing, we could use some better ones.
* [[Mulib/testconsole.py | testconsole.py]] : Unit test running and reporting application built with eventrouter.
* [[Mulib/tests.py | tests.py]] : A place to keep test utilities.  Lightly used, but it will become more useful as test coverage grows.
* [[Mulib/virtual.py | virtual.py]] : Virtual host implementation (i.e. dispatching based on the Host header).


== Limitations ==
Mulib is made available under the terms of the open source MIT license below.
 
'''MULIB'''
 
Copyright (c) 2005-2006, Donovan Preston
 
Copyright (c) 2007, Linden Research, Inc.


* Mulib can expose native python objects via a RESTful interface, but it doesn't yet have any inbuilt access control, so being able to read the objects also means being able to write or delete them.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Latest revision as of 10:05, 29 September 2008

Mulib

Mulib is a REST web service framework built on top of eventlet.httpd. Httpd parses incoming HTTP request and generates the response; mulib takes care of locating the object which will handle the request (url traversal) and calling the appropriate callback method based on the method of the request. Code written using mulib looks like a series of subclasses of mu.Resource which override methods such as handle_get or handle_post, making it easy to implement web services.

The stacked traversal code also knows how to traverse python objects like dicts and lists. Using that style, it is possible to easily interact with compositional data structures through the Web.

Documentation

Mulib/Documentation

Releases

Name Date Zip SVN
beta-1 Aug 24, 2007 [1] [2]

Requirements

Mulib runs on Python version 2.3 or greater, with the following dependenceis:

Limitations

  • Mulib can expose native python objects via a RESTful interface, but it doesn't yet have any inbuilt access control, so being able to read the objects also means being able to write or delete them. However, this is only a problem if you choose to expose your objects in this way.

License

Mulib is made available under the terms of the open source MIT license below.

MULIB

Copyright (c) 2005-2006, Donovan Preston

Copyright (c) 2007, Linden Research, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.