-
Notifications
You must be signed in to change notification settings - Fork 13
Add TRANSFER_OUT and cleanup API usage exceptions #15
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
Conversation
de7edf1 to
5feb4b1
Compare
|
Let me know if anything needs to be tweaked, have few more changes coming. But its getting tricky to make a new branch and change stuff without it conflicting with this, so I will wait until this gets cleared up. Anything after this is probably just formatting / less-critical though, unless I actually find something that is missing that I need. So if you wanted, you can publish to pypi after this PR. I also was curious, I am assuming you apply this library to some of your pet projects. Can you share any short details or insights as to how you ended up using the data/API. Just seeing if I can get any inspiration or ideas for usage. Or perhaps if the dependent projects are open-source, I wanted to see how that looks like. |
…ecifying multiple accounts when calling getActivities() Ref: gboudreau/ws-api-python#15
I'm using it in my own mint-alternative: https://github.com/gboudreau/easymalt (I doubt anyone else but me uses this.) I also have another single-page app that I use to monitor my investments. So I use this library to track transactions in my investments accounts, (buy, sell, div, etc.) and calculate a lot of things, and display graphs and whatnot in that page, to monitor those investments. |
|
This change is now causing errors on my computer: |
|
OK, I fixed those and some more using Optional and Union typing. |
|
Hmm strange, I wonder why it wasn't getting flagged on my end. Even though I am not using Pycharm anymore, I didn't get those errors in IDE or runtime. But given that your printed python version is already beyond that, perhaps/suspect that the project level python is different or lower ... I wonder why. |
|
Wonder if it is the Line 21 in 3d8ea4f
I am using (I am ok either way though, I was just trying to figure out why the difference happened. Also I find the prior notation without explicitly specifying |
|
https://docs.astral.sh/ruff/rules/non-pep604-annotation-optional/ Ah, its definitely using a very old version of Python as the effective one. (probably as part of packaging with setup.py and PyPI) |

INSTITUTION_TRANSFER_INTENT-TRANSFER_OUTUnfortunately, there is no supporting information (even in the web-interface, not even amounts) when you transfer-out.
As you can see for yourself:
So I added a description with atleast whatever was provided with the
activity, leading to:get_activitiesWhile there is bunch more places to add static type hinting, docstrings and fix up, decided to focus on fixing some of the problems seen externally when using the API (with just the sample code from theREADME.mdws-api-python/ws_api/wealthsimple_api.py
Lines 260 to 262 in 9de7320
The changes enforce that the returned type will be
list[Any](still keeps it generic, but we know the shape of the data atleast)Also can choose to provide multiple
account-idsnow if the user wants.login(), so ended up cleaning that up as well.Rest is just minimal formatting/cleanup, I added some dev/local only dependencies and excluded them from remote.