Fee paid is total inputs minus total outputs. So you can calculate the fee yourself.
Yes I can calculate the total fee but I would also like to calculate the fee rate in sats/vbyte, and to do this I must measure the size of the transaction in Weight Units or some other measurement, then divide the total fee by vsize.
Some python function that does it without additional libraries would be useful, alternatively just point to some place in bitcoinlib or something where transactions are deserialized and I can rip that part out.
in a terminal it is
if you use the python console, you need to comply with the python syntax:
getrawtransaction("txid")
(with quotes)
In the gui you can also use the menu: Tools -> Load Transaction -> From the blockchain
Is it what you need
Unfortunately, the raw transaction does not contain information about its fee.