This repository has been archived by the owner on Jan 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
/
PKG-INFO
97 lines (75 loc) · 3.57 KB
/
PKG-INFO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
Metadata-Version: 1.1
Name: Flask-Spyne
Version: 0.3.1
Summary: A Flask extension, provides support for Spyne.
Home-page: https://github.com/rayrapetyan/flask-spyne
Author: Robert Ayrapetyan
Author-email: [email protected]
License: CC0 1.0
Download-URL: http://pypi.python.org/pypi/Flask-Spyne
Description: Flask-Spyne
===========
Flask-Spyne is a `Flask <http://flask.pocoo.org>`_ extension which
provides `Spyne <http://spyne.io>`_ (formerly known as
`soaplib <http://soaplib.github.io/soaplib/2_0/>`_) support.
Includes SOAP, WSDL, JSON, XML, YAML and other transports and protocols.
Inspired by unofficial
`Flask-Enterprise <http://massive.immersedcode.org/2011/staging/projects/default/python/flask-enterprise/>`_
extension (a wrapper on top of outdated `soaplib <http://soaplib.github.io/soaplib/2_0/>`_).
* `PyPI listing <http://pypi.python.org/pypi/Flask-Spyne>`_
Installation
------------
::
pip install flask-spyne
Please check `list of additional requirements <http://spyne.io/docs/2.11/#requirements>`_
you might need to install.
Server example
--------------
.. code-block:: python
from flask import Flask
from flask_spyne import Spyne
from spyne.protocol.soap import Soap11
from spyne.model.primitive import Unicode, Integer
from spyne.model.complex import Iterable
app = Flask(__name__)
spyne = Spyne(app)
class SomeSoapService(spyne.Service):
__service_url_path__ = '/soap/someservice'
__in_protocol__ = Soap11(validator='lxml')
__out_protocol__ = Soap11()
@spyne.srpc(Unicode, Integer, _returns=Iterable(Unicode))
def echo(str, cnt):
for i in range(cnt):
yield str
if __name__ == '__main__':
app.run(host = '127.0.0.1')
Client example
--------------
.. code-block:: python
from suds.client import Client as SudsClient
url = 'http://127.0.0.1:5000/soap/someservice?wsdl'
client = SudsClient(url=url, cache=None)
r = client.service.echo(str='hello world', cnt=3)
print r
WS-Security
-----------
Starting from v0.2 flask-spyne supports basics of WS-Security for SOAP services.
Specify __wsse_conf__ dict with following fields::
username (str, required)
password (str, required)
password-digest (bool, optional)
nonce-freshness-time (int, optional)
reject-empty-nonce-creation (bool, optional)
reject-stale-tokens (bool, optional)
reject-expiry-limit (int, optional)
See server_auth.py/client_auth.py in ``examples`` for more details.
Keywords: flask,spyne,soap,wsdl,wsgi,zeromq,rest,rpc,json,http,msgpack,xml,sqlalchemy,werkzeug,yaml
Platform: any
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules