Skip to content

Zenodo

  • Zenodo account
  • Access token (obtain from Account Settings > Applications > Personal access tokens)

Create a YAML file with the following fields. Metadata fields follow the InvenioRDM REST API schema.

FieldDescription
zenodo_urlAPI base URL: https://zenodo.org/api or https://sandbox.zenodo.org/api
access_tokenZenodo access token
user_agentUser-Agent string for API requests (e.g., piccione/2.0.0). See note below
titleDeposition title
publication_datePublication date (YYYY-MM-DD)
resource_typeObject with id field (e.g., {id: dataset})
creatorsList of InvenioRDM creator objects (see example below)
accessAccess settings: {record: public, files: public}
filesList of file paths to upload
FieldDescription
record_idExisting record ID to create a new version of
communityCommunity ID for submission review (skipped on sandbox)
descriptionPlain text (converted to HTML with paragraph and list support)
additional_descriptionsList of objects: description (plain text, converted to HTML), type
subjectsList of subject objects ({subject: keyword} for free text or {id: ...} for controlled vocabulary)
rightsList of license objects ({id: cc-by-4.0} or custom with title, description, link)
related_identifiersList of InvenioRDM related identifier objects
contributorsList of InvenioRDM contributor objects
fundingList of funding objects (e.g., [{funder: {id: "00k4n6c32"}, award: {id: "00k4n6c32::101017452"}}])
datesList of InvenioRDM date objects
versionVersion string
languagesList of InvenioRDM language objects (e.g., [{id: eng}])
locationsInvenioRDM locations object
identifiersList of alternate identifier objects
publisherPublisher name
referencesList of reference strings

Note on User-Agent: Specifying a user_agent is strongly recommended. Without a proper User-Agent header, Zenodo is more likely to return 403 Forbidden errors or block uploads, especially during periods of high server load.

Example:

zenodo_url: https://zenodo.org/api
access_token: <YOUR_ZENODO_TOKEN>
user_agent: piccione/2.0.0
title: My Dataset
publication_date: "2024-01-15"
resource_type:
id: dataset
access:
record: public
files: public
creators:
- person_or_org:
type: personal
given_name: John
family_name: Doe
identifiers:
- scheme: orcid
identifier: 0000-0000-0000-0000
affiliations:
- name: University of Bologna
subjects:
- subject: data
- subject: research
rights:
- id: cc-by-4.0
description: |
Dataset description here.
Multiple paragraphs supported.
- Bullet lists work too
- Another item
files:
- /path/to/dataset.zip
- /path/to/readme.txt

See examples/zenodo_upload.yaml for a complete example.

Terminal window
# Upload and create draft for review
python -m piccione.upload.on_zenodo config.yaml
# Upload and publish automatically
python -m piccione.upload.on_zenodo config.yaml --publish
  • Create new depositions or new versions via InvenioRDM API
  • Community submission review support
  • Automatic retry with exponential backoff for network errors (unlimited attempts, max 60s delay)
  • Rich progress bar with transfer speed and ETA
  • Sandbox support for testing
  • Optional auto-publish with --publish flag
  • Plain text to HTML conversion with paragraph and bullet list support