A package for the simple local management of snowpark for python connections.
Documentation can be found here: Wiki
import snowauth
session = snowauth.connect('example_connection')
pip install snowauth
After installing snowauth
, set up your snowflake credentials:
-
Create the
.snowauth
folder and thesnowflake.conf
file that will store different snowflake credentials.mkdir ~/.snowauth mkfile ~/.snowauth/snowflake.conf
-
Add your snowflake credentials.
Example:
[example_connection] account = "ACCOUNT_NAME" user = "USER" password = "PASSWORD" role = "ACCOUNTADMIN" warehouse = "EXAMPLE_WH"
Then, to create a snowpark session in 1 line.
import snowauth
session = snowauth.connect('example_connection')
<snowflake.snowpark.session.Session: account=...>