should ALPHAVANTAGE_API_KEY be a system or user variable

John Ralls jralls at ceridwen.us
Mon Nov 13 22:52:47 EST 2017



> On Nov 13, 2017, at 1:35 PM, Geert Janssens <geert.gnucash at kobaltwit.be> wrote:
> 
> Op maandag 13 november 2017 22:20:31 CET schreef Derek Atkins:
>> Geert,
>> 
> 
>> Why can't we just setenv() or putenv() the API Key prior to calling the
>> scripts?
>> 
> 
> gnc-fq-dump is not called from within gnucash so it's up to the caller to 
> ensure the environment variable is set. I would prefer both such external 
> scripts and gnucash would see the same API key so the user has to set it only 
> once in one location.
> And I was thinking wider than gnucash as well. This API key is really 
> something internal to Finance::Quote so there may be other applications 
> depending on it though I have no concrete examples for that.
> 
> As an analogy aqbanking manages a number of settings we allow the user to set 
> from within gnucash. They are not stored with the gnucash settings though, but 
> in the $HOME/.aqbanking directory. That allows for other applications to use 
> the same settings (like eg KMyMoney).

I agree that having F::Q specify a file is the way to go. Even better on Mac and Win32 would be to use defaults/registry, but that’s probably a bit more platform dependence than Erik is willing to go for.

Regards,
John Ralls



More information about the gnucash-devel mailing list