from json import load f = open('sign.txt', "w") f.write(data['sha'][0:7])