How to get values from app to another custom app?

Hello,

I want to get a values from sales_invoice.py which is in ERPNext
and received it in a custom app in test.py and do some calculations to this values.

So, Any idea if I have to use monkey_patch or override?
How can I access the values in different app in python?

Note: I don’t want to do any change to sales_invoice.py in ERPNext app.