Skip to content

Instantly share code, notes, and snippets.

@icebeam7
Last active October 21, 2021 19:00
Show Gist options
  • Save icebeam7/cb098afb0f1bf8ecd42079e7b1efb8d7 to your computer and use it in GitHub Desktop.
Save icebeam7/cb098afb0f1bf8ecd42079e7b1efb8d7 to your computer and use it in GitHub Desktop.
import os
import requests
import zipfile
if export.status == "Done":
# Éxito, ahora podemos descargarlo
export_file = requests.get(export.download_uri)
with open("export.zip", "wb") as file:
file.write(export_file.content)
# Descomprime la exportación descargada
if not os.path.exists("./model"):
os.mkdir("./model");
zip_ref = zipfile.ZipFile("export.zip", 'r')
zip_ref.extractall("./model")
zip_ref.close()
print("Data extracted in: ./model")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment