file name is contract.py
from web3 import Web3
#from solc import compile_source
#from web3.contract import ConciseContract
#from web3.auto import Web3, EthereumTesterProvider
# code here
ganache_url = "http://127.0.0.1:7545"
web3 = Web3(Web3.HTTPProvider(ganache_url))
acct1 = "REMOVED"
acct2 = "REMOVED"
private_key = "REMOVED"
nonce = web3.eth.getTransactionCount(acct1)
tx = {
'nonce': nonce,
'to' : acct2,
'value': web3.toWei(1, 'ether'),
'gas' : 2000000,
'gasPrice': web3/toWei('50', 'gwei')
}
signed_tx = web3.eth.account.signTransaction(tx, private_key)
tx_hash = web3.eth.sendRawTransaction(signed_tx.sendRawTransaction)
print(tx_hash)