Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Adding dotenv support#42

Merged
i-wagner merged 6 commits intomainfrom
adding-dotenv-support
May 26, 2025
Merged

Adding dotenv support#42
i-wagner merged 6 commits intomainfrom
adding-dotenv-support

Conversation

@i-wagner
Copy link
Copy Markdown
Contributor

@i-wagner i-wagner commented May 23, 2025

Description

Currently, Snowflake-manager requires secrets (Snowflake credentials) to be stored in the system's environment variables (e.g., .bash_profile). So, if working with different setups that require different credentials, the user had to comment out credentials, whenever switching between setups.

Changes

  • Added support for dotenv files to store secrets project-wise
  • Changed how the Snowflake cursor is set up in inspector.py: If the Snowflake credentials are not stored as part of the system's environment variables, the previous cursor definition resulted in an exception, because it tried to connect to Snowflake, in absence of valid credentials

Checklist

  • My pull request represents one logical piece of work
  • My commits are related to the pull request and look clean
  • I tested my changes locally with pytest -vv
  • I formatted my code with black .

@i-wagner i-wagner requested a review from lpillmann May 23, 2025 09:05
Copy link
Copy Markdown
Collaborator

@lpillmann lpillmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very good to me!

I like how you also refactored the use of cursors with a context manager instead 👍

Both the implementation and documentation are clear. I left two very minor suggestions that are optional.

Congrats on the first PR here 🎉

Comment thread snowflake_manager/utils.py Outdated
Comment thread snowflake_manager/utils.py Outdated
@i-wagner i-wagner merged commit acc726f into main May 26, 2025
1 check passed
@i-wagner i-wagner deleted the adding-dotenv-support branch May 26, 2025 07:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants