{"id":4789,"library":"suds-py3","title":"Suds-py3","description":"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.","status":"active","version":"1.4.5.0","language":"en","source_language":"en","source_url":"https://github.com/cackharot/suds-py3","tags":["SOAP","web services","client","wsdl","python3"],"install":[{"cmd":"pip install suds-py3","lang":"bash","label":"Install suds-py3"}],"dependencies":[],"imports":[{"note":"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'.","wrong":"import suds.client","symbol":"Client","correct":"from suds.client import Client"}],"quickstart":{"code":"import os\nfrom suds.client import Client\n\n# Replace with your WSDL URL. Use a placeholder for demonstration.\n# A public WSDL for testing temperature conversion:\n# wsdl_url = \"http://www.w3schools.com/xml/tempconvert.asmx?WSDL\"\nwsdl_url = os.environ.get('SOAP_WSDL_URL', 'http://www.w3schools.com/xml/tempconvert.asmx?WSDL')\n\ntry:\n    # Initialize the SOAP client\n    client = Client(wsdl_url)\n    print(f\"Connected to SOAP service at: {wsdl_url}\")\n\n    # Optionally, print available services and methods\n    # print(client)\n    # print(\"Available services:\", client.service)\n    # print(\"Available factory types:\", client.factory)\n\n    # Example: Call a method (assuming TemperatureConvert service)\n    # If the WSDL had authentication, you'd pass username/password to Client constructor\n    # client = Client(wsdl_url, username=os.environ.get('SOAP_USERNAME', ''), password=os.environ.get('SOAP_PASSWORD', ''))\n\n    # Convert Fahrenheit to Celsius\n    fahrenheit_temp = 32.0\n    celsius_temp = client.service.FahrenheitToCelsius(fahrenheit_temp)\n    print(f\"{fahrenheit_temp}°F is {celsius_temp}°C\")\n\n    # Convert Celsius to Fahrenheit\n    celsius_temp_input = 0.0\n    fahrenheit_temp_output = client.service.CelsiusToFahrenheit(celsius_temp_input)\n    print(f\"{celsius_temp_input}°C is {fahrenheit_temp_output}°F\")\n\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")\n    print(\"Please ensure the WSDL URL is correct and the service is accessible.\")\n    print(\"For debugging, you can enable logging: import logging; logging.getLogger('suds.client').setLevel(logging.DEBUG)\")","lang":"python","description":"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."},"warnings":[{"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.","message":"The 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.","severity":"breaking","affected_versions":"All versions of `suds-py3` (relative to the original `suds`)"},{"fix":"Upgrade to `suds-py3` version 1.4.4.1 or newer to mitigate this vulnerability.","message":"Older 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.","severity":"breaking","affected_versions":"< 1.4.4.1"},{"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.","message":"Handling 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.","severity":"gotcha","affected_versions":"All versions"},{"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())`.","message":"SOAP 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.","severity":"gotcha","affected_versions":"All versions"},{"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.","message":"Debugging 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.","severity":"gotcha","affected_versions":"All versions"},{"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.","message":"When 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.","severity":"gotcha","affected_versions":"All versions"},{"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.","message":"The 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.","severity":"gotcha","affected_versions":"1.4.5.0"}],"env_vars":null,"last_verified":"2026-04-12T00:00:00.000Z","next_check":"2026-07-11T00:00:00.000Z"}