Install 

1
    $ pip install Flask-Enterprise

file: soap.py 

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
    from time import ctime
    from flask import Flask
    from flaskext.enterprise import Enterprise

    app = Flask(__name__)

    enterprise = Enterprise(app)


    class DemoService(enterprise.SOAPService):
        __soap_server_address__ = '/soap'
        __soap_target_namespace__ = 'ns'

        @enterprise.soap(_returns=enterprise._sp.String)
        def get_time(self):
            return ctime()

    if __name__ == '__main__':
        app.run(host='127.0.0.1', port=5555)

Run service 

1
    $ python soap.py

file: client.py 

1
2
3
4
    from suds.client import Client

    c = Client('http://127.0.0.1:5555/soap?wsdl')
    print c.service.get_time()

Run test 

1
2
    $ python client.py
    Tue Aug 13 1953 2013