Legacy Account Key
Import extend from web3py_ext to extend web3 to kaia web3
Import necessary utils from web3 and eth_account
Define a web3 connection using Web3.HTTPProvider and RPC endpoint
Also, you can change the provider URL from baobab to allthatnode
Define a sender's wallet from private key using Account.from_key
Create a transaction with from, to and value fields to transfer.
from: the sender's address, to: target address to receive kaia.
value field means how many kaia you want to send and you can use the Web3.to_peb utils to convert kaia to peb unit.
Use fill_transaction to add rest of the fields of the transaction like gas limit, Nonce, etc. You can print all the fields after this line if you want to see
Sign the transaction with sender private key
Sending the signed transaction to the network and waiting receipt until it is completely executed in the blockchain
Recover sender address with Account.recover_transaction from signed transaction