get_figshare_files#

pypillometry.get_figshare_files(article, version=None, token=None)[source]#

List the files of a figshare item (public, or private with a token).

Parameters:
  • article (int or str) – figshare item ID (e.g., 28776617), the item’s URL (https://figshare.com/articles/dataset/<title>/28776617) or its DOI (10.6084/m9.figshare.28776617)

  • version (Optional[int]) – version of the item; default the latest one (or the version in the URL or DOI, if it contains one)

  • token (Optional[str]) – figshare personal token, for a private item of your account (or one shared with you). Without version, the files of the item as it is now in the account (including changes that are not published yet); an item that is not in the account is listed as a public one.

Return type:

dict[str, dict[str, Any]]

Returns:

file name -> dict with the file’s id, download_url, size (bytes) and md5 checksum

Examples

>>> files = get_figshare_files(28776617)
>>> files["sub-001_ses-1.pypil"]["size"]
30879440