Closed thurask closed 8 years ago
I think the api key should be written to a user accessible folder. ie their home folder. Maybe AppData/
on Windows for example.
This avoids the issue of not having permissions. Is it a bad practice to write to the packages folders anyway?
And that is only if the user needs any hand holding at all. I think it is cleaner just to use environment variables. For example I could just add a single line to my .zshrc
and be done with it.
Does anyone know how other python packages might handle this?
@Saturn
One could make ~/soccer-cli.ini (/home/user/soccer-cli.ini or C:\Users\user\soccer-cli.ini) a plain text file with just the key, instead of using a config.py.
Or, bust out ConfigParser, but I see no reason why.
In the event of no API key environment variable/config.py, notify user that there's no API key. Once user gets an API key, record it and save it to config.py file in site-packages.