shutupflanders / moneydashboard

Python library for MoneyDashboard
MIT License
12 stars 4 forks source link

NameError: name 'MoneyDashboard' is not defined #11

Open J0han3s opened 3 years ago

J0han3s commented 3 years ago

Hi , i get the below error.

File "moneydashboard1.py", line 5, in balances = json.loads(md.get_balances()) NameError: name 'json' is not defined

shutupflanders commented 3 years ago
import json

at the top of the file should fix that.

J0han3s commented 3 years ago

@shutupflanders - thank you so much. This has helped and this now works. Just to confirm, that i will be able to continually use this file with having to do any other re-authentication?

This is my current file:

from moneydashboard import MoneyDashboard
import moneydashboard
import json

md = MoneyDashboard(email="gpkf***@gmail.com", password="pass****rd")
balances = json.loads(md.get_balances())
print('Net Balance: ', balances['net_balance'])

Are there other commands I could run in python, apart from the current balance. Such as to view balance in different accounts or with different tags?

Thanks again

shutupflanders commented 3 years ago

Not currently, but I'll see if I get time today to add some more in, currently just working on bringing in an array of different balance types for now

shutupflanders commented 3 years ago

@gkchim if you pull the latest v1.0.11 branch there's now an additional balance breakdown in the get_balances response, I've also added a get_transactions method to pull the last 7 days worth by default (see the README)

J0han3s commented 3 years ago

wboohoo! you're a star, thank you !

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Martin Brooksbank @.> Sent: Thursday, September 16, 2021 4:55:20 PM To: shutupflanders/moneydashboard @.> Cc: gkchim @.>; Mention @.> Subject: Re: [shutupflanders/moneydashboard] NameError: name 'MoneyDashboard' is not defined (#11)

@gkchimhttps://github.com/gkchim if you pull the latest v1.0.11 branch there's now an additional balance breakdown in the get_balances response, I've also added a get_transactions method to pull the last 7 days worth by default (see the README)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/shutupflanders/moneydashboard/issues/11#issuecomment-921026205, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AK3CPFFF2ENXSI3NIYAVLTLUCIHORANCNFSM5DAWL5QA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

J0han3s commented 2 years ago

Also checking whether this functionality on the home assistant addon?

Thanks


From: Martin Brooksbank @.> Sent: 16 September 2021 16:55 To: shutupflanders/moneydashboard @.> Cc: gkchim @.>; Mention @.> Subject: Re: [shutupflanders/moneydashboard] NameError: name 'MoneyDashboard' is not defined (#11)

@gkchimhttps://github.com/gkchim if you pull the latest v1.0.11 branch there's now an additional balance breakdown in the get_balances response, I've also added a get_transactions method to pull the last 7 days worth by default (see the README)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/shutupflanders/moneydashboard/issues/11#issuecomment-921026205, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AK3CPFFF2ENXSI3NIYAVLTLUCIHORANCNFSM5DAWL5QA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.