zenodo-rs
Async Rust client for core Zenodo workflows.
It covers deposition create/update/publish flows, safe draft reuse versus newversion, published-record lookup, latest-version resolution, and downloads behind a small typed API for automation and CI jobs built on top of the Zenodo REST API.
Start Here
- Use
ZenodoClientfor the main entrypoint. - Use
workflowfor safe draft, publish, edit, and version helpers. - Use
recordsfor published-record lookup, DOI resolution, and search. - Use
downloadsfor file and archive downloads. - Use
DepositMetadataUpdateandUploadSpecto describe what you want to publish.
Install
[]
= "0.1"
= { = "1", = ["macros", "rt-multi-thread"] }
Optional features:
checksums: validate Zenodomd5:checksums when downloading to a pathindicatif: implementTransferProgressforindicatif::ProgressBarrustls-ring-tls: default Rustls transport using the Ring crypto provider, avoidingaws-lc-sysrustls-tls: backward-compatiblereqwest/rustlstransport using the AWS-LC-backed Rustls providerrustls-no-provider: advanced Rustls transport for applications that install their own process-widerustls::crypto::CryptoProvidernative-tls: usereqwestwithnative-tlsinstead of Rustls
The TLS features are mutually exclusive. Use default-features = false before
selecting a non-default TLS backend.
Read Example
use ZenodoClient;
async
Publish Example
use ;
async
Authentication
ZENODO_TOKENis the standard env var for the production service at zenodo.org.ZENODO_SANDBOX_TOKENis the sandbox equivalent for sandbox.zenodo.org.- Write flows usually need
deposit:writeanddeposit:actions.
Progress Bars
Enable the indicatif feature if you want indicatif::ProgressBar to work
directly with upload_path_with_progress, upload_reader_with_progress,
reconcile_files_with_progress, and download_artifact_with_progress.
Pass bar.clone() into the progress-aware upload and download helpers when you
want a real terminal progress bar during transfers.
The full runnable example lives in the progress
module docs.
Notes
Public download APIs use Zenodo IDs and selectors rather than raw URLs, and uploads require a known content length. For Zenodo-side behavior and token scopes, see the Zenodo developer docs.
Zenodo Limits and Retention
Zenodo's current upload docs say a record can contain up to 100 files and a total of 50 GB (50,000,000,000 bytes), with uploads up to 50 GB by default and additional quota that can bring a record up to 200 GB. If you need larger payloads than Zenodo is a good fit for, consider internetarchive-rs. Zenodo does not publish an SLA; instead, its principles page states a continuous-availability target of at least 99.7%, cites historical uptime of 99.98% (October 2019), and points to a public status page for live figures. Its preservation policy says items are retained for the lifetime of the repository, currently tied to CERN and described as at least the next 20 years; withdrawn records keep a tombstone page, DOI, and original URL. Zenodo only promises bit-level preservation, not future usability or understandability of deposited objects. zenodo-rs does not currently enforce the 100-file or 50 GB client-side limits: it validates duplicate/conflicting filenames and always sends an explicit Content-Length, but limit overflows are currently left for Zenodo to reject at request time. Sources: Manage files, Manage quota, General policies, Principles, Status page.