bvanelli / actualpy

Python API implementation for Actual server - reference https://actualbudget.org/
20 stars 4 forks source link

feat: Add balance attribute to account. #23

Closed bvanelli closed 3 months ago

bvanelli commented 3 months ago

Includes the property for balance on the accounts object. Here is the result:

image

The result of the property:

from actual import Actual
from actual.queries import get_accounts

with Actual("http://localhost:5006", password="mypass", file="My Finances") as actual:
    accounts = get_accounts(actual.session)
    for acct in accounts:
        print(f"Balance for {acct.name} is {acct.balance}")

The output from the script:

Balance for SimpleFIN Savings is 115524.49
Balance for SimpleFIN Checking is 26134.41

Closes #21

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 96.16%. Comparing base (2bcc2cb) to head (fd2a1b4).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #23 +/- ## ========================================== + Coverage 94.75% 96.16% +1.40% ========================================== Files 9 9 Lines 1412 1434 +22 ========================================== + Hits 1338 1379 +41 + Misses 74 55 -19 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.