should ALPHAVANTAGE_API_KEY be a system or user variable

Geert Janssens geert.gnucash at
Mon Nov 13 16:16:19 EST 2017

Op maandag 13 november 2017 21:59:49 CET schreef Erik Colson:
> Hello,
> I'm also concerned by the declaration of an environment variable, but
> more generally.  It feels wrong as it causes extra problems to common
> users.
> Therfor I'm thinking of adding an option hash to F::Q which would
> contain the APIkey.  Thus the APIkey can be an option _inside_ gnucash
> or other apps and no environment variable would need to be set.
> Opinions are welcome.
Yes that would be good.

I was already considering to provide a gnucash preference to set the APIkey. I 
would have made it so the key would be exported to the environment by GnuCash 
itself when needed. But I could just as well have gnucash set the option hash 

I'd still have to figure out how our helper scripts would get the key though. 
These helper scripts are simple perl scripts that don't read the gnucash 

Ideally Finance::Quote would store the API key as a usersetting itself 
somewhere and provide a function to set/alter/delete it by the user. That way 
gnucash can just use these interface functions to retrieve the API key for 
display or set/modify based on user's input. From there on it would be 
available to F::Q itself and hence all of its clients.

Is that a feasible solution ?


More information about the gnucash-devel mailing list