Metadata-Version: 1.0
Name: infrae.rest
Version: 1.0
Summary: Define a REST API to access and manage Silva content
Home-page: http://infrae.com/products/silva
Author: Infrae
Author-email: info@infrae.com
License: BSD
Description: ===========
        infrae.rest
        ===========
        
        ``infrae.rest`` provide a simple way to write REST APIs in Zope 2.
        
        API
        ===
        
        ``infrae.rest`` provides mainly a base class ``REST`` which behave a
        lot like a Grok view::
        
           from infrae.rest import REST
        
           class MyAction(REST):
               """My action REST API.
               """
        
               def POST(self, name, value):
                   # Called by POST /content/++rest++myaction&name=foo?value=bar
                   return 'Success'
        
               def GET(self):
                   # Called by GET /content/++rest++myaction
                   values = self.context.something()
                   return self.json_response(values)
        
        
        You just have to grok your package to make it available.
        
        - You can provide: ``POST``, ``GET``, ``HEAD``, ``DELETE`` requests.
        
        - You can use the directives ``grok.name``, ``grok.require`` and
          ``grok.context`` to configure your REST API. They work exactly like
          on a ``grok.View``.
        
        
        
        
        
        Changes
        =======
        
        1.0 (2010/07/15)
        ----------------
        
        * Initial release
        
        
Keywords: silva cms rest api zope
Platform: UNKNOWN
Classifier: Framework :: Zope2
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Libraries :: Python Modules
