wsmorph /

Filename Size Date modified Message
75 B
924 B
1.1 KB
338 B
605 B


Web Services Morph is a small wsgi middleware that transforms webservices calls.

It understands several protocols and can translate function names, transform the input / output data structures with generic rules, rectify arguments...

The first goal of WSMorph is to build compatibility layers for webservices implemented with WSME or tgwebservices but it is independant of them and should work with any rest implementation.


import wsmorph

morph = wsmorph.WSMorph('/api/v1', '/api/v2')  # redirect all request made
                                               # on /api/v1 to /api/v2
    # All functions under /api/v1/utilfunctions :

    # are renamed to /api/v2/utils/NAME

myapp = ...  # Create your wsgi application
application = morph.wsgi_middleware(myapp)