Closed Blake11 closed 5 years ago
This can be achieved like so:
from scopus import config, AuthorRetrieval
from scopus.exception import Scopus429Error
try:
author = AuthorRetrieval(author_id, refresh=True)
exept Scopus429Error:
config["Authentication"]["APIKey"] = "foo"
author = AuthorRetrieval(author_id, refresh=True)
This will set the API key to be used w/o changing the configuration file.
That is exactly what I was looking for. It should be included in documentation https://scopus.readthedocs.io/en/stable/configuration.html
Would it be possible to change the way api keys are used? It would be beneficial for threaded application where api keys change based on a criteria in different threads. Also this would reduce the number or disk reads/writes in some scenarios
Expected usage: