with open(filename, "w", encoding="utf-8") as f: f.write(data))
with open(filename, "w", encoding="utf-8") as f: f.write(json.dumps(list(data), indent=2, ensure_ascii=False))
with open(datafile, "wb") as f: pickle.dump(data, f) with open(datafile, "rb") as f: data = pickle.load(f)
assert API_KEY != None, "API key should be configured."