GithubHelp home page GithubHelp logo

jessonsh / asyncio-pysimplesoap Goto Github PK

View Code? Open in Web Editor NEW

This project forked from brunsgaard/asyncio-pysimplesoap

0.0 2.0 0.0 847 KB

Python Simple SOAP client with asyncio support

Python 100.00%

asyncio-pysimplesoap's Introduction

Asyncio PySimpleSOAP

The aiopss package is a fork of PySimpleSoap v1.16 and offers a SOAP client for asyncio PEP-3146.

The fork has been modified by replacing internal functions with coroutines and aiohttp 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 project.

Note that there is a strange bug in PySimpleSoap with python3, when collections are returned.

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()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.