Registry / http-networking / suds-py3

suds-py3

JSON →
library1.4.5.0pypypi✓ verified 22d ago

Suds-py3 is a lightweight Python SOAP client that provides a service proxy for Web Services, originally forked from the unmaintained Python 2 `suds` library to support Python 3. It allows users to interact with SOAP-based web services without deep concerns about WSDL complexities, presenting an RPC-like interface. The current version is 1.4.5.0, with releases focused on bug fixes and Python 3 compatibility, though its maintenance status has been flagged as low by OpenSSF scorecard.

pip install suds-py3
INSTALL
IMPORT
SIG · SUDS-PY3
S
suds-py3
http-networkingpythonv1.4.5.0
Install
1.6s avg
Import
170ms
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.4.5.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.180s · 19.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.160s · 20MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Client
from suds.client import Client
import suds.client
While 'import suds' might work for some internal modules due to its structure, the standard and recommended way to access the Client class is via 'from suds.client import Client'.

The quickstart demonstrates connecting to a SOAP web service using `suds-py3`'s `Client` and invoking a simple method. It includes an example with a public temperature conversion WSDL. For services requiring authentication, username and password can be passed to the Client constructor. Enabling debug logging for `suds.client` is recommended for troubleshooting SOAP message exchanges.

import os from suds.client import Client # Replace with your WSDL URL. Use a placeholder for demonstration. # A public WSDL for testing temperature conversion: # wsdl_url = "http://www.w3schools.com/xml/tempconvert.asmx?WSDL" wsdl_url = os.environ.get('SOAP_WSDL_URL', 'http://www.w3schools.com/xml/tempconvert.asmx?WSDL') try: # Initialize the SOAP client client = Client(wsdl_url) print(f"Connected to SOAP service at: {wsdl_url}") # Optionally, print available services and methods # print(client) # print("Available services:", client.service) # print("Available factory types:", client.factory) # Example: Call a method (assuming TemperatureConvert service) # If the WSDL had authentication, you'd pass username/password to Client constructor # client = Client(wsdl_url, username=os.environ.get('SOAP_USERNAME', ''), password=os.environ.get('SOAP_PASSWORD', '')) # Convert Fahrenheit to Celsius fahrenheit_temp = 32.0 celsius_temp = client.service.FahrenheitToCelsius(fahrenheit_temp) print(f"{fahrenheit_temp}°F is {celsius_temp}°C") # Convert Celsius to Fahrenheit celsius_temp_input = 0.0 fahrenheit_temp_output = client.service.CelsiusToFahrenheit(celsius_temp_input) print(f"{celsius_temp_input}°C is {fahrenheit_temp_output}°F") except Exception as e: print(f"An error occurred: {e}") print("Please ensure the WSDL URL is correct and the service is accessible.") print("For debugging, you can enable logging: import logging; logging.getLogger('suds.client').setLevel(logging.DEBUG)")
Debug
Known issues
breakingThe original `suds` library (Python 2) is unmaintained, and its documentation has disappeared. `suds-py3` is a separate fork for Python 3 compatibility and ongoing fixes. Ensure you are installing `suds-py3` for Python 3 projects to avoid compatibility issues and use the maintained version.
fix
Always `pip install suds-py3` for Python 3 applications. Consult `suds-py3` specific documentation at https://suds-py3.readthedocs.io/en/latest/ for the correct usage.
affects: All versions of `suds-py3` (relative to the original `suds`)
breakingOlder versions of `suds` and `suds-py3` (specifically `suds` <= 0.4 and `suds-py3` < 1.4.4.1) were vulnerable to CVE-2013-2217, an improper link resolution before file access, allowing local users to redirect SOAP queries via a symlink attack on temporary cache files.
fix
Upgrade to `suds-py3` version 1.4.4.1 or newer to mitigate this vulnerability.
affects: < 1.4.4.1
gotchaHandling Unicode characters with web services, especially when interfacing with older or poorly configured SOAP services, can lead to `UnicodeDecodeError` or `UnicodeEncodeError`. While `suds-py3` aims to be Python 3 compatible, explicit encoding/decoding may still be necessary at the application level.
fix
Ensure all string inputs and outputs are correctly handled with appropriate encodings (e.g., UTF-8). Decode incoming data as early as possible to `unicode` (Python 3 strings) and encode to bytes only when sending.
affects: All versions
gotchaSOAP WSDLs and schemas are often malformed or contain incorrect import rules, leading to `suds` failing to parse the service definition correctly. `suds` provides 'doctors' to mend broken schemas at runtime.
fix
Utilize `suds.xsd.doctor.ImportDoctor` (or custom doctors) to fix common schema import problems. Pass a doctor instance to the `Client` constructor via `client_options=dict(doctor=ImportDoctor())`.
affects: All versions
gotchaDebugging SOAP interactions can be challenging. `suds-py3` relies on Python's standard `logging` module, and by default, detailed SOAP messages (sent/received) are not shown.
fix
To see SOAP messages and HTTP headers for debugging, configure Python's logging. A common practice is `import logging; logging.basicConfig(level=logging.INFO); logging.getLogger('suds.client').setLevel(logging.DEBUG)` to get detailed output.
affects: All versions
gotchaWhen working with complex types defined in the WSDL, merely passing Python dictionaries may not always work as expected for creating input objects. `suds-py3` provides a factory to explicitly create these types.
fix
Use `client.factory.create('TypeName')` to instantiate complex types defined in the WSDL. This ensures the object is correctly structured for the SOAP service.
affects: All versions
gotchaThe OpenSSF Scorecard indicates that `suds-py3` has low activity in terms of commits and issue resolution (0 commits/issues in the last 90 days as of March 2, 2026). This suggests that active development might be slow.
fix
Be aware that new features or rapid bug fixes might not be implemented quickly. Consider contributing to the project or having a fallback plan if critical issues arise that require upstream changes.
affects: 1.4.5.0
Errors
Common errors & fixes
ImportError: cannot import name 'Client' from 'suds'
The 'Client' class is located within the 'suds.client' submodule, not directly under the 'suds' package.
fix
from suds.client import Client
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED]
The SOAP service's SSL certificate cannot be verified by the Python environment, often due to self-signed certificates or missing root CAs.
fix
Pass `verify=False` to the `suds.transport.https.HttpAuthenticated` (or `suds.transport.http.HttpTransport`) constructor to disable certificate verification.
```python
from suds.client import Client
from suds.transport.https import HttpAuthenticated # or suds.transport.http.HttpTransport

transport = HttpAuthenticated(username='user', password='password', verify=False)
client = Client('https://example.com/service?wsdl', transport=transport)
```
suds.WebFault: Server raised fault:
The remote SOAP web service encountered an error and returned a SOAP Fault, which suds-py3 wraps as a `WebFault` exception.
fix
Catch the `suds.WebFault` exception and inspect its `fault` attribute to get details from the service.
```python
from suds.client import Client
from suds import WebFault

try:
    client = Client('http://example.com/service?wsdl')
    client.service.some_method()
except WebFault as e:
    print(f"SOAP Fault received: {e.fault}")
```
AttributeError: 'Service' object has no attribute 'methodName'
The method being called ('methodName') is not defined in the WSDL for the service, is misspelled, or the WSDL was parsed incorrectly.
fix
Print the `client` object to inspect the available service methods and their correct names as exposed by the WSDL.
```python
from suds.client import Client
client = Client('http://example.com/service?wsdl')
print(client) # This will show available services and methods
# Then call the correct method, e.g., client.service.correctMethodName()
```
Upgrade
Version history
1.4.5.0latest on PyPI · released Nov 15, 2021
Audit
Dependencies

No dependency data recorded yet.

Agent activity
66 hits · last 30 days
node
62
Amazon
1
OpenAI (training)
1
Resources