Python requests and ms sql

Please refer to our [Stack Overflow tag](https://stackoverflow.com/questions/tagged/python-requests) for guidance.
How to automate the process of taking information so that I do not manually register user, pass, KodDoc, dateStart, dateEnd in xml, and this information was taken from ms sql, and exactly as many times as I have users in the database.
For example, I have 60 users and I want to create 60 xml files, or to create 1 file with information for 60 users`your text`


`import requests

# SOAP request URL
url = "http://"

# structured XML
payload = """<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <getForm30 xmlns="http://tempuri.org/">
      <user>string</user>
      <pass>string</pass>
      <KodDoc>string</KodDoc>
      <dateStart>01.01.2022</dateStart>
      <dateEnd>31.12.2022</dateEnd>
    </getForm30>
  </soap:Body>
</soap:Envelope>"""

payload1 = """<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <getForm30 xmlns="http://tempuri.org/">
      <user>string</user>
      <pass>string</pass>
      <KodDoc>string</KodDoc>
      <dateStart>01.01.2022</dateStart>
      <dateEnd>31.12.2022</dateEnd>
    </getForm30>
  </soap:Body>
</soap:Envelope>"""



# headers
headers = {
    'Content-Type': 'text/xml; charset=utf-8'
}
# POST request
response = requests.request("POST", url, headers=headers, data=payload.encode('utf-8'))
response1 = requests.request("POST", url, headers=headers, data=payload1.encode('utf-8'))

# prints the response
#print(response.text)
#print(response)

file = open('D://bdseo.xml','w')
file.write(response.text)
file.close()

file = open('D://bdseo1.xml','w')
file.write(response1.text)
file.close()`



import requests


url = "http://"


payload = """<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <getForm30 xmlns="http://tempuri.org/">
      <user>string</user>
      <pass>string</pass>
      <KodDoc>string</KodDoc>
      <dateStart>01.01.2022</dateStart>
      <dateEnd>31.12.2022</dateEnd>
    </getForm30>
  </soap:Body>
</soap:Envelope>"""

payload1 = """<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <getForm30 xmlns="http://tempuri.org/">
      <user>string</user>
      <pass>string</pass>
      <KodDoc>string</KodDoc>
      <dateStart>01.01.2022</dateStart>
      <dateEnd>31.12.2022</dateEnd>
    </getForm30>
  </soap:Body>
</soap:Envelope>"""




headers = {
    'Content-Type': 'text/xml; charset=utf-8'
}

response = requests.request("POST", url, headers=headers, data=payload.encode('utf-8'))
response1 = requests.request("POST", url, headers=headers, data=payload1.encode('utf-8'))


#print(response.text)
#print(response)

file = open('D://bdseo.xml','w')
file.write(response.text)
file.close()

file = open('D://bdseo1.xml','w')
file.write(response1.text)
file.close()`


import requests


url = "http://"


payload = """<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <getForm30 xmlns="http://tempuri.org/">
      <user>string</user>
      <pass>string</pass>
      <KodDoc>string</KodDoc>
      <dateStart>01.01.2022</dateStart>
      <dateEnd>31.12.2022</dateEnd>
    </getForm30>
  </soap:Body>
</soap:Envelope>"""

payload1 = """<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <getForm30 xmlns="http://tempuri.org/">
      <user>string</user>
      <pass>string</pass>
      <KodDoc>string</KodDoc>
      <dateStart>01.01.2022</dateStart>
      <dateEnd>31.12.2022</dateEnd>
    </getForm30>
  </soap:Body>
</soap:Envelope>"""




headers = {
    'Content-Type': 'text/xml; charset=utf-8'
}

response = requests.request("POST", url, headers=headers, data=payload.encode('utf-8'))
response1 = requests.request("POST", url, headers=headers, data=payload1.encode('utf-8'))


#print(response.text)
#print(response)

file = open('D://bdseo.xml','w')
file.write(response.text)
file.close()

file = open('D://bdseo1.xml','w')
file.write(response1.text)
file.close()

123