Skip to content

Instantly share code, notes, and snippets.

@david-botelho-mariano
Last active May 11, 2021 17:20
Show Gist options
  • Save david-botelho-mariano/44be10f8a3aae76d55cdf32dffadb474 to your computer and use it in GitHub Desktop.
Save david-botelho-mariano/44be10f8a3aae76d55cdf32dffadb474 to your computer and use it in GitHub Desktop.
download-xml.py
@app.route('/ceps/xml/')
def baixarCepsXML():
xml_base = dicttoxml(db_cep_json)
xml_base_str = xml.dom.minidom.parseString(str(xml_base))
xml_pretty = xml_base_str.toprettyxml()
return Response(xml_pretty, mimetype='application/xml')
#return xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment