I am using the following code to get the XML data from Salesforce Marketing Cloud:
import json import requests from xml.etree import ElementTree as ET auth