Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brunsgaard/asyncio-pysimplesoap
Python Simple SOAP client with asyncio support
https://github.com/brunsgaard/asyncio-pysimplesoap
Last synced: 3 months ago
JSON representation
Python Simple SOAP client with asyncio support
- Host: GitHub
- URL: https://github.com/brunsgaard/asyncio-pysimplesoap
- Owner: brunsgaard
- Fork: true (pysimplesoap/pysimplesoap)
- Created: 2015-05-29T11:06:13.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-06T10:18:13.000Z (over 7 years ago)
- Last Synced: 2024-04-04T10:31:15.781Z (7 months ago)
- Language: Python
- Homepage:
- Size: 800 KB
- Stars: 12
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- starred-awesome - asyncio-pysimplesoap - Python Simple SOAP client with asyncio support (Python)
README
As of 2017 [Zeep](http://docs.python-zeep.org) is the better option for async SOAP in Python.
Asyncio PySimpleSOAP
====================
The `aiopss` package is a fork of PySimpleSoap v1.16 and offers a SOAP client
for asyncio [PEP-3146](https://www.python.org/dev/peps/pep-3156).The fork has been modified by replacing internal functions with `coroutines`
and [aiohttp](http://aiohttp.readthedocs.org/) has been used to develop the
underlying transport layer.Below is shown an example of how to use the client, it is pretty straight
forward. For more documentation consult the
[PySimpleSoap](https://code.google.com/p/pysimplesoap/) project.Note that there is a
[strange bug in PySimpleSoap with python3](https://github.com/pysimplesoap/pysimplesoap/issues/70),
when collections are returned.```python
from aiopss.client import AsyncSoapClient
from datetime import datetime
import asyncio@asyncio.coroutine
def example():
client = AsyncSoapClient(
wsdl="http://example.com/soap.wsdl",
location="http://localhost:5000/testendpoint"
)yield from client.connect()
response = yield from client.receiveSMSStatuses(
username='jonas',
password='password',
statuses=[
{'Status':
{
'messageID': 1,
'countryCode': 45,
'number': '26159917',
'latestStatus': datetime.today(),
'statusCode': '1',
'errorCode': '2',
}
}
]
)
print(response)loop = asyncio.get_event_loop()
loop.run_until_complete(example())
loop.close()
```