Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add balance attribute to account. #23

Merged
merged 4 commits into from
Jun 1, 2024
Merged

Conversation

bvanelli
Copy link
Owner

@bvanelli bvanelli commented May 25, 2024

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

Copy link

codecov bot commented May 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files
@@            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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

bvanelli added 3 commits May 26, 2024 22:35
Features:

- Add balances to Accounts, Payees and Categories as a property
- Add account filter for get_transactions method

Fixes:

- Fix endpoint for renaming user files
- Exclude deleted transactions, categories and payees from relationships

Tests:

- Add test for renaming user files
- Add test for relationships that include deleting objects
@bvanelli bvanelli merged commit f7d81a1 into main Jun 1, 2024
7 checks passed
@bvanelli bvanelli deleted the 21-accounts-balance branch June 1, 2024 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

get_accounts does not return a balance
2 participants