-
Notifications
You must be signed in to change notification settings - Fork 369
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
secure database credentials #36
Comments
+1 on this @christophlingg What do you mean by using :variable anyway? |
@AndreaCrotti on the readme you can find an example for
|
Ah ok I see.. https://github.com/catherinedevlin/ipython-sql/blob/master/src/sql/magic.py I was trying now to do some debugging but trying to put an ipdb there doesn't seem to work, it should not be too hard though.. |
I was wondering the same thing and found this related post. Here's how to pass database creds from an environment variable:
from os import environ db_url = environ['DATABASE_URL'] %sql $db_url |
I was browsing for the same, @invisiblefunnel solution is what I was looking for. |
I ran into this same issue. Thanks, @invisiblefunnel for the solution. I submitted a PR with that solution in the README. |
This is a great feature, I see that it has been merged but I think we don't get it with pip install, right? |
Hello!
we are sharing our notebooks on github and want to avoid commiting our db credentials. Therefore we want to use environment variables. Is there any chance to do so:
normally you can use
:variable
to read variables, but this case is specialThe text was updated successfully, but these errors were encountered: