- Notifications
You must be signed in to change notification settings - Fork10
A package for downloading and uploading figshare data
License
NotificationsYou must be signed in to change notification settings
cognoma/figshare
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is a simple client for the figshare API in python. Currently thefollowing actions are implemented
- create_article
- update_article
- get_article_details
- list_files
- get_file_details
- retrieve_files_from_article
git clone https://github.com/cognoma/figshare.gitpython setup.py install
For development, I recommend:
python setup.py develop
To use this Python module, here's a demonstration of initiating the API andretrieving information from Figshare API. This was done usingiPython, butother Python-based methods will work as well:
fromfigshare.figshareimportFigsharefs=Figshare()article_id=4757131fs.get_article_details(article_id)
That will produce a dictionary object. Here's a snippet of the first and last few lines:
{'defined_type_name': 'dataset','embargo_date': None,'citation': 'Lake, Sean; Wright, Edward L.; Assef, Roberto J.; Jarrett, Thomas H.; Petty, Sara; Stanford, Spencer A.; et al. (2019): Evolving Extragalactic Background and Luminosity Density. figshare. Dataset. https://doi.org/10.6084/m9.figshare.4757131.v1','url_private_api': 'https://api.figshare.com/v2/account/articles/4757131','status': 'public','created_date': '2019-08-07T07:54:50Z','group_id': None,'is_metadata_record': False,'modified_date': '2019-08-07T07:54:51Z'}
The following python libraries need to be installed
- requests