vvaezian / metabase_api_python

A python wrapper for Metabase API
MIT License
131 stars 39 forks source link

Automatically load Metabase credentials from environment variables #30

Closed mazzma12 closed 2 years ago

mazzma12 commented 2 years ago

Hi, I thought this would be a handy feature let me know what you think

vvaezian commented 2 years ago

Hi @mazzma12, thanks for the PR. Adding this feature seems unnecessary, as you can do the same thing when you want to initiate the class in your code:

from metabase_api import Metabase_API

MB_PASSWORD = os.getenv("MB_PASSWORD")
MB_USERNAME = os.getenv("MB_USERNAME")
MB_DOMAIN = os.getenv("MB_DOMAIN")

mb = Metabase_API(MB_DOMAIN , MB_USERNAME , MB_PASSWORD)
mazzma12 commented 2 years ago

Hi ! Thank you for your reply, I see your point, I just thought it would be more convenient to have the environment variable name standardized like this, but it's up to you !

vvaezian commented 2 years ago

I'm closing this, thanks for the contribution.