Install & Compatibility
Where this runs
tested against v4.3.3 · 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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.494s · 35.5MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.5s · import 0.480s · 36MB
34MB installed
● package 34MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Client
✓ from zeep import Client
AsyncClient
✓ from zeep import AsyncClient
Settings
✓ from zeep import Settings
Transport
✓ from zeep.transports import Transport
AsyncTransport
✓ from zeep.transports import AsyncTransport
Initializes a Zeep client with a WSDL URL and makes a synchronous call to a public SOAP service. This example demonstrates basic client instantiation and calling a service operation. Replace the WSDL_URL with your target service's WSDL. For asynchronous operations, use `AsyncClient` and `AsyncTransport`.
import os
from zeep import Client
# A public WSDL for demonstration purposes
wsdl_url = os.environ.get('ZEEP_WSDL_URL', 'http://www.webservicex.net/ConvertSpeed.asmx?WSDL')
try:
client = Client(wsdl_url)
# Inspect available services and operations
print(f"Service operations: {list(client.service._operations.keys())}")
# Call a service operation
result = client.service.ConvertSpeed(100, 'kilometersPerhour', 'milesPerhour')
print(f"100 km/h in mph: {result}")
except Exception as e:
print(f"An error occurred: {e}")
print("Please ensure the WSDL URL is accessible and valid.")
print("You can try setting the ZEEP_WSDL_URL environment variable.")
Debug
Known issues
breakingZeep v4.3.0 dropped official support for Python 3.7 and 3.8. Version 4.2.0 dropped support for Python 3.6. Ensure your Python environment meets the `requires_python>=3.8` requirement.fixUpgrade your Python environment to 3.9 or newer. The latest versions of Zeep (e.g., 4.3.2) support Python 3.9 through 3.13.
affects: >=4.3.0, >=4.2.0
breakingStarting with Zeep v4.3.0, the project fully migrated to `pyproject.toml`, removing `setup.py`. This impacts build systems that might rely on the presence of `setup.py`.fixUpdate your build and packaging tools to correctly handle projects using `pyproject.toml` and PEP 517/518 standards.
affects: >=4.3.0
gotchaA regression in parsing `xsd:Date` with negative timezones was introduced and fixed in version 4.3.1. This issue could occur when using `isodate==0.7.2` with `zeep` versions prior to 4.3.1, leading to incorrect date interpretations or exceptions.fixUpgrade to Zeep 4.3.1 or newer to correctly handle `xsd:Date` values, especially when dealing with negative timezone offsets.
affects: <4.3.1
gotchaWhen using `httpx` for asynchronous transport, passing `data` for POST requests might trigger `DeprecationWarning` in older `httpx` versions. Zeep v4.2.0 includes a fix for this.fixUpgrade to Zeep 4.2.0 or newer to avoid `httpx` deprecation warnings related to `post data`. Ensure your `httpx` version is also up-to-date.
affects: <4.2.0
gotchaDisabling TLS/SSL verification (e.g., `session.verify = False` for synchronous `requests`-based transport, or similar for `httpx`) is generally discouraged in production environments due to security risks. Zeep will pass these settings to the underlying transport.fixAlways use proper certificate validation by providing a path to a CA bundle (`session.verify = 'path/to/ca_bundle.pem'`) or a client certificate, rather than disabling verification.
affects: All
gotchaZeep operates in a 'strict' mode by default, which rigorously checks WSDL and XML against standards. While robust, some non-compliant SOAP servers might require disabling strict mode (`zeep.Settings(strict=False)`), which could potentially lead to data-loss or unexpected behavior.fixOnly disable strict mode as a last resort for known non-compliant services, and thoroughly test the interaction to ensure data integrity.
affects: All
breakingFor `AsyncTransport` (used with `AsyncClient`), the `session` argument that previously accepted a `requests.Session` object is deprecated. It now expects an `httpx.AsyncClient` object to be passed via the `client` argument.fixWhen initializing `AsyncTransport`, provide an `httpx.AsyncClient` instance to the `client` parameter, e.g., `AsyncTransport(client=httpx.AsyncClient())`.
affects: >=4.0.0
breakingZeep failed to parse the WSDL due to invalid or malformed XML content received from the WSDL URL. This can occur if the URL is incorrect, the server is unreachable, or returns an error page (e.g., HTML) or corrupt data instead of a valid WSDL document. The error manifests as an 'Opening and ending tag mismatch' or similar low-level XML parsing error.fixEnsure the WSDL URL is correct and accessible. Verify that the server hosting the WSDL is operational and consistently returns a well-formed XML document conforming to the WSDL standard. Inspect the actual content returned by the WSDL URL to diagnose the issue (e.g., using `curl` or a web browser).
affects: All
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'zeep'
The `zeep` library has not been installed in the active Python environment or the environment is not correctly selected.
fixInstall the library using pip in your active Python environment: `pip install zeep`
xml.etree.ElementTree.ParseError: syntax error: line 1, column 0
Zeep failed to parse the WSDL document because it was not valid XML, often due to an incorrect URL or a server returning an HTML error page.
fixVerify the WSDL URL is correct and directly points to a valid XML WSDL document, checking network access and server responses.
zeep.exceptions.ValidationError: Missing required element {http://...}ElementName
A required element for the SOAP operation, as defined in the WSDL, was omitted or incorrectly provided when making the service call.
fixConsult the WSDL or the service's documentation to identify all mandatory parameters for the specific operation and ensure they are passed correctly.
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: ...
The WSDL document requires authentication, and the Zeep client was initialized without providing the necessary HTTP basic authentication credentials.
fixPass a `requests` session configured with `requests.auth.HTTPBasicAuth` (e.g., `session.auth = HTTPBasicAuth('user', 'pass')`) to the `zeep.Client` constructor's `transport` argument. zeep.exceptions.Fault: Server Error
The remote SOAP web service encountered an error and returned a SOAP Fault, indicating a problem on the server side or with the request's content.
fixInspect the `Fault` object's details (code, message) to understand the service-side error, correct your request parameters, or contact the service provider.
Upgrade
Version history
4.3.3latest on PyPI · released Jun 18, 2026
Audit
Dependencies
lxmlrequiredCore dependency for high-performance XML parsing and manipulation. Requires C development headers for libxml2 and libxslt.
requestsrequiredDefault HTTP transport layer for synchronous operations.
httpxrequiredUnderlying HTTP client for asynchronous operations (via zeep.AsyncTransport).
isodaterequiredUsed for parsing and handling ISO 8601 date and time formats within SOAP messages.