Mendeley API Python Catalog Example
For more information on the API, see the developer portal.
About the application
The application is a simple command-line script that retrieves the number of Mendeley users that have read a document with a given DOI. It uses the client credentials flow, meaning that users don't have to log in to Mendeley to use the application.
Register your client at the developer portal. This will give you a client ID and secret. (You will not get very far without these!)
How to install
Run the following command to install dependencies:
pip install -r requirements.txt
How to run
Insert your API keys with one of these methods:
- Config file method: Rename the config.yml.example file to config.yml, and fill in your client ID and secret in this file.
- Environment variable method: Set the
MENDELEY_CLIENT_SECRETenvironment variables in your shell context to the appropriate values.
Now run the example:
python mendeley-catalog.py [DOI you want to look up]