zenodo
zenodo#
Main Zenodo interface.
- class showyourwork.zenodo.Zenodo(doi_or_service, **kwargs)#
Bases:
object
A Zenodo or Zenodo Sandbox interface for
showyourwork
.Initialize a Zenodo interface.
- Parameters
doi_or_service (str) – Deposit DOI or service name (e.g., “zenodo” or “sandbox”).
kwargs – Forwarded to
Zenodo._create
.
- check_if_user_is_owner()#
- copy_draft(*args, **kwargs)#
- delete(*args, **kwargs)#
- download_file(file, rule_name, tarball=False, dry_run=False)#
Download a file from the record, deposit or deposit draft.
- download_file_from_draft(*args, **kwargs)#
- download_file_from_record(record, file, rule_name, tarball=False, dry_run=False)#
Downloads a file from a published Zenodo record.
- get_id_type()#
Returns the type of a Zenodo id (“version” or “concept”).
Caches the result locally.
- publish(*args, **kwargs)#
- upload_file(*args, **kwargs)#
- upload_file_to_draft(*args, **kwargs)#
- showyourwork.zenodo.get_dataset_dois(files, datasets)#
Given a list of files, return all associated Zenodo and/or Zenodo Sandbox DOIs.
- showyourwork.zenodo.get_dataset_urls(files, datasets)#
Given a list of files, return all associated Zenodo and/or Zenodo Sandbox URLs.
This is used to populate the figure margin icons in the article.
- showyourwork.zenodo.require_access_token(method)#
Decorator that raises an exception of the Zenodo token was not provided.