More documentation
This commit is contained in:
12
doc/api.rst
12
doc/api.rst
@@ -1,18 +1,8 @@
|
||||
API
|
||||
===
|
||||
|
||||
Core API
|
||||
--------
|
||||
|
||||
.. autoclass:: wsme.WSRoot
|
||||
.. autoclass:: wsme.controller.WSRoot
|
||||
|
||||
.. autoclass:: wsme.expose
|
||||
.. autoclass:: wsme.validate
|
||||
|
||||
Protocols
|
||||
---------
|
||||
|
||||
.. autoclass:: wsme.protocols.restjson.RestJsonProtocol
|
||||
.. autoclass:: wsme.protocols.restxml.RestXmlProtocol
|
||||
.. autoclass:: wsme.protocols.soap.SoapProtocol
|
||||
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
Changes
|
||||
=======
|
||||
|
||||
next
|
||||
----
|
||||
|
||||
* Add specialised WSRoot classes for easy integration as a
|
||||
WSGI Application (:class:`wsme.wsgi.WSRoot`) or a
|
||||
TurboGears 1.x controller (:class:`wsme.tg1.WSRoot`).
|
||||
|
||||
0.1.0a2 (2011-10-07)
|
||||
--------------------
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ Contents
|
||||
|
||||
gettingstarted
|
||||
api
|
||||
protocols
|
||||
integrate
|
||||
|
||||
changes
|
||||
|
||||
@@ -1,13 +1,49 @@
|
||||
Integrating with a Framework
|
||||
============================
|
||||
|
||||
WSGI Application
|
||||
----------------
|
||||
|
||||
:mod:`wsme.wsgi` -- WSGI adapter
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. module:: wsme.wsgi
|
||||
|
||||
.. class:: WSRoot
|
||||
|
||||
A :class:`wsme.controller.WSRoot` that act as a WSGI application.
|
||||
|
||||
Example
|
||||
~~~~~~~
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from wsme import expose, validate
|
||||
from wsme.wsgi import WSRoot
|
||||
from wsme.protocols import restjson
|
||||
|
||||
class MyRoot(WSRoot):
|
||||
@expose(unicode)
|
||||
def helloworld(self):
|
||||
return u"Hello World !"
|
||||
|
||||
application = MyRoot(protocols=['REST+Json'])
|
||||
|
||||
Turbogears 1.x
|
||||
--------------
|
||||
|
||||
:mod:`wsme.tg1` -- TG1 adapter
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. module:: wsme.tg1
|
||||
|
||||
wsme.tg1 provides a WSRoot controller that can be part of your
|
||||
controller tree.
|
||||
.. class:: WSRoot
|
||||
|
||||
A :class:`wsme.controller.WSRoot` that can be inserted in a TG1
|
||||
controller tree.
|
||||
|
||||
Example
|
||||
~~~~~~~
|
||||
|
||||
In a freshly quickstarted tg1 application (let's say, wsmedemo),
|
||||
the prefered way is the following :
|
||||
@@ -37,6 +73,6 @@ Insert the ws controller in the controller tree, (file controllers.py):
|
||||
import wsme.protocols.restjson
|
||||
|
||||
class Root(controllers.RootController):
|
||||
ws = WSController(webpath='ws', protocols=['REST+Json'])
|
||||
ws = WSController(webpath='/ws', protocols=['REST+Json'])
|
||||
|
||||
# ...
|
||||
|
||||
20
doc/protocols.rst
Normal file
20
doc/protocols.rst
Normal file
@@ -0,0 +1,20 @@
|
||||
Protocols
|
||||
=========
|
||||
|
||||
REST+Json
|
||||
---------
|
||||
|
||||
.. autoclass:: wsme.protocols.restjson.RestJsonProtocol
|
||||
|
||||
|
||||
REST+XML
|
||||
--------
|
||||
|
||||
.. autoclass:: wsme.protocols.restxml.RestXmlProtocol
|
||||
|
||||
|
||||
SOAP
|
||||
----
|
||||
|
||||
.. autoclass:: wsme.protocols.soap.SoapProtocol
|
||||
|
||||
36
doc/todo.rst
Normal file
36
doc/todo.rst
Normal file
@@ -0,0 +1,36 @@
|
||||
TODO
|
||||
====
|
||||
|
||||
WSME is a work in progress. Here is a list of things that should
|
||||
be done :
|
||||
|
||||
- Improve the protocol factory -> we should not have to import the
|
||||
module manually except if we need special parameters.
|
||||
For example, calling WSRoot.addprotocol('restjson') should just
|
||||
work, wether or not the wsme.protocols.restjson has been imported yet.
|
||||
|
||||
- Fix the SOAP protocol : the namespace for parameters is not correctly
|
||||
handle -> some tests with suds should help.
|
||||
|
||||
- Implement new protocols :
|
||||
|
||||
- json-rpc
|
||||
|
||||
- xml-rpc
|
||||
|
||||
- ExtDirect
|
||||
|
||||
- Implement adapters for other framework :
|
||||
|
||||
- TurboGears 2
|
||||
|
||||
- Pyramid
|
||||
|
||||
- Pylons
|
||||
|
||||
- CherryPy
|
||||
|
||||
- others ?
|
||||
|
||||
- Add unittests for adapters
|
||||
|
||||
Reference in New Issue
Block a user