Login prompt wrapper and DeGiro constructor function#3
Login prompt wrapper and DeGiro constructor function#3konpsar wants to merge 6 commits intopforero:masterfrom
Conversation
Added to extend login function to dynamically ask password/totp from user, hiding password while typing. In this way, password doesn't have to be included in .py scripts.
Constructor enbales an option to automatically login when creating DeGiro instance. (using login_prompt)
Updated examples to include some use cases of constructor and login_prompt.
Jakub-CZ
left a comment
There was a problem hiding this comment.
Embeding login into __init__ seems unnecessary (saving just one line of code), perhaps even a bit confusing. But as long as it doesn't break anything, no harm done.
|
The way I dealt with password is that I import it (and other "secret" things) from It's very easy to implement, and I think it gives me the right balance of security and convenience, assuming my PCs are secure and trusted. Some other options are:
|
Co-authored-by: Jakub Loucký <jakub.loucky@outlook.cz>
Co-authored-by: Jakub Loucký <jakub.loucky@outlook.cz>
Co-authored-by: Jakub Loucký <jakub.loucky@outlook.cz>
Thanks for the feedback! The ways you propose are more practical. I will integrate them to my pipelines. |
I had an idea to create a function that prompts for password (hiding it while typing), because I didn't like the idea to include my passwords in all .py scripts I used.
Added functions to _init_.py
Notes
Some use cases examples can be seen in examples.py which I've also updated.
Your feedback will be appreciated!