elsapy | A Python module for use with Elsevier 's APIs | Natural Language Processing library
kandi X-RAY | elsapy Summary
kandi X-RAY | elsapy Summary
A Python module for use with api.elsevier.com. Its aim is to make life easier for people who are not primarily programmers, but need to interact with publication and citation data from Elsevier products in a programmatic manner (e.g. academic researchers). The module consists of the following classes:. More info on the wiki.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Executes the search
- Transform a pandas DataFrame into a Pandas DataFrame
- Execute a GET request
- Write the object to disk
- Returns True if the limit is exceeded
- Reads the payload
- Read entity data
- Read document documentation
- Read documents from the entity
- Create a logger with the given name
- Write the docs to a file
- Read the payload
- Read the documentation for this user
elsapy Key Features
elsapy Examples and Code Snippets
Community Discussions
Trending Discussions on elsapy
QUESTION
I am using the Elsevier API to access citation count data from Scopus, through the scopus-api module (but would be happy to use Elsevier's elsapy module). I can access the data I need, but there is a limit for the number of requests that can be made per week.
How would one obtain the number of remaining requests for the week?
All help is appreciated.
...ANSWER
Answered 2019-Sep-27 at 18:09Although an old question, the answer might help someone else who stumbles across it. The quota related information is contained in the headers of the response to your request. Each API endpoint seems to have its own limit.
Here's an example of a response that still has something left of the quota:
{'allow': 'GET', 'Content-Encoding': 'gzip', 'Content-Type': 'application/xml;charset=UTF-8', 'Date': 'Fri, 26 Aug 2019 17:46:46 GMT', 'Server': 'Apache-Coyote/1.1', 'vary': 'Origin', 'X-ELS-APIKey': 'your-api-key-would-be-here', 'X-ELS-ReqId': '16385g19-b193-1308-5817-c5694db5619g', 'X-ELS-ResourceVersion': 'default', 'X-ELS-Status': 'OK', 'X-ELS-TransId': '16385g19-b193-1308-5817-c5694db5619g', 'X-RateLimit-Limit': '20000', 'X-RateLimit-Remaining': '19636', 'X-RateLimit-Reset': '2019-10-03 07:18:17', 'transfer-encoding': 'chunked', 'Connection': 'keep-alive'}
Here's an example for which the quota has been exceeded:
{'Content-Encoding': 'gzip', 'Content-Type': 'text/xml;charset=UTF-8', 'Date': 'Fri, 19 Aug 2019 17:46:46 GMT', 'Server': 'Apache-Coyote/1.1', 'X-ELS-Status': 'QUOTA_EXCEEDED - Quota Exceeded', 'X-RateLimit-Reset': '2019-08-26 05:51:01', 'Content-Length': '191', 'Connection': 'keep-alive'}
An example to get the headers in python using requests:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install elsapy
In your project root folder, create a config file and add your APIkey to it
Download exampleProg.py to your project root folder and modify it to suit your needs
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page