Skip to content

MirkoDziadzka/py-money

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

py-money

A Python interface to MoneyMoney

Examples

import money

instance = money.MoneyMoney()

for account in instance.accounts():
    print(f"{account.name}: {account.balance:0.2f} {account.currency}")
    for tx in account.transactions():
        print(f"Transaction: {tx.payee}: {tx.amount:0.2f}")

Only print new transactions (checked=False) which are already booked. After printing them out, set the state to 'checked' so that they will not be seen in the next invocation.

for account in instance.accounts():
    for tx in account.transactions(age=90, booked=True, checked=False):
        print(f"New transaction: {tx}")
        tx.set_checkmark()

Access all your portfolios

print("Check all Portfolios")
for account in instance.portfolios():
    print(f"Checking portfolio: {account.name}")
    for p in account.positions():
        print(f"Have {p.quantity} {p.type}s from '{p.name}' at price {p.price} {p.currencyOfPrice}")

Quality Gate Status

About

A Python interface to MoneyMoney

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages