Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Could you please add support for API key? #29

Open
rgranit opened this issue Oct 27, 2019 · 1 comment
Open

Could you please add support for API key? #29

rgranit opened this issue Oct 27, 2019 · 1 comment

Comments

@rgranit
Copy link

rgranit commented Oct 27, 2019

Is your feature request related to a problem? Please describe.
Currently one cannot enter the PubMed API key, so one cannot increase the rate limit to 10calls/sec

Describe the solution you'd like
It would be great to add another param to the PubMed object.

Describe alternatives you've considered
Writing my own code to handle the API :)

Additional context
See here for info about the API key

THANKS!

@jc639
Copy link

jc639 commented Feb 4, 2020

For anyone wondering you can monkey patch this.

from pymed import PubMed
pubmed = PubMed(tool='my_tool', email='myemail@email.com')

my_api_key = 'thisismyapikey'
pubmed.parameters.update({'api_key': my_api_key})

and you probably want to up the rate limit,:
pubmed._rateLimit = 10

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants