Decode ethereum's account keystore file by Python

in #python37 years ago (edited)

Step 1:
pip install web3 //my web3 version is 3.16.5
pip install ethereum

Step 2:
import ethereum.tools.keys as keys

       with open(keystorepath) as file_object:
               contents = file_object.read()
       privatekey = keys.decode_keystore_json(json.loads(contents),accountpassword)

Now you can sendRawTransaction with privatekey