Skip to main content

Wrapper around suds-jurko that adds django_statsd instrumentation and improved proxy support.

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

This package is a wrapper around suds that adds django_statsd instrumentation and improved HTTP proxy support.

Usage

  1. Install the instrumented-soap package (pip install git+ssh://git@gitlab.com/thelabnyc/instrumented-soap.git#r1.0.0).

  2. Configure using your Django project’s settings.py file. The available options and their defaults are shown below. All configuration is optional.:

    # Enables Suds request/response logging
    DEBUG = True
    
    # Remove the Suds file cache of pickled WSDLs upon process exit
    SOAP_REMOVE_CACHE_ON_EXIT = False
    
    # Optional mapping of http(s):// WSDL URLs => file:// URLs to locally saved versions of the WSDL
    SOAP_WSDL_INTERCEPTS = {}
    
    # Optional HTTP/HTTPS proxy URL
    SOAP_PROXY_URL = None
    
    # Timeouts for opening WSDLs and sending method calls. Should be a
    # tuple containing (1) the TCP connect timeout and (2) the response
    # timeout.
    SOAP_OPEN_TIMEOUT = (3.05, 27)
    SOAP_SEND_TIMEOUT = (3.05, 10)
  3. Use with your SOAP API.:

    from soap import get_client
    
    client = get_client('http://some.dope.soap.api.com/path?WSDL', 'DOPE API LOG PREFIX')
    resp = client.service.DoStuff(42)
    print(resp)

Changelog

1.1.0

  • Adds some better testing tools for consumer code.
    • New class soap.tests.XMLAssertions with methods: assertNodeCount, assertNodeText, assertNodeAttributes. Uses lxml if it is installed, but otherwise falls back to elementree.

    • Class soap.tests.SoapTest now inherits from soap.tests.XMLAssertions

    • Add optional parameter test_request to soap.tests.SoapTest._build_transport_with_reply. Pass in a function to have it called (with the request as a parameter) before the mocked reply is sent. Useful to write unit tests to make sure your SOAP requests are well-formed.

1.0.2

  • Use docker executor for tests.

  • Use versiontag>=1.0.3

1.0.1

  • Updated README

1.0.0

  • Initial release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

instrumented-soap-1.1.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

instrumented_soap-1.1.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file instrumented-soap-1.1.0.tar.gz.

File metadata

File hashes

Hashes for instrumented-soap-1.1.0.tar.gz
Algorithm Hash digest
SHA256 2df1c038da25fc60a007d8e4b0f003baa17ce9185d70fbcefeed7b4864d3bd10
MD5 a72ad01d7c522d52d9fa93510bfaf5be
BLAKE2b-256 f76d416e3f95d525b6124fb003447b18d4d2dcd8bbc87eb2cea243f48038ff3d

See more details on using hashes here.

File details

Details for the file instrumented_soap-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for instrumented_soap-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7b148398015d4e53c37a56bd51a1f62d708d9819e579cfd3af363efbcc20faa3
MD5 35967f28c94daea6b8d50e224acfda9e
BLAKE2b-256 adf1862fd4a7d9e4429d423c6e92c47223116685d2ee4b8e05e685ecc49ddc3f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page