Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    dews 0.3.0

    Download button

    No screenshots available
    Downloads: 339  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    José Orlando Pereira | More programs
    MIT/X Consortium Lic... / FREE
    April 9th, 2010, 01:54 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    dews description

    Dead simple Web Services stack for Python

    dews is a Python module that offers dead-simple Web Services for Python.

    Although exposing a Web Service is getting pretty simple these days, when you're using the proper IDE and following the recipes, getting to known the inner details of a SOAP stack can be a daunting task. For instance, if you are experimenting with extensions or simply want to learn how it works.

    Inspired by Ryan Kelly's dexml, the dead simple Object-XML mapper, and by K. Jacobson's simple Python Web Service framework blog entry, dews is small and simple. In fact, there is a long way to go to comply with the Web Services standards.

    Exporting a Web Service is as easy as defining request and response classes in Python using dexml with corresponding handler functions:

     >>> from dexml import Model, fields
     >>> class HelloNS(Model):
     ... class meta:
     ... namespace = "http://localhost/hello"
     ... namespece_prefix = "h"
     ...
     >>> class Hello(HelloNS):
     ... name = fields.String()
     ...
     >>> class HelloResponse(HelloNS):
     ... greeting = fields.String()
     ...
     >>> def hello(r):
     ... return HelloResponse(greeting='Hello '+r.name)


    And then creating the HTTP server:

     >>> from BaseHTTPServer import HTTPServer
     >>> from dews import http
     >>> HTTPServer(('localhost',8080),
     ... http.handler('Hello', (Hello,HelloResponse,hello),)
     ... ).serve_forever()


    This will serve the WSDL on http://localhost:8080. No client is provided by dews but I recommend Suds (https://fedorahosted.org/suds/).


    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    web services | Python library | Python | web | services

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM