novem-code / novem-python

python command-line interface for interacting with the novem.no data visualisation platform
Other
2 stars 3 forks source link

Add global token variable #34

Closed sondove closed 1 month ago

sondove commented 1 month ago

Often novem code will run in an environment without a config file. The current solution is to supply token as a keyword arg on all object instantiations. From a user perspective it would probably be nicer if there was a way to set global config variables so the token could be specified in one location.

Environment variables is one such choice, but it has certain security implications. Perhaps some inspiration can be taken how requests, urllib3 et al handles ssl certs can be used?