Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

NameError: name 'MoneyDashboard' is not defined #11

Open
J0han3s opened this issue Aug 29, 2021 · 6 comments
Open

NameError: name 'MoneyDashboard' is not defined #11

J0han3s opened this issue Aug 29, 2021 · 6 comments

Comments

@J0han3s
Copy link

J0han3s commented Aug 29, 2021

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
Copy link
Owner

import json

at the top of the file should fix that.

@J0han3s
Copy link
Author

J0han3s commented Aug 31, 2021

@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
Copy link
Owner

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
Copy link
Owner

@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
Copy link
Author

J0han3s commented Sep 16, 2021 via email

@J0han3s
Copy link
Author

J0han3s commented Nov 19, 2021 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants