Skip to main content

PyZenodo

DOI Actions Status pypi versions PyPi Download stats

Pure Python wrapper for Zenodo REST API.

Allows upload / download of data from Zenodo.

Install

pip install pyzenodo3

Latest development

git clone https://github.com/scivision/pyzenodo3

pip install -e pyzenodo3

Usage

Here are several examples of using Zenodo from Python 3. All of them assume you have first:

import pyzenodo3

zen = pyzenodo3.Zenodo()

Upload file to Zenodo

  1. Get a Zenodo deposit:write API Token. This token must remain private, NOT uploaded to GitHub, etc.!

  2. create a simple text file mymeta.ini containing title, author etc. (see the example meta.ini in this repo)

  3. upload file to Zenodo (myApiToken is the cut-n-pasted Zenodo API text token)

    python upload_zenodo.py myApiToken mymeta.ini myfile.zip --use-sandbox
    

Note the --use-sandbox is to avoid making junk uploads while testing out. Once you're sure things are working as intended, not using that flag uploads to "real" Zenodo permanently.

Find Zenodo record by Github repo

Rec = zen.find_record__by_github_repo('scivision/lowtran')

This Zenodo Record contains the metadata that can be further manipulated in a simple class containing the data in dictionaries, with a few future helper methods.

Find Zenodo records by Github username

Recs = zen.search('scivision')

Recs is a list of Zenodo Records for the GitHub username queried, as in the example above.

Notes

  • We don't use deposit:publish API token to keep a human-in-the-loop in case of hacking of sensor nodes.

Metadata

Release files for pyzenodo3 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyzenodo3 1.0.2
File Size Uploaded
pyzenodo3-1.0.2.tar.gz 9.9 kB Details

Release files / pyzenodo3-1.0.2.tar.gz

Download URL pyzenodo3-1.0.2.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6eb7a9766fbc1c7258c506508c918f667a5671cbeed1ff628f63a7438cbe2998
BLAKE2b-256 checksum
How to use checksums
a28cf9efd8d04f01e48a6a95338086f8de8eb770d4c196533dedcb6c7a4190d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

Release history Release notifications | RSS feed

This release

1.0.2 This release

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page