To connect with my snowflake db, I authenticate using a passcode (with Duo) since MFA is enabled
con = snowflake.connector.connect(
user='',
password='',
account='',
warehouse='',
database='',
schema='',
passcode='011415'
)
However, every time, I want to run my python script, I need to refresh the passcode from the Duo app and re-enter the new one in the script.
Is there any way I can avoid repeating the step everytime? Can the passcode be cahced?
For example, when I use Dbeaver, it sends a notification to my Duo app and once I approve it, I dont need to re-authenticate there for the next 24 hours, unless I turn off the computer of course.