Suds is a lightweight SOAP-based web service client for Python. This is a community fork of the `suds-jurko` fork, actively maintained to support modern Python versions (>=3.7). It provides an intuitive RPC-like interface to consume web services by objectifying WSDL-defined types without explicit class generation. The latest version is 1.2.0, released in August 2024, with a release cadence that has seen several updates in recent years.
pip install sudsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to create a `suds` client, inspect available service methods, and invoke a simple SOAP operation using a publicly available temperature conversion WSDL. It also includes basic logging configuration essential for debugging SOAP interactions.
Ensure your project uses Python 3.7 or a newer version. Install using `pip install suds` to get the latest Python 3 compatible community fork.
Always use `client.factory.create('TypeName')` to instantiate complex types defined in the WSDL. This ensures `suds` correctly sets the `xsi:type` attribute in the SOAP request.To enable detailed logging, configure Python's standard `logging` module. Set levels to `DEBUG` for `suds.client`, `suds.transport`, `suds.xsd.schema`, and `suds.wsdl` to see SOAP messages and other internal processes.
Review code that relies on optional attributes being implicitly present in instantiated objects. You may need to explicitly check for attribute existence or modify your handling of service object structures.
Use the `suds.xsd.doctor.ImportDoctor` to fix broken schema imports at runtime if you encounter `schema not found` or similar errors during client initialization. This allows you to patch WSDLs with missing or incorrect schema references. For example: `from suds.xsd.doctor import Import, ImportDoctor; imp = Import('http://schemas.xmlsoap.org/soap/encoding/'); doctor = ImportDoctor(imp); client = Client(wsdl_url, doctor=doctor)`.Ensure the correct `suds` package is installed using `pip install suds`. If `suds-jurko` is present, consider uninstalling it first with `pip uninstall suds-jurko`.
Verify the WSDL URL is correct and accessible. Use `print(client.sd())` to inspect the WSDL's schema definition and find the exact, case-sensitive name of the type you wish to create.
Confirm the WSDL URL is correct and the service is available. Use `print(client)` or `print(client.service)` to inspect the available service ports and their methods, paying close attention to case sensitivity and parameters.
For development/testing, disable SSL verification: `from suds.transport.https import HttpAuthenticated` and then `client = Client(wsdl_url, transport=HttpAuthenticated(verify=False))`. For production, ensure the server has a valid, trusted certificate or properly configure your system's certificate trust store.
No dependency data recorded yet.