Connecting to SOAP API using Python
Use Python sample code and language details here to connect your development environment to Marketing Cloud Engagement using SOAP API.
Use the connection to the SOAP API to test your calls and perform various tasks, such as sending email and retrieving tracking information.
Download both the latest version of Python and the Zolera SOAP infrastructure and follow the appropriate instructions to install the service on your computer. You can also use the Marketing Cloud Engagement Python SDK.
Use wsdl2py to generate Python stubs based on your Marketing Cloud Engagement WSDL.
See the WSDL To Python Code section of ZSI's User Guide.
When generating stubs for a service called PartnerAPI, the tool generates the necessary files using the command below:
Use the client.py script below to generate the Python stubs, add security headers, and sends and receives a SOAP message by calling the PersonServices's getEmail() method. You must modify this code to interact with the SOAP API.
Use the following command to run the client: