biocommons / eutils

simplified searching, fetching, and parsing records from NCBI using their E-utilities interface
Apache License 2.0
58 stars 25 forks source link

option to specify API key for QueryService instances #152

Closed pmartin23 closed 6 years ago

pmartin23 commented 6 years ago

Looks like NCBI will be throttling users without an API key to 3 requests/s from 1st May 2018, and allowing up to 10 requests/s for users who provide an API key. Would be great to be able to provide the key to the QueryService object in order to automatically include the key in all queries, similarly to the 'email' and 'tool' params.

reece commented 6 years ago

I agree that this would be useful... and easy to implement. PRs welcome.

API keys are created at https://www.ncbi.nlm.nih.gov/account/settings/.

reece commented 6 years ago

Related: biocommons/bioutils#10

reece commented 6 years ago

@pmartin23 @timothyjlaurent Support for api keys was just released in eutils 0.4.0. See https://eutils.readthedocs.io/en/stable/changelog/0.4.html.

Thanks @timothyjlaurent for the PR that kicked this off.