Closed KPLauritzen closed 7 years ago
@KPLauritzen but then, wouldn't an .env
file actually be .bashrc or something similar
😛 ?
While I agree that it's a nice tool to avoid polluting your "global" env with project related stuff, it's actually technically the same as having it in your .bashrc
:)
@chadrien I guess it is somewhat the same :) It is your password in plaintext on a file on your computer. It is easier to manage access to a project specific .env file. chmod 600 .env
, and you should be good to go.
Maybe it is a solution to a non-existent problem, but exactly this thing of not "polluting your global env" seems good practice. At least for my case, sometimes working on a multi-user system, it is nice to be able to say "have a look at my bashrc" without worrying about a password leaking.
@KPLauritzen Thanks for the suggestion!
I've been using an .env
file and autoenv myself but I totally forgot that python has this module.
Even though I agree that it's technically the same as having it in your .bashrc
, it's nice to add specific instructions for potential users, and having a local .env
file is IMO really good for that.
Do you @KPLauritzen want to open a pull request directly out of your changes? I can write the documentation if you don't feel like it :)
By using https://github.com/theskumar/python-dotenv, you can avoid have
YNAB_PASSWORD
stored in your .bashrc or something similar.Add a file:
.env
with the contentsand load that with the
dotenv
library.See KPLauritzen/Nordea-to-YNAB@6cf782dc1b0d0cee2d234b36791be0deb64cd1de