Skip to content
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

Allow env=None to load secrets from system environment #21

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hartikainen
Copy link

Thanks for open-sourcing the package! I just gave it a spin and it looks promising. I found the use of dotenv a bit clumsy and implemented a workaround to use system environment variables. I thought I'd open a PR here in case someone else also finds it useful.

The new logic is as follows:

  • if env is not None, then load_env_variables will load the variables from path env with dotenv.get_key,
  • if env is None, then load_env_variables will load the variables from system environment.

Both cases will check that both environment variables exist.

Also, I was wondering: would it make sense to call these ONSHAPE_{ACCESS,SECRET}_KEY instead of just {ACCESS,SECRET}_KEY?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant